lib/pixela/graph.rb in pixela-1.1.0 vs lib/pixela/graph.rb in pixela-1.2.0

- old
+ new

@@ -132,11 +132,25 @@ # @raise [Pixela::PixelaError] API is failed # # @see https://docs.pixe.la/#/get-graph-pixels # # @example - # client.get_pixels(graph_id: "test-graph", from: Date.new(2018, 1, 1), to: Date.new(2018, 12, 31)) + # client.graph("test-graph").pixel_dates(from: Date.new(2018, 1, 1), to: Date.new(2018, 12, 31)) def pixel_dates(from: nil, to: nil) client.get_pixel_dates(graph_id: graph_id, from: from, to: to) + end + + # Based on the registered information, get various statistics. + # + # @return [Pixela::Response] + # + # @raise [Pixela::PixelaError] API is failed + # + # @see https://docs.pixe.la/#/get-graph-stats + # + # @example + # client.graph("test-graph").stats + def stats + client.get_graph_stats(graph_id: graph_id) end end end