Sha256: 7229f628bcbeb41fa0264de368be035824ce1d610def9fcc9b5bf8c322fd7eff

Contents?: true

Size: 589 Bytes

Versions: 2

Compression:

Stored size: 589 Bytes

Contents

module Upcoming
  class State
    include Upcoming::Defaults
    
    # +state_id+ (Required)
    # The state_id number of the state to look within. State ID's are referenced in other methods, such as metro.getStateList and metro.getInfo. To run getInfo on multiple states, simply pass an array or a comma-separated list of state_id numbers.
    #
    def self.info(state_id)
      state_id = state_id.join(',') if state_id.is_a?(Array)
      Mash.new(self.get('/', :query => {:method => 'state.getInfo', :state_id => state_id}.merge(Upcoming.default_options))).rsp.state
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
squeejee-upcoming-events-0.0.1 lib/upcoming/state.rb
upcoming-events-0.0.1 lib/upcoming/state.rb