class Appwrite::Locale
Public Instance Methods
Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
([IP Geolocation by DB-IP](db-ip.com))
@return [Locale]
# File lib/appwrite/services/locale.rb, line 15 def get() path = '/locale' params = { } headers = { "content-type": 'application/json', } @client.call( method: 'GET', path: path, headers: headers, params: params, response_type: Models::Locale ) end
List of all continents. You can use the locale header to get the data in a supported language.
@return [ContinentList]
# File lib/appwrite/services/locale.rb, line 39 def get_continents() path = '/locale/continents' params = { } headers = { "content-type": 'application/json', } @client.call( method: 'GET', path: path, headers: headers, params: params, response_type: Models::ContinentList ) end
List of all countries. You can use the locale header to get the data in a supported language.
@return [CountryList]
# File lib/appwrite/services/locale.rb, line 63 def get_countries() path = '/locale/countries' params = { } headers = { "content-type": 'application/json', } @client.call( method: 'GET', path: path, headers: headers, params: params, response_type: Models::CountryList ) end
List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
@return [CountryList]
# File lib/appwrite/services/locale.rb, line 87 def get_countries_eu() path = '/locale/countries/eu' params = { } headers = { "content-type": 'application/json', } @client.call( method: 'GET', path: path, headers: headers, params: params, response_type: Models::CountryList ) end
List of all countries phone codes. You can use the locale header to get the data in a supported language.
@return [PhoneList]
# File lib/appwrite/services/locale.rb, line 111 def get_countries_phones() path = '/locale/countries/phones' params = { } headers = { "content-type": 'application/json', } @client.call( method: 'GET', path: path, headers: headers, params: params, response_type: Models::PhoneList ) end
List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
@return [CurrencyList]
# File lib/appwrite/services/locale.rb, line 136 def get_currencies() path = '/locale/currencies' params = { } headers = { "content-type": 'application/json', } @client.call( method: 'GET', path: path, headers: headers, params: params, response_type: Models::CurrencyList ) end
List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
@return [LanguageList]
# File lib/appwrite/services/locale.rb, line 160 def get_languages() path = '/locale/languages' params = { } headers = { "content-type": 'application/json', } @client.call( method: 'GET', path: path, headers: headers, params: params, response_type: Models::LanguageList ) end