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.
- checksums.yaml +4 -4
- data/README.md +40 -6
- data/img/comment-email-notification.png +0 -0
- data/img/comment-thread.png +0 -0
- data/lib/mural/client/mural_content/areas.rb +2 -2
- data/lib/mural/client/mural_content/arrows.rb +2 -2
- data/lib/mural/client/mural_content/comments.rb +2 -2
- data/lib/mural/client/mural_content/files.rb +3 -3
- data/lib/mural/client/mural_content/images.rb +2 -2
- data/lib/mural/client/mural_content/shapes.rb +2 -2
- data/lib/mural/client/mural_content/sticky_notes.rb +2 -2
- data/lib/mural/client/mural_content/text_boxes.rb +2 -2
- data/lib/mural/client/mural_content/titles.rb +2 -2
- data/lib/mural/version.rb +1 -1
- data/lib/mural/widget/create_area_params.rb +15 -15
- data/lib/mural/widget/create_arrow_params.rb +23 -19
- data/lib/mural/widget/create_comment_params.rb +3 -1
- data/lib/mural/widget/create_file_params.rb +16 -41
- data/lib/mural/widget/create_image_params.rb +16 -22
- data/lib/mural/widget/create_shape_params.rb +1 -0
- data/lib/mural/widget/create_sticky_note_params.rb +3 -3
- data/lib/mural/widget/create_table_cell_params.rb +4 -3
- data/lib/mural/widget/create_table_params.rb +1 -0
- data/lib/mural/widget/create_text_box_params.rb +1 -0
- data/lib/mural/widget/create_title_params.rb +1 -0
- data/lib/mural/widget/update_area_params.rb +4 -1
- data/lib/mural/widget/update_arrow_params.rb +5 -4
- data/lib/mural/widget/update_comment_params.rb +1 -0
- data/lib/mural/widget/update_file_params.rb +3 -37
- data/lib/mural/widget/update_image_params.rb +1 -1
- data/lib/mural/widget/update_shape_params.rb +1 -0
- data/lib/mural/widget/update_sticky_note_params.rb +4 -6
- data/lib/mural/widget/update_text_box_params.rb +1 -0
- data/lib/mural/widget/update_title_params.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cffa4ff400827dc5d5dd6393b9d4486db9343d61a36d99741115fc08f94b8631
|
4
|
+
data.tar.gz: 65d63349f8a62417a9331cdd9fc35d7116705d61b4e296b306ddd740f6ae0d19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec31b430792736408b1fbd14a474b223e232ea598e252af91dbc34b4952d53774fdabd5d6baaba6d0f2b21da1193a3323f578d7b7565cb99e36326803ff4fc95
|
7
|
+
data.tar.gz: dc81671b72f2d394d91c09a85699757ef7552b92532ef754d0e53fba88209444755a5042d23fa7ab58ed4204894ebf7344689ca12d0847231f102220e63ef907
|
data/README.md
CHANGED
@@ -4,12 +4,15 @@
|
|
4
4
|
[](https://rubygems.org/gems/mural-ruby)
|
5
5
|
[](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
|
11
|
-
|
12
|
-
|
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
|
-
|
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
|
+

|
143
|
+
|
144
|
+
Note that the user must already be a **mural member** for the mention to trigger
|
145
|
+
an email notification.
|
146
|
+
|
147
|
+

|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
32
|
+
Mural::Widget.decode(json['value'])
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
data/lib/mural/version.rb
CHANGED
@@ -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.
|
10
|
+
**Mural::Widget::Area.attrs.filter do |attr|
|
10
11
|
%i[
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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.
|
10
|
+
**Mural::Widget::Arrow.attrs.filter do |attr|
|
11
11
|
%i[
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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.
|
10
|
+
**Mural::Widget::Image.attrs.filter do |attr|
|
10
11
|
%i[
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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 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,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
|
@@ -7,43 +7,9 @@ module Mural
|
|
7
7
|
|
8
8
|
# https://developers.mural.co/public/reference/updatefile
|
9
9
|
define_attributes(
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
@@ -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
|
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.
|
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
|