mural-ruby 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -6
  3. data/img/comment-email-notification.png +0 -0
  4. data/img/comment-thread.png +0 -0
  5. data/lib/mural/client/mural_content/areas.rb +2 -2
  6. data/lib/mural/client/mural_content/arrows.rb +2 -2
  7. data/lib/mural/client/mural_content/comments.rb +2 -2
  8. data/lib/mural/client/mural_content/files.rb +3 -3
  9. data/lib/mural/client/mural_content/images.rb +2 -2
  10. data/lib/mural/client/mural_content/shapes.rb +2 -2
  11. data/lib/mural/client/mural_content/sticky_notes.rb +2 -2
  12. data/lib/mural/client/mural_content/text_boxes.rb +2 -2
  13. data/lib/mural/client/mural_content/titles.rb +2 -2
  14. data/lib/mural/version.rb +1 -1
  15. data/lib/mural/widget/create_area_params.rb +15 -15
  16. data/lib/mural/widget/create_arrow_params.rb +23 -19
  17. data/lib/mural/widget/create_comment_params.rb +3 -1
  18. data/lib/mural/widget/create_file_params.rb +16 -41
  19. data/lib/mural/widget/create_image_params.rb +16 -22
  20. data/lib/mural/widget/create_shape_params.rb +1 -0
  21. data/lib/mural/widget/create_sticky_note_params.rb +3 -3
  22. data/lib/mural/widget/create_table_cell_params.rb +4 -3
  23. data/lib/mural/widget/create_table_params.rb +1 -0
  24. data/lib/mural/widget/create_text_box_params.rb +1 -0
  25. data/lib/mural/widget/create_title_params.rb +1 -0
  26. data/lib/mural/widget/update_area_params.rb +4 -1
  27. data/lib/mural/widget/update_arrow_params.rb +5 -4
  28. data/lib/mural/widget/update_comment_params.rb +1 -0
  29. data/lib/mural/widget/update_file_params.rb +3 -37
  30. data/lib/mural/widget/update_image_params.rb +1 -1
  31. data/lib/mural/widget/update_shape_params.rb +1 -0
  32. data/lib/mural/widget/update_sticky_note_params.rb +4 -6
  33. data/lib/mural/widget/update_text_box_params.rb +1 -0
  34. data/lib/mural/widget/update_title_params.rb +1 -0
  35. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a608bc7d2068d3dc93b5fe418056e3cd0984aa2b52a816fae303ed12fee0b79e
4
- data.tar.gz: ab8c92e86470e8097b412ffaf00c1f2623b514880aad9f91eb6aed4db5793608
3
+ metadata.gz: cffa4ff400827dc5d5dd6393b9d4486db9343d61a36d99741115fc08f94b8631
4
+ data.tar.gz: 65d63349f8a62417a9331cdd9fc35d7116705d61b4e296b306ddd740f6ae0d19
5
5
  SHA512:
