Module: FileboundClient::Endpoints::Groups
- Defined in:
- lib/filebound_client/endpoints/groups.rb
Overview
Module for Groups resource endpoint
Class Method Summary collapse
-
.included(klass) ⇒ Object
This will call macros to create resource methods on the fly.
Instance Method Summary collapse
-
#group(group_id, query_params = nil) ⇒ Hash
Retrieves a single group by its key.
-
#group_projects(group_id, query_params = nil) ⇒ Hash
Retrieves projects assigned to the group.
Class Method Details
.included(klass) ⇒ Object
This will call macros to create resource methods on the fly
6 7 8 9 10 11 |
# 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 |
Instance Method Details
#group(group_id, query_params = nil) ⇒ Hash
Retrieves a single group by its key
17 18 19 |
# 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) ⇒ Hash
Retrieves projects assigned to the group
25 26 27 |
# 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 |