Class: Ribose::Conversation
- Includes:
- Actions::All, Actions::Create, Actions::Delete, Actions::Fetch, Actions::Update
- Defined in:
- lib/ribose/conversation.rb
Class Method Summary collapse
-
.all(space_id, options = {}) ⇒ Array <Sawyer::Resource>
Listing Space Conversations.
-
.create(space_id, attributes) ⇒ Sawyer::Resource
Create A New Conversation.
-
.destroy(space_id:, conversation_id:, **opts) ⇒ Object
Remove a conversation.
-
.fetch(space_id, conversation_id, options = {}) ⇒ Sawyer::Resource
Fetch a conversation.
-
.update(space_id, conversation_id, attributes = {}) ⇒ Sawyer::Resource
Update a conversation.
Methods included from Actions::Delete
Methods included from Actions::Base
Methods included from Actions::Update
Methods included from Actions::Create
Methods included from Actions::Fetch
Methods included from Actions::All
Methods inherited from Base
Methods included from ResourceHelper
#resource_key, #resource_path, #resources
Constructor Details
This class inherits a constructor from Ribose::Base
Class Method Details
.all(space_id, options = {}) ⇒ Array <Sawyer::Resource>
Listing Space Conversations
15 16 17 |
# File 'lib/ribose/conversation.rb', line 15 def self.all(space_id, = {}) new(space_id: space_id, **).all end |
.create(space_id, attributes) ⇒ Sawyer::Resource
Create A New Conversation
36 37 38 |
# File 'lib/ribose/conversation.rb', line 36 def self.create(space_id, attributes) new(attributes.merge(space_id: space_id)).create end |
.destroy(space_id:, conversation_id:, **opts) ⇒ Object
Remove a conversation
61 62 63 |
# File 'lib/ribose/conversation.rb', line 61 def self.destroy(space_id:, conversation_id:, **opts) new(space_id: space_id, conversation_id: conversation_id, **opts).delete end |
.fetch(space_id, conversation_id, options = {}) ⇒ Sawyer::Resource
Fetch a conversation
26 27 28 |
# File 'lib/ribose/conversation.rb', line 26 def self.fetch(space_id, conversation_id, = {}) new(space_id: space_id, conversation_id: conversation_id, **).fetch end |
.update(space_id, conversation_id, attributes = {}) ⇒ Sawyer::Resource
Update a conversation
47 48 49 50 51 52 53 |
# File 'lib/ribose/conversation.rb', line 47 def self.update(space_id, conversation_id, attributes = {}) new( space_id: space_id, conversation_id: conversation_id, **attributes, ).update end |