Constructor
new SnapClient(authFile, socketPath)
- Source:
Parameters:
Name |
Type |
Description |
authFile |
string
|
Defaults to $HOME/.snap/auth.json |
socketPath |
string
|
Defaults to /run/snapd.socket |
Methods
(async) abort(options)
- Source:
abort ongoing change by id
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
id |
string
|
|
auth |
object
|
|
|
(async) connect(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
slot |
object
|
|
plug |
object
|
|
auth |
object
|
|
|
(async) disable(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|
(async) disconnect(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|
(async) enable(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|
(async) info(options)
- Source:
Get detailed info about a snap
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
object
|
|
|
(async) install(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|
(async) listInterfaces(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
auth |
object
|
|
|
(async) listSnaps()
- Source:
(async) login(options)
- Source:
login may require root privilege
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
auth |
object
|
|
method |
string
|
|
path |
string
|
|
data |
string
|
|
|
(async) logout(options)
- Source:
logout may require root privilege
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
auth |
object
|
|
|
(async) modify(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
action |
string
|
|
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|
(async) modifyInterface(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
action |
string
|
|
slot |
object
|
|
plug |
object
|
|
auth |
object
|
|
|
(async) readAuth(filename)
- Source:
read auth email & macaroon from ~/.snap/auth.json
Parameters:
Name |
Type |
Description |
filename |
string
|
|
(async) refresh(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|
(async) remove(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|
(async) rest(options)
- Source:
make restful call to snapd process thru /run/snapd.socket
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
auth |
object
|
|
method |
string
|
|
path |
string
|
|
data |
string
|
|
|
(async) revert(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|
(async) status(options)
- Source:
check on status of change by id (or all changes without id arg)
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
id |
string
|
|
|
(async) switch(options)
- Source:
Parameters:
Name |
Type |
Description |
options |
object
|
Properties
Name |
Type |
Description |
name |
string
|
|
auth |
object
|
|
opts |
object
|
|
|