lib/xcal/parktronic/routes/event_history_items.rb in xcal-parktronic-1.0.0 vs lib/xcal/parktronic/routes/event_history_items.rb in xcal-parktronic-1.0.1
- old
+ new
@@ -15,19 +15,17 @@
# ==== Examples
# api.get_paged_event_history_items
# api.events_history(host_impacted: 'google.com', service_impacted: 'http')
def get_paged_event_history_items(args = {})
args.merge!(access_token: access_token)
- response = http.get("/#{api_version}/events_history?#{URI.encode_www_form(args)}")
+ response = get_response("/#{api_version}/events_history?#{URI.encode_www_form(args)}")
generic_response = Xcal::Parktronic::GenericResponse.new(response.body)
if response.code == '200' && generic_response.has_key?(:event_history_items)
generic_response.event_history_items.map { |history| Xcal::Parktronic::GenericResponse.new(history.event_history_item, self) }
else
generic_response
end
-
- # TODO Add caching
end
alias :events_history :get_paged_event_history_items
end
end