6
- metadata.gz: 6e07b3ceb356a332fdc05e7617f918ddc6d6252e62d1a6eb5ce80f8dd90520e24b1fd1a7dbbc49a2c63280181efb7d0604eded0721068dfde4a3c12c798fd2e0
7
- data.tar.gz: ed42dc8b9b6445d3c239638a822aebff449c0472261171d5f5d1b9c7abfaf6ac9c68dd3eef6dc62e93ca394be7b9c3b69dfedd9bad0e3307903b142cc1238e42
6
+ metadata.gz: ec31b430792736408b1fbd14a474b223e232ea598e252af91dbc34b4952d53774fdabd5d6baaba6d0f2b21da1193a3323f578d7b7565cb99e36326803ff4fc95
7
+ data.tar.gz: dc81671b72f2d394d91c09a85699757ef7552b92532ef754d0e53fba88209444755a5042d23fa7ab58ed4204894ebf7344689ca12d0847231f102220e63ef907
data/README.md CHANGED
@@ -4,12 +4,15 @@
4
4
  [![Gem Version](https://img.shields.io/gem/v/mural-ruby?style=for-the-badge)](https://rubygems.org/gems/mural-ruby)
5
5
  [![GitHub License](https://img.shields.io/github/license/mickaelpham/mural-ruby?style=for-the-badge)](https://github.com/mickaelpham/mural-ruby/blob/main/UNLICENSE)
6
6
 
7
-
8
7
  Ruby library for the [Mural](https://app.mural.co) public API.
9
8
 
10
- **Disclaimer: the views and opinions expressed in this repository are solelythose of the individual contributors and do not represent the official view of Tactivos, Inc. d/b/a Mural.**
11
-
12
- **Mural does not endorse this repository in any way.**
9
+ > **Disclaimer**
10
+ >
11
+ > The views and opinions expressed in this repository are solely hose of the
12
+ > individual contributors and do not represent the official view of
13
+ > [Tactivos, Inc. d/b/a Mural](https://www.mural.co/).
14
+ >
15
+ > **Mural does not endorse this repository in any way.**
13
16
 
14
17
  ## Installation
15
18
 
@@ -74,8 +77,8 @@ irb(main):002> mural.users.current_user
74
77
 
75
78
  ### Upload a file to a mural
76
79
 
77
- To upload a `my.pdf` file that's located in the same directory as where you
78
- are running the script:
80
+ To upload a `my.pdf` file that's located in the same directory as where you are
81
+ running the script:
79
82
 
80
83
  ```rb
81
84
  MURAL_ID = 'workspace-1.mural-1'
@@ -112,6 +115,37 @@ end
112
115
  client.mural_content.create_file(MURAL_ID, params)
113
116
  ```
114
117
 
118
+ ## Mentioning someone in a comment
119
+
120
+ - You can reply to a comment by passing a `replies` array of `String` message.
121
+ Each message will be added as a reply to the original comment.
122
+ - You can "\[at\] mention" someone in a comment or in a reply by using the
123
+ following pattern in the `message` or the `replies`:
124
+
125
+ ```
126
+ @[<USER FULL NAME> @<USER ID>](<USER ID>)
127
+ ```
128
+
129
+ Example replying to a thread:
130
+
131
+ ```rb
132
+ MURAL_ID = 'mural-1'
133
+ COMMENT_ID = 'comment-1'
134
+
135
+ reply_to_params = Mural::Widget::UpdateCommentParams.new.tap do |c|
136
+ c.replies = ["Can you have a look @[John Doe @user-1](user-1)]?"]
137
+ end
138
+
139
+ client.mural_content.update_comment(MURAL_ID, COMMENT_ID, reply_to_params)
140
+ ```
141
+
142
+ ![comment thread](./img/comment-thread.png)
143
+
144
+ Note that the user must already be a **mural member** for the mention to trigger
145
+ an email notification.
146
+
147
+ ![comment email notification](./img/comment-email-notification.png)
148
+
115
149
  ## Known limitations
116
150
 
117
151
  - `DrawWidget`, AKA sketches, are not returned by the `GET widgets` endpoint.
Binary file
Binary file
@@ -11,7 +11,7 @@ module Mural
11
11
  create_area_params.encode
12
12
  )
13
13
 
14
- Mural::Widget::Area.decode(json['value'])
14
+ Mural::Widget.decode(json['value'])
15
15
  end
16
16
 
17
17
  # https://developers.mural.co/public/reference/updatearea
@@ -21,7 +21,7 @@ module Mural
21
21
  update_area_params.encode
22
22
  )
23
23
 
24
- Mural::Widget::Area.decode(json['value'])
24
+ Mural::Widget.decode(json['value'])
25
25
  end
26
26
  end
27
27
  end
@@ -11,7 +11,7 @@ module Mural
11
11
  create_arrow_params.encode
12
12
  )
13
13
 
14
- Mural::Widget::Arrow.decode(json['value'])
14
+ Mural::Widget.decode(json['value'])
15
15
  end
16
16
 
17
17
  # https://developers.mural.co/public/reference/updatearrow
@@ -21,7 +21,7 @@ module Mural
21
21
  update_arrow_params.encode
22
22
  )
23
23
 
24
- Mural::Widget::Arrow.decode(json['value'])
24
+ Mural::Widget.decode(json['value'])
25
25
  end
26
26
  end
27
27
  end
@@ -15,7 +15,7 @@ module Mural
15
15
  create_comment_params.encode
16
16
  )
17
17
 
18
- Mural::Widget::Comment.decode(json['value'])
18
+ Mural::Widget.decode(json['value'])
19
19
  end
20
20
 
21
21
  # Update a comment widget on a mural.
@@ -29,7 +29,7 @@ module Mural
29
29
  update_comment_params.encode
30
30
  )
