lib/discourse_api/api/groups.rb in discourse_api-0.37.0 vs lib/discourse_api/api/groups.rb in discourse_api-0.38.0
- old
+ new
@@ -105,15 +105,21 @@
def delete_group(group_id)
delete("/admin/groups/#{group_id}.json")
end
def group_members(group_name, params = {})
+ options = params
params = API.params(params)
.optional(:offset, :limit)
.default(offset: 0, limit: 100)
.to_h
response = get("/groups/#{group_name}/members.json", params)
- response.body['members']
+
+ if options[:all] == true
+ response.body
+ else
+ response.body['members']
+ end
end
def group_set_user_notification_level(group, user_id, notification_level)
post("/groups/#{group}/notifications?user_id=#{user_id}¬ification_level=#{notification_level}")
end