Module: Skittles::Client::Event

Included in:
Skittles::Client
Defined in:
lib/skittles/client/event.rb

Overview

Define methods related to events.

Instance Method Summary collapse

Instance Method Details

#event(id) ⇒ Hashie::Mash

Get details of an event.

Parameters:

  • id

    The id of the event to retrieve additional information for.

Returns:

  • (Hashie::Mash)

    An event object.

See Also:


12
13
14
# File 'lib/skittles/client/event.rb', line 12

def event(id)
  get("events/#{id}").event
end

#event_categoriesHashie::Mash

Get a hierachical list of categoires applied to events.

Returns:

  • (Hashie::Mash)

    An array of categories.

See Also:


33
34
35
# File 'lib/skittles/client/event.rb', line 33

def event_categories
  get('events/categories').categories
end

#event_search(domain, id) ⇒ Hashie::Mash

Note:

This is an experimental API.

Get a list of events matching the search parameters.

Parameters:

  • domain

    Identifier for a known third-party event provider.

  • id

    Identifier used by third-party.

Returns:

  • (Hashie::Mash)

    An array of event objects.

See Also:


24
25
26
# File 'lib/skittles/client/event.rb', line 24

def event_search(domain, id)
  get('events/search', { :domain => domain, :id => id }).event
end