1
0
Fork 0
mirror of synced 2024-05-29 17:09:48 +12:00

Updated SKDs

This commit is contained in:
eldadfux 2019-08-19 13:31:06 +03:00
parent caf4110f36
commit 6979a6c98a
40 changed files with 788 additions and 649 deletions

View file

@ -130,4 +130,19 @@ $utopia->get('/v1/locale/countries/phones')
$response->json($list);
}
);
$utopia->get('/v1/locale/currencies')
->desc('List of currencies')
->label('scope', 'locale.read')
->label('sdk.namespace', 'locale')
->label('sdk.method', 'getCurrencies')
->label('sdk.description', '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.')
->action(
function() use ($response)
{
$currencies = include __DIR__ . '/../config/currencies.php';
$response->json($currencies);
}
);

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-v0.0.0dev-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@ -11,7 +11,7 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
**API Version: v0.0.0dev**
**API Version: 0.1.3**
## Installation

View file

@ -0,0 +1,14 @@
let sdk = new Appwrite();
sdk
setProject('')
setKey('')
;
let promise = sdk.locale.getCurrencies();
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});

View file

@ -5,7 +5,7 @@ sdk
setKey('')
;
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1);
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);
promise.then(function (response) {
console.log(response);

View file

@ -5,7 +5,7 @@ sdk
setKey('')
;
let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com');
let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com');
promise.then(function (response) {
console.log(response);

View file

@ -5,7 +5,7 @@ sdk
setKey('')
;
let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 0);
let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 1);
promise.then(function (response) {
console.log(response);

View file

@ -2,7 +2,7 @@
"name": "appwrite",
"homepage": "https://appwrite.io/support",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"version": "v1.0.12",
"version": "v1.0.14",
"license": "BSD-3-Clause",
"main": "src/sdk.js",
"repository": {

View file

@ -132,7 +132,7 @@
globalParams.push({key: key, value: value});
};
addGlobalHeader('x-sdk-version', 'appwrite:javascript:v1.0.12');
addGlobalHeader('x-sdk-version', 'appwrite:javascript:v1.0.14');
addGlobalHeader('content-type', '');
/**
@ -1341,7 +1341,8 @@
* List EU Countries
*
* List of all countries that are currently members of the EU. You can use the
* locale header to get the data in supported language.
* locale header to get the data in supported language. UK brexit date is
* currently set to 2019-10-31 and will be updated if and when needed.
*
* @throws {Error}
* @return {Promise} */
@ -1365,6 +1366,24 @@
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'},
{
@ -1786,7 +1805,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"');
}

View file

@ -1,5 +1,5 @@
(function(window){window.Appwrite=function(){let config={endpoint:'https://appwrite.test/v1',project:'',key:'',locale:'',mode:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setKey=function(value){http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let setMode=function(value){http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(params.hasOwnProperty(p)){str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]))}}
return str.join("&")};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()}};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value})};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.12');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name')}
return str.join("&")};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()}};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value})};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.14');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name')}
if(typeof path!=='string'){throw new Error('var path must be of type string')}
if(typeof headers!=='object'){throw new Error('var headers must be of type object')}
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value)}
@ -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'},{})}};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'},{})},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"')}
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"')}

View file

@ -1,7 +1,7 @@
# [Appwrite SDK for NodeJS](https://appwrite.io) &nbsp; [![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-v0.0.0dev-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@ -11,7 +11,7 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
**API Version: v0.0.0dev**
**API Version: 0.1.3**
## Installation

View file

@ -0,0 +1,14 @@
let sdk = new Appwrite();
sdk
setProject('')
setKey('')
;
let promise = sdk.locale.getCurrencies();
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});

View file

