diff options
author | Marius David Wieschollek <passwords.public@mdns.eu> | 2020-04-23 19:12:49 +0300 |
---|---|---|
committer | Marius David Wieschollek <passwords.public@mdns.eu> | 2020-04-23 19:12:49 +0300 |
commit | b358b4b224bd1b9b01bc3392b4ffd523ed49104a (patch) | |
tree | 81b681971c42d22826cdae333e8f9e9b505c9b86 /src | |
parent | da4c1b140c25e6e70c16c78731f1515074993a01 (diff) | |
parent | 7453f5187bc654c5e47d2662488759c3eb65a9e3 (diff) |
Merge branch 'stable'
Diffstat (limited to 'src')
-rw-r--r-- | src/Classes/SimpleApi.js | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/Classes/SimpleApi.js b/src/Classes/SimpleApi.js index 5fe8598..4472535 100644 --- a/src/Classes/SimpleApi.js +++ b/src/Classes/SimpleApi.js @@ -72,7 +72,11 @@ export default class SimpleApi { 'service.avatar' : 'api/1.0/service/avatar/{user}/{size}', 'service.favicon' : 'api/1.0/service/favicon/{domain}/{size}', 'service.preview' : 'api/1.0/service/preview/{domain}/{view}/{width}/{height}', - 'cron.sharing' : 'cron/sharing' + 'cron.sharing' : 'cron/sharing', + 'link.request' : 'link/connect/request', + 'link.await' : 'link/connect/await', + 'link.reject' : 'link/connect/reject', + 'link.confirm' : 'link/connect/confirm' }; } @@ -683,6 +687,43 @@ export default class SimpleApi { /** + * Connect with PassLink + */ + + /** + * @returns {Promise} + */ + passLinkConnectRequest() { + return this._sendRequest('link.request'); + } + + /** + * @returns {Promise} + */ + passLinkConnectAwait() { + return this._sendRequest('link.await'); + } + + /** + * @returns {Promise} + */ + passLinkConnectReject() { + return this._sendRequest('link.reject'); + } + + /** + * @returns {Promise} + */ + passLinkConnectConfirm(label) { + if(label) { + return this._sendRequest('link.confirm', {label}); + } + + return this._sendRequest('link.confirm'); + } + + + /** * Internal */ |