31
31
 
32
- Mural::Widget::Comment.decode(json['value'])
32
+ Mural::Widget.decode(json['value'])
33
33
  end
34
34
  end
35
35
  end
@@ -11,7 +11,7 @@ module Mural
11
11
  params.encode
12
12
  )
13
13
 
14
- Mural::Widget::File.decode(json['value'])
14
+ Mural::Widget.decode(json['value'])
15
15
  end
16
16
 
17
17
  # https://developers.mural.co/public/reference/getmuralfilewidgets
@@ -21,7 +21,7 @@ module Mural
21
21
  { next: next_page }
22
22
  )
23
23
 
24
- files = json['value'].map { |f| Mural::Widget::File.decode(f) }
24
+ files = json['value'].map { |f| Mural::Widget.decode(f) }
25
25
  [files, json['next']]
26
26
  end
27
27
 
@@ -32,7 +32,7 @@ module Mural
32
32
  update_file_params.encode
33
33
  )
34
34
 
35
- Mural::Widget::File.decode(json['value'])
35
+ Mural::Widget.decode(json['value'])
36
36
  end
37
37
  end
38
38
  end
@@ -11,7 +11,7 @@ module Mural
11
11
  create_image_params.encode
12
12
  )
13
13
 
14
- Mural::Widget::Image.decode(json['value'])
14
+ Mural::Widget.decode(json['value'])
15
15
  end
16
16
 
17
17
  # https://developers.mural.co/public/reference/createimage
@@ -21,7 +21,7 @@ module Mural
21
21
  update_image_params.encode
22
22
  )
23
23
 
24
- Mural::Widget::Image.decode(json['value'])
24
+ Mural::Widget.decode(json['value'])
25
25
  end
26
26
  end
27
27
  end
@@ -15,7 +15,7 @@ module Mural
15
15
  [*create_shape_params].map(&:encode)
16
16
  )
17
17
  json['value'].map do |json_shape|
18
- Mural::Widget::Shape.decode(json_shape)
18
+ Mural::Widget.decode(json_shape)
19
19
  end
20
20
  end
21
21
 
@@ -30,7 +30,7 @@ module Mural
30
30
  update_shape_params.encode
31
31
  )
32
32
 
33
- Mural::Widget::Shape.decode(json['value'])
33
+ Mural::Widget.decode(json['value'])
34
34
  end
35
35
  end
36
36
  end
@@ -15,7 +15,7 @@ module Mural
15
15
  [*create_sticky_note_params].map(&:encode)
16
16
  )
17
17
 
18
- json['value'].map { |s| Mural::Widget::StickyNote.decode(s) }
18
+ json['value'].map { |s| Mural::Widget.decode(s) }
19
19
  end
20
20
 
21
21
  # Update a sticky note widget on a mural.
@@ -32,7 +32,7 @@ module Mural
32
32
  update_sticky_note_params.encode
33
33
  )
34
34
 
35
- Mural::Widget::StickyNote.decode(json['value'])
35
+ Mural::Widget.decode(json['value'])
36
36
  end
37
37
  end
38
38
  end
@@ -15,7 +15,7 @@ module Mural
15
15
  [*create_text_box_params].map(&:encode)
16
16
  )
17
17
 
