module Aucklandia::Notifications
Constants
- NOTIFICATIONS_ENDPOINT
Public Instance Methods
get_notifications()
click to toggle source
# File lib/aucklandia/notifications.rb, line 5 def get_notifications url = build_url(BASE_URL, NOTIFICATIONS_ENDPOINT) response = get(url) JSON.parse(response)['response'] end
get_notifications_by_category(category)
click to toggle source
# File lib/aucklandia/notifications.rb, line 13 def get_notifications_by_category(category) url = build_url(BASE_URL, NOTIFICATIONS_ENDPOINT, '/', category) response = get(url) JSON.parse(response)['response'] end
get_notifications_by_stop_id(stop_id)
click to toggle source
# File lib/aucklandia/notifications.rb, line 21 def get_notifications_by_stop_id(stop_id) url = build_url(BASE_URL, NOTIFICATIONS_ENDPOINT, '/stop/', stop_id) response = get(url) data = JSON.parse(response) data.has_key?('response') ? data['response'] : [] end