class Eventick::API
Public Instance Methods
attendees(token, event_id)
click to toggle source
# File lib/eventick.rb, line 25 def attendees(token, event_id) response = get("/events/#{event_id}/attendees.json", token) response.parsed_response['attendees'] end
event(token, id)
click to toggle source
# File lib/eventick.rb, line 20 def event(token, id) response = get("/events/#{id}.json", token) response.parsed_response['events'] end
events(token)
click to toggle source
# File lib/eventick.rb, line 15 def events(token) response = get('/events.json', token) response.parsed_response['events'] end
token(email, password)
click to toggle source
# File lib/eventick.rb, line 10 def token(email, password) response = get('/tokens.json', email, password) response.parsed_response['token'] end
Private Instance Methods
get(path, username, password = nil)
click to toggle source
# File lib/eventick.rb, line 31 def get(path, username, password = nil) auth = { username: username, password: password } self.class.get(path, basic_auth: auth) end