Module: Anakin
- Defined in:
- lib/anakin.rb,
lib/anakin/client.rb,
lib/anakin/errors.rb,
lib/anakin/version.rb,
lib/anakin/sessions.rb,
lib/anakin/countries.rb
Overview
Top-level shortcut. Equivalent to Anakin::Client.new(…).
Defined Under Namespace
Classes: AuthenticationError, Client, Error, InsufficientCreditsError, InvalidRequestError, JobFailedError, JobTimeoutError, NetworkError, RateLimitError, ServerError, Sessions
Constant Summary collapse
- DEFAULT_BASE_URL =
'https://api.anakin.io/v1'.freeze
- VERSION =
'0.1.0'- SUPPORTED_COUNTRIES =
Bundled list of supported geo-targeting countries — returned offline so callers can populate UI dropdowns without a network round-trip.
{ 'US' => 'United States', 'CA' => 'Canada', 'MX' => 'Mexico', 'GB' => 'United Kingdom', 'DE' => 'Germany', 'FR' => 'France', 'ES' => 'Spain', 'IT' => 'Italy', 'NL' => 'Netherlands', 'BE' => 'Belgium', 'CH' => 'Switzerland', 'AT' => 'Austria', 'SE' => 'Sweden', 'NO' => 'Norway', 'DK' => 'Denmark', 'FI' => 'Finland', 'IE' => 'Ireland', 'PT' => 'Portugal', 'PL' => 'Poland', 'CZ' => 'Czech Republic', 'RO' => 'Romania', 'GR' => 'Greece', 'TR' => 'Turkey', 'RU' => 'Russia', 'UA' => 'Ukraine', 'AU' => 'Australia', 'NZ' => 'New Zealand', 'JP' => 'Japan', 'KR' => 'South Korea', 'CN' => 'China', 'HK' => 'Hong Kong', 'TW' => 'Taiwan', 'SG' => 'Singapore', 'MY' => 'Malaysia', 'TH' => 'Thailand', 'VN' => 'Vietnam', 'ID' => 'Indonesia', 'PH' => 'Philippines', 'IN' => 'India', 'PK' => 'Pakistan', 'BD' => 'Bangladesh', 'AE' => 'United Arab Emirates', 'SA' => 'Saudi Arabia', 'IL' => 'Israel', 'EG' => 'Egypt', 'ZA' => 'South Africa', 'NG' => 'Nigeria', 'KE' => 'Kenya', 'BR' => 'Brazil', 'AR' => 'Argentina', 'CL' => 'Chile', 'CO' => 'Colombia', 'PE' => 'Peru', }.freeze
Class Method Summary collapse
- .new(**kwargs) ⇒ Object
-
.supported_countries ⇒ Object
Return the bundled ISO country code → display name map.
Class Method Details
.new(**kwargs) ⇒ Object
9 10 11 |
# File 'lib/anakin.rb', line 9 def self.new(**kwargs) Client.new(**kwargs) end |
.supported_countries ⇒ Object
Return the bundled ISO country code → display name map.
61 62 63 |
# File 'lib/anakin/countries.rb', line 61 def self.supported_countries SUPPORTED_COUNTRIES end |