Class: Forem::Services::OrganizationService
- Inherits:
-
BaseService
- Object
- BaseService
- Forem::Services::OrganizationService
- Defined in:
- lib/forem/services/organization_service.rb
Overview
Service for interacting with the Forem Organizations API.
Access via Client#organizations. All methods inject the client's requestor automatically so no additional configuration is required.
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Organization
Create a new organization.
-
#delete(id, opts = {}) ⇒ nil
Delete an organization.
-
#list(params = {}, opts = {}) ⇒ Array<Organization>
List all organizations.
-
#retrieve(id, opts = {}) ⇒ Organization
Retrieve a single organization by its numeric ID.
-
#update(id, params = {}, opts = {}) ⇒ Organization
Update an existing organization.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Forem::Services::BaseService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Organization
Create a new organization.
52 53 54 |
# File 'lib/forem/services/organization_service.rb', line 52 def create(params = {}, opts = {}) Organization.create(params, opts_with_requestor(opts)) end |
#delete(id, opts = {}) ⇒ nil
Delete an organization.
98 99 100 |
# File 'lib/forem/services/organization_service.rb', line 98 def delete(id, opts = {}) Organization.delete(id, opts_with_requestor(opts)) end |
#list(params = {}, opts = {}) ⇒ Array<Organization>
List all organizations.
28 29 30 |
# File 'lib/forem/services/organization_service.rb', line 28 def list(params = {}, opts = {}) Organization.list(params, opts_with_requestor(opts)) end |
#retrieve(id, opts = {}) ⇒ Organization
Retrieve a single organization by its numeric ID.
66 67 68 |
# File 'lib/forem/services/organization_service.rb', line 66 def retrieve(id, opts = {}) Organization.retrieve(id, opts_with_requestor(opts)) end |
#update(id, params = {}, opts = {}) ⇒ Organization
Update an existing organization.
84 85 86 |
# File 'lib/forem/services/organization_service.rb', line 84 def update(id, params = {}, opts = {}) Organization.update(id, params, opts_with_requestor(opts)) end |