18
- json['value'].map { |text_box| Mural::Widget::Text.decode(text_box) }
18
+ json['value'].map { |text_box| Mural::Widget.decode(text_box) }
19
19
  end
20
20
 
21
21
  # Update a textbox on a mural
@@ -29,7 +29,7 @@ module Mural
29
29
  update_text_box_params.encode
30
30
  )
31
31
 
32
- Mural::Widget::Text.decode(json['value'])
32
+ Mural::Widget.decode(json['value'])
33
33
  end
34
34
  end
35
35
  end
@@ -15,7 +15,7 @@ module Mural
15
15
  [*create_title_params].map(&:encode)
16
16
  )
17
17
 
18
- json['value'].map { |title| Mural::Widget::Text.decode(title) }
18
+ json['value'].map { |title| Mural::Widget.decode(title) }
19
19
  end
20
20
 
21
21
  # Update a title on a mural
@@ -29,7 +29,7 @@ module Mural
29
29
  update_title_params.encode
30
30
  )
31
31
 
32
- Mural::Widget::Text.decode(json['value'])
32
+ Mural::Widget.decode(json['value'])
33
33
  end
34
34
  end
35
35
  end
data/lib/mural/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mural
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
@@ -5,23 +5,23 @@ module Mural
5
5
  class CreateAreaParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createarea
8
9
  define_attributes(
9
- **Mural::Widget::Area.attrs.reject do |attr|
10
+ **Mural::Widget::Area.attrs.filter do |attr|
10
11
  %i[
11
- content_edited_by
12
- content_edited_on
13
- created_by
14
- created_on
15
- hide_editor
16
- hide_owner
17
- id
18
- invisible
19
- locked
20
- locked_by_facilitator
21
- rotation
22
- type
23
- updated_by
24
- updated_on
12
+ height
13
+ hidden
14
+ instruction
15
+ layout
16
+ parent_id
17
+ presentation_index
18
+ show_title
19
+ stacking_order
20
+ style
21
+ title
22
+ width
23
+ x
24
+ y
25
25
  ].include? attr
26
26
  end
27
27
  )
@@ -7,26 +7,34 @@ module Mural
7
7
 
8
8
  # https://developers.mural.co/public/reference/createarrow
9
9
  define_attributes(
10
- **Mural::Widget::Arrow.attrs.reject do |attr|
10
+ **Mural::Widget::Arrow.attrs.filter do |attr|
11
11
  %i[
12
- content_edited_by
13
- content_edited_on
14
- created_by
15
- created_on
16
- hidden
17
- hide_editor
18
- hide_owner
19
- id
20
- invisible
21
- locked
22
- locked_by_facilitator
23
- type
24
- updated_by
25
- updated_on
12
+ arrow_type
13
+ end_ref_id
14
+ height
15
+ instruction
16
+ label
17
+ parent_id
18
+ points
19
+ presentation_index
20
+ rotation
21
+ stackable
22
+ stacking_order
23
+ start_ref_id
24
+ style
25
+ tip
26
+ title
27
+ width
28
+ x
29
+ y
26
30
  ].include? attr
27
31
  end
28
32
  )
29
33
 
34
+ Style = Mural::Widget::Arrow::Style
35
+ Label = Mural::Widget::Arrow::Label
36
+ Point = Mural::Widget::Arrow::Point
37
+
30
38
  def encode
31
39
  super.tap do |json|
32
40
  json['points']&.map!(&:encode)
@@ -34,10 +42,6 @@ module Mural
34
42
  json['style'] = json['style']&.encode
35
43
  end
36
44
  end
37
-
38
- Style = Mural::Widget::Arrow::Style
39
- Label = Mural::Widget::Arrow::Label
40
- Point = Mural::Widget::Arrow::Point
41
45
  end
42
46
  end
43
47
  end
@@ -5,17 +5,19 @@ module Mural
5
5
  class CreateCommentParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createcomment
