Module: Mural::Client::MuralContent::Widgets
- Included in:
- Mural::Client::MuralContent
- Defined in:
- lib/mural/client/mural_content/widgets.rb
Instance Method Summary collapse
- #destroy_widget(mural_id, widget_id) ⇒ Object
- #list_widgets(mural_id, type: nil, parent_id: nil, next_page: nil) ⇒ Object
- #retrieve_widget(mural_id, widget_id) ⇒ Object
Instance Method Details
#destroy_widget(mural_id, widget_id) ⇒ Object
27 28 29 |
# File 'lib/mural/client/mural_content/widgets.rb', line 27 def (mural_id, ) delete("/api/public/v1/murals/#{mural_id}/widgets/#{widget_id}") end |
#list_widgets(mural_id, type: nil, parent_id: nil, next_page: nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/mural/client/mural_content/widgets.rb', line 8 def (mural_id, type: nil, parent_id: nil, next_page: nil) json = get( "/api/public/v1/murals/#{mural_id}/widgets", { type: type, parentId: parent_id, next: next_page } ) = json['value'].map { |w| Mural::Widget.decode(w) } [, json['next']] end |
#retrieve_widget(mural_id, widget_id) ⇒ Object
20 21 22 23 24 |
# File 'lib/mural/client/mural_content/widgets.rb', line 20 def (mural_id, ) json = get("/api/public/v1/murals/#{mural_id}/widgets/#{widget_id}") Mural::Widget.decode(json['value']) end |