Module: ApbShuttleApi

Defined in:
lib/apb_shuttle_api.rb,
lib/apb_shuttle_api/version.rb

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.all(limit = nil) ⇒ Object



18
19
20
# File 'lib/apb_shuttle_api.rb', line 18

def self.all(limit = nil)
  get_all({limit: limit})
end

.all_apb(limit = nil) ⇒ Object



22
23
24
# File 'lib/apb_shuttle_api.rb', line 22

def self.all_apb(limit = nil)
  get_all({kind: 'apb', limit: limit})
end

.all_orange(limit = nil) ⇒ Object



26
27
28
# File 'lib/apb_shuttle_api.rb', line 26

def self.all_orange(limit = nil)
  get_all({kind: 'orange', limit: limit})
end

.infoObject



30
31
32
# File 'lib/apb_shuttle_api.rb', line 30

def self.info
  JSON.load(open("#{@base_url}/info.json"))
end

.next(next_num = 1) ⇒ Object



14
15
16
# File 'lib/apb_shuttle_api.rb', line 14

def self.next(next_num = 1)
  JSON.load(open("#{@base_url}/next/#{next_num}.json"))
end

.nowObject



10
11
12
# File 'lib/apb_shuttle_api.rb', line 10

def self.now
  JSON.load(open("#{@base_url}/now.json"))
end