Module: Mural::Client::MuralContent::StickyNotes
- Included in:
- Mural::Client::MuralContent
- Defined in:
- lib/mural/client/mural_content/sticky_notes.rb
Instance Method Summary collapse
-
#create_sticky_notes(mural_id, create_sticky_note_params) ⇒ Object
Create one or more sticky note widgets on a mural.
-
#update_sticky_note(mural_id, sticky_note_id, update_sticky_note_params) ⇒ Object
Update a sticky note widget on a mural.
Instance Method Details
#create_sticky_notes(mural_id, create_sticky_note_params) ⇒ Object
Create one or more sticky note widgets on a mural. Limit 1000.
Authorization scope: murals:write
12 13 14 15 16 17 18 19 |
# File 'lib/mural/client/mural_content/sticky_notes.rb', line 12 def create_sticky_notes(mural_id, create_sticky_note_params) json = post( "/api/public/v1/murals/#{mural_id}/widgets/sticky-note", [*create_sticky_note_params].map(&:encode) ) json['value'].map { |s| Mural::Widget.decode(s) } end |
#update_sticky_note(mural_id, sticky_note_id, update_sticky_note_params) ⇒ Object
Update a sticky note widget on a mural.
Authorization scope: murals:write
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/mural/client/mural_content/sticky_notes.rb', line 26 def update_sticky_note( mural_id, sticky_note_id, update_sticky_note_params ) json = patch( "/api/public/v1/murals/#{mural_id}/widgets/sticky-note" \ "/#{sticky_note_id}", update_sticky_note_params.encode ) Mural::Widget.decode(json['value']) end |