Class: AlPapi::Locales

Inherits:
Object
  • Object
show all
Defined in:
lib/al_papi/locales.rb

Class Method Summary collapse

Class Method Details

.description(engine = 'google', locale = 'en-us') ⇒ Object

Get further metadata on a specific locale for an engine.

Parameters:

  • engine (String) (defaults to: 'google')

    Defaults to google.

  • locale (String) (defaults to: 'en-us')

    Defaults to en-us.



19
20
21
# File 'lib/al_papi/locales.rb', line 19

def self.description(engine = 'google', locale = 'en-us')
  AlPapi.http.get "/supported/#{engine}/#{locale.downcase}"
end

.supported(engine = 'google') ⇒ Object

Get supported locales for specified engine.

Parameters:

  • engine (String) (defaults to: 'google')

    Defaults to google. Returns Partner API supported locales for engine or not supported message.



9
10
11
# File 'lib/al_papi/locales.rb', line 9

def self.supported(engine = 'google')
  AlPapi.http.get "/supported/#{engine}"
end