Class: Syncano::Resources::Project
- Defined in:
- lib/syncano/resources/project.rb
Overview
Project resource
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#authorize(api_client_id, permission) ⇒ Syncano::Resources::Base
Wrapper for api “authorize” method.
-
#batch_authorize(batch_client, api_client_id, permission) ⇒ Syncano::Resources::Base
Wrapper for api “authorize” method.
-
#batch_deauthorize(batch_client, api_client_id, permission) ⇒ Syncano::Resources::Base
Wrapper for api “deauthorize” method.
-
#collections ⇒ Syncano::QueryBuilder
Association has_many :collections.
-
#deauthorize(api_client_id, permission) ⇒ Syncano::Resources::Base
Wrapper for api “deauthorize” method.
-
#subscribe ⇒ Syncano::Resource::Project
Wrapper for api “subscription.subscribe_project” method.
-
#unsubscribe ⇒ Syncano::Resource::Project
Wrapper for api “subscription.unsubscribe_project” method.
Methods inherited from Base
#[], #[]=, all, #batch, batch_create, #batch_destroy, #batch_save, #batch_update, count, create, #destroy, #destroyed?, find, #initialize, #new_record?, #reload!, #save, #saved?, #update
Constructor Details
This class inherits a constructor from Syncano::Resources::Base
Instance Method Details
#authorize(api_client_id, permission) ⇒ Syncano::Resources::Base
Wrapper for api “authorize” method
29 30 31 32 |
# File 'lib/syncano/resources/project.rb', line 29 def (api_client_id, ) (nil, api_client_id: api_client_id, permission: ) self end |
#batch_authorize(batch_client, api_client_id, permission) ⇒ Syncano::Resources::Base
Wrapper for api “authorize” method
39 40 41 42 |
# File 'lib/syncano/resources/project.rb', line 39 def (batch_client, api_client_id, ) (batch_client, api_client_id: api_client_id, permission: ) self end |
#batch_deauthorize(batch_client, api_client_id, permission) ⇒ Syncano::Resources::Base
Wrapper for api “deauthorize” method
58 59 60 61 |
# File 'lib/syncano/resources/project.rb', line 58 def (batch_client, api_client_id, ) (batch_client, api_client_id: api_client_id, permission: ) self end |
#collections ⇒ Syncano::QueryBuilder
Association has_many :collections
7 8 9 |
# File 'lib/syncano/resources/project.rb', line 7 def collections ::Syncano::QueryBuilder.new(client, ::Syncano::Resources::Collection, project_id: id) end |
#deauthorize(api_client_id, permission) ⇒ Syncano::Resources::Base
Wrapper for api “deauthorize” method
48 49 50 51 |
# File 'lib/syncano/resources/project.rb', line 48 def (api_client_id, ) (nil, api_client_id: api_client_id, permission: ) self end |
#subscribe ⇒ Syncano::Resource::Project
Wrapper for api “subscription.subscribe_project” method
13 14 15 16 |
# File 'lib/syncano/resources/project.rb', line 13 def subscribe perform_subscribe reload! end |
#unsubscribe ⇒ Syncano::Resource::Project
Wrapper for api “subscription.unsubscribe_project” method
20 21 22 23 |
# File 'lib/syncano/resources/project.rb', line 20 def unsubscribe perform_unsubscribe reload! end |