module FileboundClient::Endpoints::Groups

Module for Groups resource endpoint

Public Class Methods

included(klass) click to toggle source

This will call macros to create resource methods on the fly

# File lib/filebound_client/endpoints/groups.rb, line 6
def self.included(klass)
  klass.instance_eval do
    allow_new :group
    allow_all :groups
  end
end

Public Instance Methods

group(group_id, query_params = nil) click to toggle source

Retrieves a single group by its key @param [int] group_id the group key @param [Hash] query_params additional query params to send in the request (optional params: filter) @return [Hash] the group hash

# File lib/filebound_client/endpoints/groups.rb, line 17
def group(group_id, query_params = nil)
  get("/groups/#{group_id}", query_params)
end
group_projects(group_id, query_params = nil) click to toggle source

Retrieves projects assigned to the group @param [int] group_id the group key @param [Hash] query_params additional query params to send in the request (option params: filter) @return [Hash] the group hash

# File lib/filebound_client/endpoints/groups.rb, line 25
def group_projects(group_id, query_params = nil)
  get("/groups/#{group_id}/projects", query_params)
end