lib/gerry/client/groups.rb in gerry-0.0.3 vs lib/gerry/client/groups.rb in gerry-0.0.4

- old
+ new

@@ -11,12 +11,27 @@ get(url) end # Get all members for a group # + # @param [Array] options the query parameters # @return [Array] the members - def group_members(group_id) + def group_members(group_id, options = []) url = "/groups/#{group_id}/members/" + + if options.empty? + return get(url) + end + + options = map_options(options) + get("#{url}?#{options}") + end + + # Get the directly included groups of a group + # + # @return [Array] the included groups + def included_groups(group_id) + url = "/groups/#{group_id}/groups/" get(url) end # Create a new group # \ No newline at end of file