lib/fastly/client.rb in fastly-1.00 vs lib/fastly/client.rb in fastly-1.01

- old
+ new

@@ -60,9 +60,15 @@ resp = self.http.get(path, headers) return nil if 404 == resp.status raise Fastly::Error, resp.message unless resp.success? JSON.parse(resp.body) end + + def get_stats(path, params={}) + content = get(path, params) + raise Fastly::Error, content["message"] unless content["status"] == 'success' + content["data"] + end def post(path, params={}) post_and_put(:post, path, params) end \ No newline at end of file