class Syncano::Resources::Project
Project
resource
Public Instance Methods
collections()
click to toggle source
Association has_many :collections @return [Syncano::QueryBuilder] query builder for resource Syncano::Resources::Collection
# File lib/syncano/resources/project.rb, line 7 def collections ::Syncano::QueryBuilder.new(client, ::Syncano::Resources::Collection, project_id: id) end
subscribe()
click to toggle source
Wrapper for api “subscription.subscribe_project” method @return [Syncano::Resource::Project]
# File lib/syncano/resources/project.rb, line 13 def subscribe perform_subscribe reload! end
unsubscribe()
click to toggle source
Wrapper for api “subscription.unsubscribe_project” method @return [Syncano::Resource::Project]
# File lib/syncano/resources/project.rb, line 20 def unsubscribe perform_unsubscribe reload! end
Private Instance Methods
perform_subscribe()
click to toggle source
Executes proper subscribe request @return [Syncano::Response]
# File lib/syncano/resources/project.rb, line 67 def perform_subscribe check_if_sync_client! client.make_request(:subscription, :subscribe_project, { project_id: id }) end
perform_unsubscribe()
click to toggle source
Executes proper unsubscribe request @return [Syncano::Response]
# File lib/syncano/resources/project.rb, line 74 def perform_unsubscribe check_if_sync_client! client.make_request(:subscription, :unsubscribe_project, { project_id: id }) end