Add getProfiles action
This commit is contained in:
parent
e01544a538
commit
fdae44f1d3
20
README.md
20
README.md
@ -222,6 +222,26 @@ guarantee that your application continues to function properly in the future.
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* **getProfiles**
|
||||||
|
|
||||||
|
Retrieve the list of profiles.
|
||||||
|
|
||||||
|
*Sample request*:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"action": "getProfiles",
|
||||||
|
"version": 6
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
*Sample result*:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"result": ["User 1"],
|
||||||
|
"error": null
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
* **loadProfile**
|
* **loadProfile**
|
||||||
|
|
||||||
Selects the profile specified in request.
|
Selects the profile specified in request.
|
||||||
|
@ -261,6 +261,9 @@ class AnkiConnect:
|
|||||||
def version(self):
|
def version(self):
|
||||||
return util.setting('apiVersion')
|
return util.setting('apiVersion')
|
||||||
|
|
||||||
|
@util.api()
|
||||||
|
def getProfiles(self):
|
||||||
|
return self.window().pm.profiles()
|
||||||
|
|
||||||
@util.api()
|
@util.api()
|
||||||
def loadProfile(self, name):
|
def loadProfile(self, name):
|
||||||
|
Loading…
Reference in New Issue
Block a user