1
0
Fork 0
mirror of synced 2024-09-10 14:46:56 +12:00
appwrite/app/sdks/node/lib/services/locale.js
2019-10-09 07:16:38 +03:00

86 lines
No EOL
1.8 KiB
JavaScript

const Service = require('../service.js');
class Locale extends Service {
/**
* Get User Locale
*
* /docs/references/locale/get-locale.md
*
* @throws Exception
* @return {}
*/
async getLocale() {
let path = '/locale';
return await this.client.call('get', path, {'content-type': 'application/json'},
{
});
}
/**
* List Countries
*
* /docs/references/locale/get-countires.md
*
* @throws Exception
* @return {}
*/
async getCountries() {
let path = '/locale/countries';
return await this.client.call('get', path, {'content-type': 'application/json'},
{
});
}
/**
* List EU Countries
*
* /docs/references/locale/get-countries-eu.md
*
* @throws Exception
* @return {}
*/
async getCountriesEU() {
let path = '/locale/countries/eu';
return await this.client.call('get', path, {'content-type': 'application/json'},
{
});
}
/**
* List Countries Phone Codes
*
* /docs/references/locale/get-countries-phones.md
*
* @throws Exception
* @return {}
*/
async getCountriesPhones() {
let path = '/locale/countries/phones';
return await this.client.call('get', path, {'content-type': 'application/json'},
{
});
}
/**
* List of currencies
*
* /docs/references/locale/get-currencies.md
*
* @throws Exception
* @return {}
*/
async getCurrencies() {
let path = '/locale/currencies';
return await this.client.call('get', path, {'content-type': 'application/json'},
{
});
}
}
module.exports = Locale;