8
9
  define_attributes(
9
10
  **Mural::Widget::Comment.attrs.filter do |attr|
10
11
  %i[
11
- reference_widget_id
12
12
  message
13
+ reference_widget_id
13
14
  stacking_order
14
15
  x
15
16
  y
16
17
  ].include? attr
17
18
  end,
18
19
 
20
+ # If true, the comment is marked as resolved.
19
21
  resolved: 'resolved'
20
22
  )
21
23
  end
@@ -7,49 +7,24 @@ module Mural
7
7
 
8
8
  # https://developers.mural.co/public/reference/createfile
9
9
  define_attributes(
10
- # The height of the widget in px. This value will be overwritten if the
11
- # file has a preview from which the final value will be extracted.
12
- height: 'height',
13
-
14
- # If true, the widget is hidden from non-facilitators. Applies only when
15
- # the widget is in the outline.
16
- hidden: 'hidden',
17
-
18
- # The instructions for a section of the outline. This text can only be
19
- # added and modified by a facilitator.
20
- instruction: 'instruction',
10
+ **Mural::Widget::File.attrs.filter do |attr|
11
+ %i[
12
+ height
13
+ hidden
14
+ instruction
15
+ parent_id
16
+ presentation_index
17
+ rotation
18
+ stacking_order
19
+ title
20
+ width
21
+ x
22
+ y
23
+ ].include? attr
24
+ end,
21
25
 
22
26
  # The name of the file.
23
- name: 'name',
24
-
25
- # The ID of the area widget that contains the widget.
26
- parent_id: 'parentId',
27
-
28
- # The list order of the widget in the outline.
29
- presentation_index: 'presentationIndex',
30
-
31
- # The angle of widget rotation in degrees.
32
- rotation: 'rotation',
33
-
34
- # The z-index stacking order of the widget.
35
- stacking_order: 'stackingOrder',
36
-
37
- # The title in the file widget and in the outline.
38
- title: 'title',
39
-
40
- # The width of the widget in px. This value will be overwritten if the
41
- # file has a preview from which the final value will be extracted.
42
- width: 'width',
43
-
44
- # The horizontal position of the widget in px. This is the distance from
45
- # the left of the parent widget, such as an area. If the widget has no
46
- # parent widget, this is the distance from the left of the mural.
47
- x: 'x',
48
-
49
- # The vertical position of the widget in px. This is the distance from
50
- # the top of the parent widget, such as an area. If the widget has no
51
- # parent widget, this is the distance from the top of the mural.
52
- y: 'y'
27
+ name: 'name'
53
28
  )
54
29
  end
55
30
  end
@@ -5,30 +5,24 @@ module Mural
5
5
  class CreateImageParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createimage