@ -5,7 +5,7 @@ sdk
setKey('')
;
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1);
let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);
promise.then(function (response) {
console.log(response);

View file

@ -5,7 +5,7 @@ sdk
setKey('')
;
let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com');
let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com');
promise.then(function (response) {
console.log(response);

View file

@ -5,7 +5,7 @@ sdk
setKey('')
;
let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 0);
let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 1);
promise.then(function (response) {
console.log(response);

View file

@ -7,7 +7,7 @@ class Client {
this.endpoint = 'https://appwrite.test/v1';
this.headers = {
'content-type': '',
'x-sdk-version': 'appwrite:nodejs:v1.0.19',
'x-sdk-version': 'appwrite:nodejs:v1.0.20',
};
this.selfSigned = false;
}

View file

@ -42,7 +42,8 @@ class Locale extends Service {
* List EU Countries
*
* List of all countries that are currently members of the EU. You can use the
* locale header to get the data in supported language.
* locale header to get the data in supported language. UK brexit date is
* currently set to 2019-10-31 and will be updated if and when needed.
*
* @throws Exception
* @return {}
@ -71,6 +72,24 @@ 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;

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'},

View file

@ -2,7 +2,7 @@
"name": "node-appwrite",
"homepage": "https://appwrite.io/support",
"description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"version": "v1.0.19",
"version": "v1.0.20",
"license": "BSD-3-Clause",
"main": "index.js",
"repository": {

View file

@ -1,7 +1,7 @@
# [Appwrite SDK for PHP](https://appwrite.io) &nbsp; [![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-v0.0.0dev-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@ -11,7 +11,7 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
**API Version: v0.0.0dev**
**API Version: 0.1.3**
## Installation

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 &#039;Content-Disposition: attachment &#039; 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 |
| download | integer | Return resulting image with &#039;Content-Disposition: attachment &#039; headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0. | 0 |

View file

@ -0,0 +1,15 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Locale;
$client = new Client();
$client
setProject('')
setKey('')
;
$locale = new Locale($client);
$result = $locale->getCurrencies();

View file

@ -12,4 +12,4 @@ $client
$projects = new Projects($client);
$result = $projects->createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1);
$result = $projects->createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0);

View file

@ -12,4 +12,4 @@ $client
$projects = new Projects($client);
$result = $projects->updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com');
$result = $projects->updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com');

View file

@ -12,4 +12,4 @@ $client
$projects = new Projects($client);
$result = $projects->updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 0);
$result = $projects->updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 1);

View file

@ -22,7 +22,7 @@ GET https://appwrite.test/v1/locale/countries
GET https://appwrite.test/v1/locale/countries/eu
```
** List of all countries that are currently members of the EU. You can use the locale header to get the data in supported language. **
** List of all countries that are currently members of the EU. You can use the locale header to get the data in supported language. UK brexit date is currently set to 2019-10-31 and will be updated if and when needed. **
## List Countries Phone Codes
@ -32,3 +32,11 @@ 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. **

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

View file

@ -37,7 +37,7 @@ class Client
*/
protected $headers = [
'content-type' => '',
'x-sdk-version' => 'appwrite:php:v1.0.2',
'x-sdk-version' => 'appwrite:php:v1.0.3',
];
/**

View file

@ -52,7 +52,8 @@ class Locale extends Service
* List EU Countries
*
* List of all countries that are currently members of the EU. You can use the
* locale header to get the data in supported language.
* locale header to get the data in supported language. UK brexit date is
* currently set to 2019-10-31 and will be updated if and when needed.
*
* @throws Exception
* @return array
@ -82,6 +83,26 @@ 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);
}

View file

@ -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 = [];

View file

@ -1,7 +1,7 @@
# [Appwrite SDK for Python](https://appwrite.io) &nbsp; [![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-v0.0.0dev-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@ -11,7 +11,7 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
**API Version: v0.0.0dev**
**API Version: 0.1.3**
## Installation

View file

@ -38,3 +38,12 @@ 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)

View file

@ -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 = {}

View file

@ -1,7 +1,7 @@
# [Appwrite SDK for Ruby](https://appwrite.io) &nbsp; [![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-v0.0.0dev-blue.svg?v=1)
![Version](https://img.shields.io/badge/api%20version-0.1.3-blue.svg?v=1)
**WORK IN PROGRESS - NOT READY FOR USAGE**
@ -11,7 +11,7 @@ Appwrite backend as a service cuts up to 70% of the time and costs required for
![Appwrite](https://appwrite.io/v1/images/github.png)
**API Version: v0.0.0dev**
**API Version: 0.1.3**
## Installation

View file

@ -41,6 +41,16 @@ module Appwrite
}, params);
end
def get_currencies()
path = '/locale/currencies'
params = {
}
return @client.call('get', path, {
}, params);
end
protected

View file

@ -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)

View file

@ -38,7 +38,7 @@ $cli
$clients = [
'php' => [
'version' => 'v1.0.2',
'version' => 'v1.0.3',
'result' => __DIR__ . '/../sdks/php/',
'gitURL' => 'https://github.com/appwrite/sdk-for-php.git',
'gitRepo' => 'git@github.com:appwrite/sdk-for-php.git',
@ -46,7 +46,7 @@ $cli
'gitUserName' => 'appwrite',
],
'js' => [
'version' => 'v1.0.12',
'version' => 'v1.0.14',
'result' => __DIR__ . '/../sdks/js/',
'gitURL' => 'https://github.com/appwrite/sdk-for-js.git',
'gitRepo' => 'git@github.com:appwrite/sdk-for-js.git',
@ -54,7 +54,7 @@ $cli
'gitUserName' => 'appwrite',
],
'node' => [
'version' => 'v1.0.19',
'version' => 'v1.0.20',
'result' => __DIR__ . '/../sdks/node/',
'gitURL' => 'https://github.com/appwrite/sdk-for-node.git',
'gitRepo' => 'git@github.com:appwrite/sdk-for-node.git',

1199
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,12 +4,12 @@
"license": "BSD-3-Clause",
"repository": "public",
"devDependencies": {
"appwrite": "^1.0.12",
"appwrite": "^1.0.13",
"gulp": "^4.0.0",
"gulp-clean-css": "^4.0.0",
"gulp-concat": "2.5.2",
"gulp-jsmin": "^0.1.5",
"gulp-less": "^4.0.1",
"jest": "^24.7.1"
"jest": "^24.9.0"
}
}

View file

@ -4,7 +4,7 @@
{http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this;};let setLocale=function(value)
{http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this;};let setMode=function(value)
{http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this;};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&amp;|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href;};let buildQuery=function(params){let str=[];for(let p in params){if(params.hasOwnProperty(p)){str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]));}}
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.12');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.13');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
if(typeof path!=='string'){throw new Error('var path must be of type string');}
if(typeof headers!=='object'){throw new Error('var headers must be of type object');}
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value);}
@ -88,7 +88,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"');}

View file

@ -4,7 +4,7 @@
{http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this;};let setLocale=function(value)
{http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this;};let setMode=function(value)
{http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this;};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&amp;|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href;};let buildQuery=function(params){let str=[];for(let p in params){if(params.hasOwnProperty(p)){str.push(encodeURIComponent(p)+"="+encodeURIComponent(params[p]));}}
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.12');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
return str.join("&");};let addGlobalHeader=function(key,value){globalHeaders[key]={key:key.toLowerCase(),value:value.toLowerCase()};};let addGlobalParam=function(key,value){globalParams.push({key:key,value:value});};addGlobalHeader('x-sdk-version','appwrite:javascript:v1.0.13');addGlobalHeader('content-type','');let call=function(method,path,headers={},params={},progress=null){let i;path=config.endpoint+path;if(-1===['GET','POST','PUT','DELETE','TRACE','HEAD','OPTIONS','CONNECT','PATCH'].indexOf(method)){throw new Error('var method must contain a valid HTTP method name');}
if(typeof path!=='string'){throw new Error('var path must be of type string');}
if(typeof headers!=='object'){throw new Error('var headers must be of type object');}
for(i=0;i<globalParams.length;i++){path=addParam(path,globalParams[i].key,globalParams[i].value);}
@ -88,7 +88,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"');}