Updated SDKs

This commit is contained in:
eldadfux
2019-08-22 20:20:27 +03:00
parent a6a225ded0
commit 3297ade033
22 changed files with 28 additions and 110 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
# [Appwrite SDK for Javascript](https://appwrite.io)   [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Appwrite%20is%20a%20backend%20as%20a%20service%20for%20building%20web%20or%20mobile%20apps&url=http%3A%2F%2Fappwrite.io&via=appwrite_io&hashtags=JS%2Cjavascript%2Creactjs%2Cangular%2Cios%2Candroid)
![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.7.ee-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@@ -9,9 +9,9 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
![Appwrite](https://appwrite.io/images/github.png)
**API Version: 0.1.3**
**API Version: 0.1.7.ee**
## Installation
+1 -19
View File
@@ -1372,24 +1372,6 @@
getCountriesPhones: function() {
let path = '/locale/countries/phones';
return http
.get(path, {'content-type': 'application/json'},
{
});
},
/**
* List of currencies
*
* List of all currencies, including currency symol, name, plural, and decimal
* digits for all major and minor currencies. You can use the locale header to
* get the data in supported language.
*
* @throws {Error}
* @return {Promise} */
getCurrencies: function() {
let path = '/locale/currencies';
return http
.get(path, {'content-type': 'application/json'},
{
@@ -1811,7 +1793,7 @@
* @param {string} url
* @throws {Error}
* @return {Promise} */
updatePlatform: function(projectId, platformId, name, key = '', store = '', url = '') {
updatePlatform: function(projectId, platformId, name, key = '', store = '', url = '[]') {
if(projectId === undefined) {
throw new Error('Missing required parameter: "projectId"');
}
+2 -2
View File
@@ -57,7 +57,7 @@ if(documentId===undefined){throw new Error('Missing required parameter: "documen
if(data===undefined){throw new Error('Missing required parameter: "data"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.patch(path,{'content-type':'application/json'},{'data':data,'read':read,'write':write})},deleteDocument:function(collectionId,documentId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
if(documentId===undefined){throw new Error('Missing required parameter: "documentId"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.delete(path,{'content-type':'application/json'},{})}};let locale={getLocale:function(){let path='/locale';return http.get(path,{'content-type':'application/json'},{})},getCountries:function(){let path='/locale/countries';return http.get(path,{'content-type':'application/json'},{})},getCountriesEU:function(){let path='/locale/countries/eu';return http.get(path,{'content-type':'application/json'},{})},getCountriesPhones:function(){let path='/locale/countries/phones';return http.get(path,{'content-type':'application/json'},{})},getCurrencies:function(){let path='/locale/currencies';return http.get(path,{'content-type':'application/json'},{})}};let projects={listProjects:function(){let path='/projects';return http.get(path,{'content-type':'application/json'},{})},createProject:function(name,teamId,description='',logo='',url='',clients=[],legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/database/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);return http.delete(path,{'content-type':'application/json'},{})}};let locale={getLocale:function(){let path='/locale';return http.get(path,{'content-type':'application/json'},{})},getCountries:function(){let path='/locale/countries';return http.get(path,{'content-type':'application/json'},{})},getCountriesEU:function(){let path='/locale/countries/eu';return http.get(path,{'content-type':'application/json'},{})},getCountriesPhones:function(){let path='/locale/countries/phones';return http.get(path,{'content-type':'application/json'},{})}};let projects={listProjects:function(){let path='/projects';return http.get(path,{'content-type':'application/json'},{})},createProject:function(name,teamId,description='',logo='',url='',clients=[],legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(name===undefined){throw new Error('Missing required parameter: "name"')}
if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
let path='/projects';return http.post(path,{'content-type':'application/json'},{'name':name,'teamId':teamId,'description':description,'logo':logo,'url':url,'clients':clients,'legalName':legalName,'legalCountry':legalCountry,'legalState':legalState,'legalCity':legalCity,'legalAddress':legalAddress,'legalTaxId':legalTaxId})},getProject:function(projectId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}'.replace(new RegExp('{projectId}','g'),projectId);return http.get(path,{'content-type':'application/json'},{})},updateProject:function(projectId,name,description='',logo='',url='',clients=[],legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
@@ -83,7 +83,7 @@ if(type===undefined){throw new Error('Missing required parameter: "type"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/projects/{projectId}/platforms'.replace(new RegExp('{projectId}','g'),projectId);return http.post(path,{'content-type':'application/json'},{'type':type,'name':name,'key':key,'store':store,'url':url})},getPlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(platformId===undefined){throw new Error('Missing required parameter: "platformId"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.get(path,{'content-type':'application/json'},{})},updatePlatform:function(projectId,platformId,name,key='',store='',url=''){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.get(path,{'content-type':'application/json'},{})},updatePlatform:function(projectId,platformId,name,key='',store='',url='[]'){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
if(platformId===undefined){throw new Error('Missing required parameter: "platformId"')}
if(name===undefined){throw new Error('Missing required parameter: "name"')}
let path='/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}','g'),projectId).replace(new RegExp('{platformId}','g'),platformId);return http.put(path,{'content-type':'application/json'},{'name':name,'key':key,'store':store,'url':url})},deletePlatform:function(projectId,platformId){if(projectId===undefined){throw new Error('Missing required parameter: "projectId"')}
+3 -3
View File
@@ -1,7 +1,7 @@
# [Appwrite SDK for NodeJS](https://appwrite.io)   [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Appwrite%20is%20a%20backend%20as%20a%20service%20for%20building%20web%20or%20mobile%20apps&url=http%3A%2F%2Fappwrite.io&via=appwrite_io&hashtags=JS%2Cjavascript%2Creactjs%2Cangular%2Cios%2Candroid)
![License](https://img.shields.io/github/license/appwrite/sdk-for-node.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.7.ee-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@@ -9,9 +9,9 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
![Appwrite](https://appwrite.io/images/github.png)
**API Version: 0.1.3**
**API Version: 0.1.7.ee**
## Installation
-18
View File
@@ -72,24 +72,6 @@ class Locale extends Service {
{
});
}
/**
* List of currencies
*
* List of all currencies, including currency symol, name, plural, and decimal
* digits for all major and minor currencies. You can use the locale header to
* get the data in supported language.
*
* @throws Exception
* @return {}
*/
async getCurrencies() {
let path = '/locale/currencies';
return await this.client.call('get', path, {'content-type': 'application/json'},
{
});
}
}
module.exports = Locale;
+1 -1
View File
@@ -296,7 +296,7 @@ class Projects extends Service {
* @throws Exception
* @return {}
*/
async updatePlatform(projectId, platformId, name, key = '', store = '', url = '') {
async updatePlatform(projectId, platformId, name, key = '', store = '', url = '[]') {
let path = '/projects/{projectId}/platforms/{platformId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{platformId}', 'g'), platformId);
return await this.client.call('put', path, {'content-type': 'application/json'},
+3 -3
View File
@@ -1,7 +1,7 @@
# [Appwrite SDK for PHP](https://appwrite.io)   [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Appwrite%20is%20a%20backend%20as%20a%20service%20for%20building%20web%20or%20mobile%20apps&url=http%3A%2F%2Fappwrite.io&via=appwrite_io&hashtags=JS%2Cjavascript%2Creactjs%2Cangular%2Cios%2Candroid)
![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.7.ee-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@@ -9,9 +9,9 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
![Appwrite](https://appwrite.io/images/github.png)
**API Version: 0.1.3**
**API Version: 0.1.7.ee**
## Installation
+1 -1
View File
@@ -96,5 +96,5 @@ GET https://appwrite.test/v1/avatars/qr
| text | string | **Required** Plain text to be converted to QR code image | |
| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 |
| margin | integer | Margin From Edge. Pass an integer between 0 to 10. Defaults to 1. | 1 |
| download | integer | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | 0 |
| download | integer | Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading the image. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | 0 |
-8
View File
@@ -32,11 +32,3 @@ GET https://appwrite.test/v1/locale/countries/phones
** List of all countries phone codes. You can use the locale header to get the data in supported language. **
## List of currencies
```http request
GET https://appwrite.test/v1/locale/currencies
```
** List of all currencies, including currency symol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in supported language. **
+1 -1
View File
@@ -215,7 +215,7 @@ PUT https://appwrite.test/v1/projects/{projectId}/platforms/{platformId}
| name | string | Platform name | |
| key | string | Package name for android or bundle ID for iOS | |
| store | string | App store or Google Play store ID | |
| url | string | Platform client URL | |
| url | string | Platform client URL | [] |
## Delete Platform
@@ -83,26 +83,6 @@ class Locale extends Service
$params = [];
return $this->client->call(Client::METHOD_GET, $path, [
], $params);
}
/**
* List of currencies
*
* List of all currencies, including currency symol, name, plural, and decimal
* digits for all major and minor currencies. You can use the locale header to
* get the data in supported language.
*
* @throws Exception
* @return array
*/
public function getCurrencies()
{
$path = str_replace([], [], '/locale/currencies');
$params = [];
return $this->client->call(Client::METHOD_GET, $path, [
], $params);
}
@@ -330,7 +330,7 @@ class Projects extends Service
* @throws Exception
* @return array
*/
public function updatePlatform($projectId, $platformId, $name, $key = '', $store = '', $url = '')
public function updatePlatform($projectId, $platformId, $name, $key = '', $store = '', $url = '[]')
{
$path = str_replace(['{projectId}', '{platformId}'], [$projectId, $platformId], '/projects/{projectId}/platforms/{platformId}');
$params = [];
+3 -3
View File
@@ -1,7 +1,7 @@
# [Appwrite SDK for Python](https://appwrite.io)   [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Appwrite%20is%20a%20backend%20as%20a%20service%20for%20building%20web%20or%20mobile%20apps&url=http%3A%2F%2Fappwrite.io&via=appwrite_io&hashtags=JS%2Cjavascript%2Creactjs%2Cangular%2Cios%2Candroid)
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.7.ee-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@@ -9,9 +9,9 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
![Appwrite](https://appwrite.io/images/github.png)
**API Version: 0.1.3**
**API Version: 0.1.7.ee**
## Installation
@@ -38,12 +38,3 @@ class Locale(Service):
return self.client.call('get', path, {
}, params)
def get_currencies(self):
"""List of currencies"""
params = {}
path = '/locale/currencies'
return self.client.call('get', path, {
}, params)
@@ -182,7 +182,7 @@ class Projects(Service):
return self.client.call('get', path, {
}, params)
def update_platform(self, project_id, platform_id, name, key='', store='', url=''):
def update_platform(self, project_id, platform_id, name, key='', store='', url='[]'):
"""Update Platform"""
params = {}
+3 -3
View File
@@ -1,7 +1,7 @@
# [Appwrite SDK for Ruby](https://appwrite.io)   [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Appwrite%20is%20a%20backend%20as%20a%20service%20for%20building%20web%20or%20mobile%20apps&url=http%3A%2F%2Fappwrite.io&via=appwrite_io&hashtags=JS%2Cjavascript%2Creactjs%2Cangular%2Cios%2Candroid)
![License](https://img.shields.io/github/license/appwrite/sdk-for-ruby.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.7.ee-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@@ -9,9 +9,9 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
![Appwrite](https://appwrite.io/images/github.png)
**API Version: 0.1.3**
**API Version: 0.1.7.ee**
## Installation
@@ -41,16 +41,6 @@ module Appwrite
}, params);
end
def get_currencies()
path = '/locale/currencies'
params = {
}
return @client.call('get', path, {
}, params);
end
protected
@@ -192,7 +192,7 @@ module Appwrite
}, params);
end
def update_platform(project_id:, platform_id:, name:, key: '', store: '', url: '')
def update_platform(project_id:, platform_id:, name:, key: '', store: '', url: '[]')
path = '/projects/{projectId}/platforms/{platformId}'
.gsub('{project_id}', project_id)
.gsub('{platform_id}', platform_id)
+1 -1
View File
@@ -140,7 +140,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AN
->setGitURL($client['gitURL'])
->setGitRepoName($client['gitRepoName'])
->setGitUserName($client['gitUserName'])
->setLogo('https://appwrite.io/v1/images/github.png')
->setLogo('https://appwrite.io/images/github.png')
->setURL('https://appwrite.io')
->setShareText('Appwrite is a backend as a service for building web or mobile apps')
->setShareURL('http://appwrite.io')
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -1,4 +1,5 @@
.box {
position: relative;
background: #ffffff;
border-radius: 10px;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.05);