8
9
  define_attributes(
9
- **Mural::Widget::Image.attrs.reject do |attr|
10
+ **Mural::Widget::Image.attrs.filter do |attr|
10
11
  %i[
11
- aspect_ratio
12
- content_edited_by
13
- content_edited_on
14
- created_by
15
- created_on
16
- expires_in_minutes
17
- hide_editor
18
- hide_owner
19
- id
20
- invisible
21
- link
22
- locked
23
- locked_by_facilitator
24
- mask
25
- natural_height
26
- natural_width
27
- thumbnail_url
28
- type
29
- updated_by
30
- updated_on
31
- url
12
+ border
13
+ caption
14
+ description
15
+ height
16
+ hidden
17
+ instruction
18
+ parent_id
19
+ presentation_index
20
+ rotation
21
+ show_caption
22
+ stacking_order
23
+ width
24
+ x
25
+ y
32
26
  ].include? attr
33
27
  end,
34
28
 
@@ -5,6 +5,7 @@ module Mural
5
5
  class CreateShapeParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createshapewidget
8
9
  define_attributes(
9
10
  **Mural::Widget::Shape.attrs.filter do |attr|
10
11
  %i[
@@ -5,6 +5,7 @@ module Mural
5
5
  class CreateStickyNoteParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createstickynote
8
9
  define_attributes(
9
10
  **Mural::Widget::StickyNote.attrs.filter do |attr|
10
11
  %i[
@@ -30,14 +31,13 @@ module Mural
30
31
  end
31
32
  )
32
33
 
34
+ Style = Mural::Widget::StickyNote::Style
35
+
33
36
  def encode
34
37
  super.tap do |json|
35
38
  json['style'] = json['style']&.encode
36
39
  end.compact
37
40
  end
38
-
39
- # Exact same values, no restrictions
40
- Style = Mural::Widget::StickyNote::Style
41
41
  end
42
42
  end
43
43
  end
@@ -5,6 +5,7 @@ module Mural
5
5
  class CreateTableCellParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createtable
8
9
  define_attributes(
9
10
  **Mural::Widget::TableCell.attrs.filter do |attr|
10
11
  %i[
@@ -23,15 +24,15 @@ module Mural
23
24
  end
24
25
  )
25
26
 
27
+ Style = Mural::Widget::TableCell::Style
28
+ TextContent = Mural::Widget::TableCell::TextContent
29
+
26
30
  def encode
27
31
  super.tap do |json|
28
32
  json['style'] = json['style']&.encode
29
33
  json['textContent'] = json['textContent']&.encode
30
34
  end.compact
31
35
  end
32
-
33
- Style = Mural::Widget::TableCell::Style
34
- TextContent = Mural::Widget::TableCell::TextContent
35
36
  end
36
37
  end
37
38
  end
@@ -5,6 +5,7 @@ module Mural
5
5
  class CreateTableParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createtable
8
9
  define_attributes(
9
10
  **Mural::Widget::Table.attrs.filter do |attr|
10
11
  %i[
@@ -5,6 +5,7 @@ module Mural
5
5
  class CreateTextBoxParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createtextbox
8
9
  define_attributes(
9
10
  **Mural::Widget::Text.attrs.filter do |attr|
10
11
  %i[
@@ -5,6 +5,7 @@ module Mural
5
5
  class CreateTitleParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/createtitle
8
9
  define_attributes(
9
10
  **Mural::Widget::Text.attrs.filter do |attr|
10
11
  %i[
@@ -5,8 +5,11 @@ module Mural
5
5
  class UpdateAreaParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/updatearea
8
9
  define_attributes(
9
- **Mural::Widget::CreateAreaParams.attrs
10
+ **Mural::Widget::CreateAreaParams.attrs.reject do |attr|
11
+ %i[stacking_order].include? attr
12
+ end
10
13
  )
11
14
 
12
15
  Style = Mural::Widget::Area::Style
@@ -5,12 +5,17 @@ module Mural
5
5
  class UpdateArrowParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/updatearrow
8
9
  define_attributes(
9
10
  **Mural::Widget::CreateArrowParams.attrs.reject do |attr|
10
11
  %i[stacking_order].include? attr
11
12
  end
12
13
  )
13
14
 
15
+ Style = Mural::Widget::Arrow::Style
16
+ Label = Mural::Widget::Arrow::Label
17
+ Point = Mural::Widget::Arrow::Point
18
+
14
19
  def encode
15
20
  super.tap do |json|
16
21
  json['points']&.map!(&:encode)
@@ -18,10 +23,6 @@ module Mural
18
23
  json['style'] = json['style']&.encode
19
24
  end
20
25
  end
21
-
22
- Style = Mural::Widget::Arrow::Style
23
- Label = Mural::Widget::Arrow::Label
24
- Point = Mural::Widget::Arrow::Point
25
26
  end
26
27
  end
27
28
  end
@@ -5,6 +5,7 @@ module Mural
5
5
  class UpdateCommentParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/updatecomment
8
9
  define_attributes(
9
10
  **Mural::Widget::CreateCommentParams.attrs.reject do |attr|
10
11
  %i[stacking_order].include? attr
@@ -7,43 +7,9 @@ module Mural
7
7
 
8
8
  # https://developers.mural.co/public/reference/updatefile
9
9
  define_attributes(
10
- # The height of the widget in px. This value will be overwritten if the
11
- # file has a preview from which the final value will be extracted.
12
- height: 'height',
13
-
14
- # If true, the widget is hidden from non-facilitators. Applies only when
15
- # the widget is in the outline.
16
- hidden: 'hidden',
17
-
18
- # The instructions for a section of the outline. This text can only be
19
- # added and modified by a facilitator.
20
- instruction: 'instruction',
21
-
22
- # The ID of the area widget that contains the widget.
23
- parent_id: 'parentId',
24
-
25
- # The list order of the widget in the outline.
26
- presentation_index: 'presentationIndex',
27
-
28
- # The angle of widget rotation in degrees.
29
- rotation: 'rotation',
30
-
31
- # The title in the file widget and in the outline.
32
- title: 'title',
33
-
34
- # The width of the widget in px. This value will be overwritten if the
35
- # file has a preview from which the final value will be extracted.
36
- width: 'width',
37
-
38
- # The horizontal position of the widget in px. This is the distance from
39
- # the left of the parent widget, such as an area. If the widget has no
40
- # parent widget, this is the distance from the left of the mural.
41
- x: 'x',
42
-
43
- # The vertical position of the widget in px. This is the distance from
44
- # the top of the parent widget, such as an area. If the widget has no
45
- # parent widget, this is the distance from the top of the mural.
46
- y: 'y'
10
+ **Mural::Widget::CreateFileParams.attrs.reject do |attr|
11
+ %i[name stacking_order].include? attr
12
+ end
47
13
  )
48
14
  end
49
15
  end
@@ -7,7 +7,7 @@ module Mural
7
7
 
8
8
  define_attributes(
9
9
  **Mural::Widget::CreateImageParams.attrs.reject do |attr|
10
- %i[name].include? attr
10
+ %i[name stacking_order].include? attr
11
11
  end
12
12
  )
13
13
  end
@@ -5,6 +5,7 @@ module Mural
5
5
  class UpdateShapeParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/updateshapewidget
8
9
  define_attributes(
9
10
  **Mural::Widget::CreateShapeParams.attrs.reject do |attr|
10
11
  %i[shape stacking_order].include? attr
@@ -5,22 +5,20 @@ module Mural
5
5
  class UpdateStickyNoteParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/updatestickynote
8
9
  define_attributes(
9
10
  **Mural::Widget::CreateStickyNoteParams.attrs.reject do |attr|
10
- %i[
11
- stacking_order
12
- shape
13
- ].include? attr
11
+ %i[stacking_order shape].include? attr
14
12
  end
15
13
  )
16
14
 
15
+ Style = Mural::Widget::StickyNote::Style
16
+
17
17
  def encode
18
18
  super.tap do |json|
19
19
  json['style'] = json['style']&.encode
20
20
  end
21
21
  end
22
-
23
- Style = Mural::Widget::StickyNote::Style
24
22
  end
25
23
  end
26
24
  end
@@ -5,6 +5,7 @@ module Mural
5
5
  class UpdateTextBoxParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/updatetextbox
8
9
  define_attributes(
9
10
  **Mural::Widget::CreateTextBoxParams.attrs.reject do |attr|
10
11
  %i[stacking_order].include? attr
@@ -5,6 +5,7 @@ module Mural
5
5
  class UpdateTitleParams
6
6
  include Mural::Codec
7
7
 
8
+ # https://developers.mural.co/public/reference/updatetitle
8
9
  define_attributes(
9
10
  **Mural::Widget::CreateTitleParams.attrs.reject do |attr|
10
11
  %i[stacking_order].include? attr
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mural-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickaël Pham
@@ -36,6 +36,8 @@ files:
36
36
  - README.md
37
37
  - Rakefile
38
38
  - UNLICENSE
39
+ - img/comment-email-notification.png
40
+ - img/comment-thread.png
39
41
  - img/draw-widget.png
40
42
  - img/inking-widget.png
41
43
  - img/mind-map.png