lib/discourse_api/api/groups.rb in discourse_api-0.42.0 vs lib/discourse_api/api/groups.rb in discourse_api-0.43.0

- old
+ new

@@ -58,11 +58,19 @@ :membership_request_template) .to_h put("/groups/#{group_id}", group: args) end - def groups - response = get("/groups.json") + def groups(args = {}) + params = API.params(args) + .optional(:page) + .to_h + + url = "/groups.json" + if params.include?(:page) + url += "?page=#{params[:page]}" + end + response = get(url) response.body end def group(group_name) response = get("/groups/#{group_name}.json")