import 'package:dio/dio.dart'; import 'package:meta/meta.dart'; import "../client.dart"; import '../enums.dart'; import "../service.dart"; class Locale extends Service { Locale(Client client): super(client); /// 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](https://db-ip.com)) Future get() { final String path = '/locale'; final Map params = { }; return client.call(HttpMethod.get, path: path, params: params); } /// List of all continents. You can use the locale header to get the data in a /// supported language. Future getContinents() { final String path = '/locale/continents'; final Map params = { }; return client.call(HttpMethod.get, path: path, params: params); } /// List of all countries. You can use the locale header to get the data in a /// supported language. Future getCountries() { final String path = '/locale/countries'; final Map params = { }; return client.call(HttpMethod.get, path: path, params: params); } /// 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. Future getCountriesEU() { final String path = '/locale/countries/eu'; final Map params = { }; return client.call(HttpMethod.get, path: path, params: params); } /// List of all countries phone codes. You can use the locale header to get the /// data in a supported language. Future getCountriesPhones() { final String path = '/locale/countries/phones'; final Map params = { }; return client.call(HttpMethod.get, path: path, params: params); } /// 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 a supported language. Future getCurrencies() { final String path = '/locale/currencies'; final Map params = { }; return client.call(HttpMethod.get, path: path, params: params); } }