Module: Karatekit::Client::Locations

Included in:
Karatekit::Client
Defined in:
lib/karatekit/client/locations.rb

Overview

Methods for the Locations API

See Also:

Instance Method Summary collapse

Instance Method Details

#location(id, options = {}) ⇒ Sawyer::Resource

Get a single location

Parameters:

  • id (Integer)

    ID of the location

Returns:

  • (Sawyer::Resource)

    A single location

See Also:



22
23
24
# File 'lib/karatekit/client/locations.rb', line 22

def location(id, options = {})
  get "locations/#{id}", options
end

#locations(options = {}) ⇒ Array<Sawyer::Resource>

List locations

Returns:

  • (Array<Sawyer::Resource>)

    An array of hashes representing locations

See Also:



13
14
15
# File 'lib/karatekit/client/locations.rb', line 13

def locations(options = {})
  paginate "locations", options
end