Updated SKDs

This commit is contained in:
eldadfux
2019-10-19 20:21:36 +03:00
parent 1d05ca448b
commit f532b12458
33 changed files with 1184 additions and 724 deletions
@@ -10,6 +10,7 @@ class Account(Service):
path = '/account'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def delete(self):
@@ -19,6 +20,7 @@ class Account(Service):
path = '/account'
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def update_email(self, email, password):
@@ -30,6 +32,7 @@ class Account(Service):
params['password'] = password
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
def update_name(self, name):
@@ -40,6 +43,7 @@ class Account(Service):
params['name'] = name
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
def update_password(self, password, old_password):
@@ -51,6 +55,7 @@ class Account(Service):
params['old-password'] = old_password
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
def get_prefs(self):
@@ -60,6 +65,7 @@ class Account(Service):
path = '/account/prefs'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_prefs(self, prefs):
@@ -70,6 +76,7 @@ class Account(Service):
params['prefs'] = prefs
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
def get_security(self):
@@ -79,6 +86,7 @@ class Account(Service):
path = '/account/security'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_sessions(self):
@@ -88,4 +96,5 @@ class Account(Service):
path = '/account/sessions'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
@@ -14,6 +14,7 @@ class Auth(Service):
params['failure'] = failure
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def logout(self):
@@ -23,6 +24,7 @@ class Auth(Service):
path = '/auth/logout'
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def logout_by_session(self, id):
@@ -33,6 +35,7 @@ class Auth(Service):
path.replace('{id}', id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def oauth(self, provider, success, failure):
@@ -45,6 +48,7 @@ class Auth(Service):
params['failure'] = failure
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def recovery(self, email, reset):
@@ -56,6 +60,7 @@ class Auth(Service):
params['reset'] = reset
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def recovery_reset(self, user_id, token, password_a, password_b):
@@ -69,6 +74,7 @@ class Auth(Service):
params['password-b'] = password_b
return self.client.call('put', path, {
'content-type': 'application/json',
}, params)
def register(self, email, password, confirm, success='', failure='', name=''):
@@ -84,6 +90,7 @@ class Auth(Service):
params['name'] = name
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def confirm(self, user_id, token):
@@ -95,6 +102,7 @@ class Auth(Service):
params['token'] = token
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def confirm_resend(self, confirm):
@@ -105,4 +113,5 @@ class Auth(Service):
params['confirm'] = confirm
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
@@ -14,6 +14,7 @@ class Avatars(Service):
params['quality'] = quality
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_credit_card(self, code, width=100, height=100, quality=100):
@@ -27,6 +28,7 @@ class Avatars(Service):
params['quality'] = quality
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_favicon(self, url):
@@ -37,6 +39,7 @@ class Avatars(Service):
params['url'] = url
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_flag(self, code, width=100, height=100, quality=100):
@@ -50,6 +53,7 @@ class Avatars(Service):
params['quality'] = quality
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_image(self, url, width=400, height=400):
@@ -62,6 +66,7 @@ class Avatars(Service):
params['height'] = height
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_q_r(self, text, size=400, margin=1, download=0):
@@ -75,4 +80,5 @@ class Avatars(Service):
params['download'] = download
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
@@ -14,6 +14,7 @@ class Database(Service):
params['orderType'] = order_type
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_collection(self, name, read, write, rules):
@@ -27,6 +28,7 @@ class Database(Service):
params['rules'] = rules
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_collection(self, collection_id):
@@ -37,6 +39,7 @@ class Database(Service):
path.replace('{collectionId}', collection_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_collection(self, collection_id, name, readstring(4) ""[]""
@@ -54,6 +57,7 @@ class Database(Service):
params['rules'] = rules
return self.client.call('put', path, {
'content-type': 'application/json',
}, params)
def delete_collection(self, collection_id):
@@ -64,6 +68,7 @@ class Database(Service):
path.replace('{collectionId}', collection_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def list_documents(self, collection_id, filtersstring(4) ""[]""
@@ -84,6 +89,7 @@ class Database(Service):
params['last'] = last
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_document(self, collection_id, data, readstring(4) ""[]""
@@ -102,6 +108,7 @@ class Database(Service):
params['parentPropertyType'] = parent_property_type
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_document(self, collection_id, document_id):
@@ -113,6 +120,7 @@ class Database(Service):
path.replace('{documentId}', document_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_document(self, collection_id, document_id, data, readstring(4) ""[]""
@@ -129,6 +137,7 @@ class Database(Service):
params['write'] = write
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
def delete_document(self, collection_id, document_id):
@@ -140,4 +149,5 @@ class Database(Service):
path.replace('{documentId}', document_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
@@ -10,6 +10,7 @@ class Locale(Service):
path = '/locale'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_countries(self):
@@ -19,6 +20,7 @@ class Locale(Service):
path = '/locale/countries'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_countries_e_u(self):
@@ -28,6 +30,7 @@ class Locale(Service):
path = '/locale/countries/eu'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_countries_phones(self):
@@ -37,6 +40,7 @@ class Locale(Service):
path = '/locale/countries/phones'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_currencies(self):
@@ -46,4 +50,5 @@ class Locale(Service):
path = '/locale/currencies'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
@@ -10,6 +10,7 @@ class Projects(Service):
path = '/projects'
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_project(self, name, team_id, description='', logo='', url='', legal_name='', legal_country='', legal_state='', legal_city='', legal_address='', legal_tax_id=''):
@@ -30,6 +31,7 @@ class Projects(Service):
params['legalTaxId'] = legal_tax_id
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_project(self, project_id):
@@ -40,6 +42,7 @@ class Projects(Service):
path.replace('{projectId}', project_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_project(self, project_id, name, description='', logo='', url='', legal_name='', legal_country='', legal_state='', legal_city='', legal_address='', legal_tax_id=''):
@@ -60,6 +63,7 @@ class Projects(Service):
params['legalTaxId'] = legal_tax_id
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
def delete_project(self, project_id):
@@ -70,6 +74,7 @@ class Projects(Service):
path.replace('{projectId}', project_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def list_keys(self, project_id):
@@ -80,6 +85,7 @@ class Projects(Service):
path.replace('{projectId}', project_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_key(self, project_id, name, scopes):
@@ -92,6 +98,7 @@ class Projects(Service):
params['scopes'] = scopes
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_key(self, project_id, key_id):
@@ -103,6 +110,7 @@ class Projects(Service):
path.replace('{keyId}', key_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_key(self, project_id, key_id, name, scopes):
@@ -116,6 +124,7 @@ class Projects(Service):
params['scopes'] = scopes
return self.client.call('put', path, {
'content-type': 'application/json',
}, params)
def delete_key(self, project_id, key_id):
@@ -127,6 +136,7 @@ class Projects(Service):
path.replace('{keyId}', key_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def update_project_o_auth(self, project_id, provider, app_id='', secret=''):
@@ -140,6 +150,7 @@ class Projects(Service):
params['secret'] = secret
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
def list_platforms(self, project_id):
@@ -150,6 +161,7 @@ class Projects(Service):
path.replace('{projectId}', project_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_platform(self, project_id, type, name, key='', store='', url=''):
@@ -165,6 +177,7 @@ class Projects(Service):
params['url'] = url
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_platform(self, project_id, platform_id):
@@ -176,6 +189,7 @@ class Projects(Service):
path.replace('{platformId}', platform_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_platform(self, project_id, platform_id, name, key='', store='', url=''):
@@ -191,6 +205,7 @@ class Projects(Service):
params['url'] = url
return self.client.call('put', path, {
'content-type': 'application/json',
}, params)
def delete_platform(self, project_id, platform_id):
@@ -202,6 +217,7 @@ class Projects(Service):
path.replace('{platformId}', platform_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def list_tasks(self, project_id):
@@ -212,6 +228,7 @@ class Projects(Service):
path.replace('{projectId}', project_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_task(self, project_id, name, status, schedule, security, http_method, http_url, http_headers={}, http_user='', http_pass=''):
@@ -231,6 +248,7 @@ class Projects(Service):
params['httpPass'] = http_pass
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_task(self, project_id, task_id):
@@ -242,6 +260,7 @@ class Projects(Service):
path.replace('{taskId}', task_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_task(self, project_id, task_id, name, status, schedule, security, http_method, http_url, http_headers={}, http_user='', http_pass=''):
@@ -262,6 +281,7 @@ class Projects(Service):
params['httpPass'] = http_pass
return self.client.call('put', path, {
'content-type': 'application/json',
}, params)
def delete_task(self, project_id, task_id):
@@ -273,6 +293,7 @@ class Projects(Service):
path.replace('{taskId}', task_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def get_project_usage(self, project_id):
@@ -283,6 +304,7 @@ class Projects(Service):
path.replace('{projectId}', project_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def list_webhooks(self, project_id):
@@ -293,6 +315,7 @@ class Projects(Service):
path.replace('{projectId}', project_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_webhook(self, project_id, name, events, url, security, http_user='', http_pass=''):
@@ -309,6 +332,7 @@ class Projects(Service):
params['httpPass'] = http_pass
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_webhook(self, project_id, webhook_id):
@@ -320,6 +344,7 @@ class Projects(Service):
path.replace('{webhookId}', webhook_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_webhook(self, project_id, webhook_id, name, events, url, security, http_user='', http_pass=''):
@@ -337,6 +362,7 @@ class Projects(Service):
params['httpPass'] = http_pass
return self.client.call('put', path, {
'content-type': 'application/json',
}, params)
def delete_webhook(self, project_id, webhook_id):
@@ -348,4 +374,5 @@ class Projects(Service):
path.replace('{webhookId}', webhook_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
@@ -14,6 +14,7 @@ class Storage(Service):
params['orderType'] = order_type
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_file(self, files, readstring(4) ""[]""
@@ -40,6 +41,7 @@ class Storage(Service):
path.replace('{fileId}', file_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_file(self, file_id, readstring(4) ""[]""
@@ -55,6 +57,7 @@ class Storage(Service):
params['folderId'] = folder_id
return self.client.call('put', path, {
'content-type': 'application/json',
}, params)
def delete_file(self, file_id):
@@ -65,6 +68,7 @@ class Storage(Service):
path.replace('{fileId}', file_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def get_file_download(self, file_id):
@@ -75,6 +79,7 @@ class Storage(Service):
path.replace('{fileId}', file_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_file_preview(self, file_id, width=0, height=0, quality=100, background='', output=''):
@@ -90,6 +95,7 @@ class Storage(Service):
params['output'] = output
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_file_view(self, file_id, as=''):
@@ -101,4 +107,5 @@ class Storage(Service):
params['as'] = as
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
@@ -14,6 +14,7 @@ class Teams(Service):
params['orderType'] = order_type
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_team(self, name, rolesstring(13) ""[\"owner\"]""
@@ -26,6 +27,7 @@ class Teams(Service):
params['roles'] = roles
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_team(self, team_id):
@@ -36,6 +38,7 @@ class Teams(Service):
path.replace('{teamId}', team_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_team(self, team_id, name):
@@ -47,6 +50,7 @@ class Teams(Service):
params['name'] = name
return self.client.call('put', path, {
'content-type': 'application/json',
}, params)
def delete_team(self, team_id):
@@ -57,6 +61,7 @@ class Teams(Service):
path.replace('{teamId}', team_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def get_team_members(self, team_id):
@@ -67,6 +72,7 @@ class Teams(Service):
path.replace('{teamId}', team_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_team_membership(self, team_id, email, roles, redirect, name=''):
@@ -81,6 +87,7 @@ class Teams(Service):
params['redirect'] = redirect
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def delete_team_membership(self, team_id, invite_id):
@@ -92,6 +99,7 @@ class Teams(Service):
path.replace('{inviteId}', invite_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def create_team_membership_resend(self, team_id, invite_id, redirect):
@@ -104,6 +112,7 @@ class Teams(Service):
params['redirect'] = redirect
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def update_team_membership_status(self, team_id, invite_id, user_id, secret, success='', failure=''):
@@ -119,4 +128,5 @@ class Teams(Service):
params['failure'] = failure
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
@@ -14,6 +14,7 @@ class Users(Service):
params['orderType'] = order_type
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def create_user(self, email, password, name=''):
@@ -26,6 +27,7 @@ class Users(Service):
params['name'] = name
return self.client.call('post', path, {
'content-type': 'application/json',
}, params)
def get_user(self, user_id):
@@ -36,6 +38,7 @@ class Users(Service):
path.replace('{userId}', user_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_user_logs(self, user_id):
@@ -46,6 +49,7 @@ class Users(Service):
path.replace('{userId}', user_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def get_user_prefs(self, user_id):
@@ -56,6 +60,7 @@ class Users(Service):
path.replace('{userId}', user_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def update_user_prefs(self, user_id, prefs):
@@ -67,6 +72,7 @@ class Users(Service):
params['prefs'] = prefs
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)
def get_user_sessions(self, user_id):
@@ -77,6 +83,7 @@ class Users(Service):
path.replace('{userId}', user_id)
return self.client.call('get', path, {
'content-type': 'application/json',
}, params)
def delete_user_sessions(self, user_id):
@@ -87,6 +94,7 @@ class Users(Service):
path.replace('{userId}', user_id)
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def delete_user_session(self, user_id, session_id):
@@ -98,6 +106,7 @@ class Users(Service):
params['sessionId'] = session_id
return self.client.call('delete', path, {
'content-type': 'application/json',
}, params)
def update_user_status(self, user_id, status):
@@ -109,4 +118,5 @@ class Users(Service):
params['status'] = status
return self.client.call('patch', path, {
'content-type': 'application/json',
}, params)