lib/fastly.rb in fastly-1.14.0 vs lib/fastly.rb in fastly-1.15.0

- old
+ new

@@ -126,10 +126,12 @@ client.get_stats(url, opts) end # Returns usage information aggregated across all Fastly services and grouped by region. # + # If the :by_month flag is passed then returns total usage information aggregated by month as well as grouped by service & region. + # # If the :by_service flag is passed then returns usage information aggregated by service and grouped by service & region. # # Other options available are: # # from:: earliest time from which to fetch historical statistics @@ -138,9 +140,10 @@ # region:: restrict query to a particular region # # See http://docs.fastly.com/docs/stats for details. def usage(opts) url = '/stats/usage' + url += '_by_month' if opts.delete(:by_month) url += '_by_service' if opts.delete(:by_service) client.get_stats(url, opts) end # Fetches the list of codes for regions that are covered by the Fastly CDN service.