Module: BWAPI::Client::Locations

Included in:
BWAPI::Client
Defined in:
lib/bwapi/client/locations.rb

Overview

Location module for locations endpoints

Instance Method Summary collapse

Instance Method Details

#location(location_code) ⇒ Hash

Request the information for a given location code

Returns:

  • (Hash)

    Information about the location



8
9
10
# File 'lib/bwapi/client/locations.rb', line 8

def location(location_code)
  get "locations/#{location_code}"
end

#locations(opts = {}) ⇒ Hash

Locations a location name with candidates

Parameters:

  • opts (String) (defaults to: {})

    prefix that the location starts with

Options Hash (opts):

  • a (Array)

    list of location types to return

  • page (Integer)

    number of results to retrieve

  • pageSize (Integer)

    of the results to retrieve

Returns:

  • (Hash)

    The list of matching locations



19
20
21
# File 'lib/bwapi/client/locations.rb', line 19

def locations(opts = {})
  get 'locations', opts
end