mural-ruby 0.4.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 +41 -3
- 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 +37 -0
- data/lib/mural/client/mural_content/files.rb +3 -3
- data/lib/mural/client/mural_content/images.rb +29 -0
- data/lib/mural/client/mural_content/shapes.rb +38 -0
- data/lib/mural/client/mural_content/sticky_notes.rb +14 -4
- data/lib/mural/client/mural_content/tables.rb +24 -0
- data/lib/mural/client/mural_content/text_boxes.rb +37 -0
- data/lib/mural/client/mural_content/titles.rb +37 -0
- data/lib/mural/client/mural_content.rb +6 -0
- data/lib/mural/client.rb +0 -1
- 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 +25 -0
- data/lib/mural/widget/create_file_params.rb +16 -41
- data/lib/mural/widget/create_image_params.rb +38 -0
- data/lib/mural/widget/create_shape_params.rb +40 -0
- data/lib/mural/widget/create_sticky_note_params.rb +43 -0
- data/lib/mural/widget/create_table_cell_params.rb +38 -0
- data/lib/mural/widget/create_table_params.rb +48 -0
- data/lib/mural/widget/create_text_box_params.rb +40 -0
- data/lib/mural/widget/create_title_params.rb +40 -0
- data/lib/mural/widget/image.rb +1 -1
- data/lib/mural/widget/table.rb +29 -7
- data/lib/mural/widget/table_cell.rb +35 -5
- data/lib/mural/widget/text.rb +1 -1
- 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 +18 -0
- data/lib/mural/widget/update_file_params.rb +3 -37
- data/lib/mural/widget/update_image_params.rb +15 -0
- data/lib/mural/widget/update_shape_params.rb +24 -0
- data/lib/mural/widget/update_sticky_note_params.rb +24 -0
- data/lib/mural/widget/update_text_box_params.rb +24 -0
- data/lib/mural/widget/update_title_params.rb +24 -0
- metadata +24 -4
- data/lib/mural/create_sticky_note_params.rb +0 -37
- data/lib/mural/update_sticky_note_params.rb +0 -24
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class CreateShapeParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/createshapewidget
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::Shape.attrs.filter do |attr|
|
|
11
|
+
%i[
|
|
12
|
+
height
|
|
13
|
+
hidden
|
|
14
|
+
html_text
|
|
15
|
+
instruction
|
|
16
|
+
parent_id
|
|
17
|
+
presentation_index
|
|
18
|
+
rotation
|
|
19
|
+
shape
|
|
20
|
+
stacking_order
|
|
21
|
+
style
|
|
22
|
+
text
|
|
23
|
+
title
|
|
24
|
+
width
|
|
25
|
+
x
|
|
26
|
+
y
|
|
27
|
+
].include? attr
|
|
28
|
+
end
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
Style = Mural::Widget::Shape::Style
|
|
32
|
+
|
|
33
|
+
def encode
|
|
34
|
+
super.tap do |json|
|
|
35
|
+
json['style'] = json['style']&.encode
|
|
36
|
+
end.compact
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class CreateStickyNoteParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/createstickynote
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::StickyNote.attrs.filter do |attr|
|
|
11
|
+
%i[
|
|
12
|
+
height
|
|
13
|
+
hidden
|
|
14
|
+
html_text
|
|
15
|
+
hyperlink
|
|
16
|
+
hyperlink_title
|
|
17
|
+
instruction
|
|
18
|
+
parent_id
|
|
19
|
+
presentation_index
|
|
20
|
+
rotation
|
|
21
|
+
shape
|
|
22
|
+
stacking_order
|
|
23
|
+
style
|
|
24
|
+
tags
|
|
25
|
+
text
|
|
26
|
+
title
|
|
27
|
+
width
|
|
28
|
+
x
|
|
29
|
+
y
|
|
30
|
+
].include?(attr)
|
|
31
|
+
end
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
Style = Mural::Widget::StickyNote::Style
|
|
35
|
+
|
|
36
|
+
def encode
|
|
37
|
+
super.tap do |json|
|
|
38
|
+
json['style'] = json['style']&.encode
|
|
39
|
+
end.compact
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class CreateTableCellParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/createtable
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::TableCell.attrs.filter do |attr|
|
|
11
|
+
%i[
|
|
12
|
+
col_span
|
|
13
|
+
column_id
|
|
14
|
+
height
|
|
15
|
+
rotation
|
|
16
|
+
row_id
|
|
17
|
+
row_span
|
|
18
|
+
style
|
|
19
|
+
text_content
|
|
20
|
+
width
|
|
21
|
+
x
|
|
22
|
+
y
|
|
23
|
+
].include? attr
|
|
24
|
+
end
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
Style = Mural::Widget::TableCell::Style
|
|
28
|
+
TextContent = Mural::Widget::TableCell::TextContent
|
|
29
|
+
|
|
30
|
+
def encode
|
|
31
|
+
super.tap do |json|
|
|
32
|
+
json['style'] = json['style']&.encode
|
|
33
|
+
json['textContent'] = json['textContent']&.encode
|
|
34
|
+
end.compact
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class CreateTableParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/createtable
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::Table.attrs.filter do |attr|
|
|
11
|
+
%i[
|
|
12
|
+
auto_resize
|
|
13
|
+
columns
|
|
14
|
+
height
|
|
15
|
+
hidden
|
|
16
|
+
instruction
|
|
17
|
+
parent_id
|
|
18
|
+
presentation_index
|
|
19
|
+
rotation
|
|
20
|
+
rows
|
|
21
|
+
stacking_order
|
|
22
|
+
style
|
|
23
|
+
title
|
|
24
|
+
width
|
|
25
|
+
x
|
|
26
|
+
y
|
|
27
|
+
].include? attr
|
|
28
|
+
end,
|
|
29
|
+
|
|
30
|
+
# The array of table cells.
|
|
31
|
+
cells: 'cells'
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
Row = Mural::Widget::Table::Row
|
|
35
|
+
Column = Mural::Widget::Table::Column
|
|
36
|
+
Style = Mural::Widget::Table::Style
|
|
37
|
+
|
|
38
|
+
def encode # rubocop:disable Metrics/CyclomaticComplexity
|
|
39
|
+
super.tap do |json|
|
|
40
|
+
json['cells']&.map!(&:encode)
|
|
41
|
+
json['rows']&.map!(&:encode)
|
|
42
|
+
json['columns']&.map!(&:encode)
|
|
43
|
+
json['style'] = json['style']&.encode
|
|
44
|
+
end.compact
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class CreateTextBoxParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/createtextbox
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::Text.attrs.filter do |attr|
|
|
11
|
+
%i[
|
|
12
|
+
height
|
|
13
|
+
hidden
|
|
14
|
+
hyperlink
|
|
15
|
+
hyperlink_title
|
|
16
|
+
instruction
|
|
17
|
+
parent_id
|
|
18
|
+
presentation_index
|
|
19
|
+
rotation
|
|
20
|
+
stacking_order
|
|
21
|
+
style
|
|
22
|
+
text
|
|
23
|
+
title
|
|
24
|
+
width
|
|
25
|
+
x
|
|
26
|
+
y
|
|
27
|
+
].include? attr
|
|
28
|
+
end
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
Style = Mural::Widget::Text::Style
|
|
32
|
+
|
|
33
|
+
def encode
|
|
34
|
+
super.tap do |json|
|
|
35
|
+
json['style'] = json['style']&.encode
|
|
36
|
+
end.compact
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class CreateTitleParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/createtitle
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::Text.attrs.filter do |attr|
|
|
11
|
+
%i[
|
|
12
|
+
height
|
|
13
|
+
hidden
|
|
14
|
+
hyperlink
|
|
15
|
+
hyperlink_title
|
|
16
|
+
instruction
|
|
17
|
+
parent_id
|
|
18
|
+
presentation_index
|
|
19
|
+
rotation
|
|
20
|
+
stacking_order
|
|
21
|
+
style
|
|
22
|
+
text
|
|
23
|
+
title
|
|
24
|
+
width
|
|
25
|
+
x
|
|
26
|
+
y
|
|
27
|
+
].include? attr
|
|
28
|
+
end
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
Style = Mural::Widget::Text::Style
|
|
32
|
+
|
|
33
|
+
def encode
|
|
34
|
+
super.tap do |json|
|
|
35
|
+
json['style'] = json['style']&.encode
|
|
36
|
+
end.compact
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
data/lib/mural/widget/image.rb
CHANGED
|
@@ -40,7 +40,7 @@ module Mural
|
|
|
40
40
|
show_caption: 'showCaption',
|
|
41
41
|
|
|
42
42
|
# The URL of the image thumbnail.
|
|
43
|
-
|
|
43
|
+
thumbnail_url: 'thumbnailUrl',
|
|
44
44
|
|
|
45
45
|
# The download URL of the image. This URL has expiration time.
|
|
46
46
|
# May be null when download restriction is enabled.
|
data/lib/mural/widget/table.rb
CHANGED
|
@@ -2,25 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
module Mural
|
|
4
4
|
class Widget
|
|
5
|
-
# UNDOCUMENTED
|
|
6
|
-
# This widget is not documented within Mural public API documentation.
|
|
7
5
|
class Table
|
|
8
6
|
include Mural::Codec
|
|
9
7
|
|
|
8
|
+
# https://developers.mural.co/public/reference/createtable
|
|
10
9
|
define_attributes(
|
|
11
10
|
**Mural::Widget.attrs,
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
# If true, the widget will automatically resize to fit its content.
|
|
14
13
|
auto_resize: 'autoResize',
|
|
14
|
+
|
|
15
|
+
# The title of the widget in the outline.
|
|
16
|
+
title: 'title',
|
|
17
|
+
|
|
18
|
+
# The array of columns definition.
|
|
15
19
|
columns: 'columns',
|
|
20
|
+
|
|
21
|
+
# The array of rows definition.
|
|
16
22
|
rows: 'rows',
|
|
23
|
+
|
|
24
|
+
# Style properties of the widget.
|
|
17
25
|
style: 'style'
|
|
18
26
|
)
|
|
19
27
|
|
|
20
28
|
def self.decode(json)
|
|
21
29
|
super.tap do |table|
|
|
22
|
-
table.columns
|
|
23
|
-
table.rows
|
|
30
|
+
table.columns&.map! { |col| Column.decode(col) }
|
|
31
|
+
table.rows&.map! { |row| Row.decode(row) }
|
|
24
32
|
table.style = Style.decode(table.style)
|
|
25
33
|
end
|
|
26
34
|
end
|
|
@@ -28,16 +36,27 @@ module Mural
|
|
|
28
36
|
class Column
|
|
29
37
|
include Mural::Codec
|
|
30
38
|
|
|
31
|
-
define_attributes(
|
|
39
|
+
define_attributes(
|
|
40
|
+
# The ID of the column.
|
|
41
|
+
column_id: 'columnId',
|
|
42
|
+
|
|
43
|
+
# The width of the column.
|
|
44
|
+
width: 'width'
|
|
45
|
+
)
|
|
32
46
|
end
|
|
33
47
|
|
|
34
48
|
class Row
|
|
35
49
|
include Mural::Codec
|
|
36
50
|
|
|
37
51
|
define_attributes(
|
|
52
|
+
# The height of the row.
|
|
38
53
|
height: 'height',
|
|
54
|
+
|
|
55
|
+
# The min height of the row.
|
|
39
56
|
min_height: 'minHeight',
|
|
40
|
-
|
|
57
|
+
|
|
58
|
+
# The ID of the row.
|
|
59
|
+
row_id: 'rowId'
|
|
41
60
|
)
|
|
42
61
|
end
|
|
43
62
|
|
|
@@ -45,7 +64,10 @@ module Mural
|
|
|
45
64
|
include Mural::Codec
|
|
46
65
|
|
|
47
66
|
define_attributes(
|
|
67
|
+
# The border color of the widget in hex with alpha format.
|
|
48
68
|
border_color: 'borderColor',
|
|
69
|
+
|
|
70
|
+
# The border width
|
|
49
71
|
border_width: 'borderWidth'
|
|
50
72
|
)
|
|
51
73
|
end
|
|
@@ -2,21 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
module Mural
|
|
4
4
|
class Widget
|
|
5
|
-
# UNDOCUMENTED
|
|
6
|
-
# This widget is not documented within Mural public API documentation.
|
|
7
5
|
class TableCell
|
|
8
6
|
include Mural::Codec
|
|
9
7
|
|
|
8
|
+
# # https://developers.mural.co/public/reference/createtable
|
|
10
9
|
define_attributes(
|
|
11
10
|
**Mural::Widget.attrs,
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
# Number of columns a cell can span.
|
|
14
13
|
col_span: 'colSpan',
|
|
14
|
+
|
|
15
|
+
# The ID of the column.
|
|
15
16
|
column_id: 'columnId',
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
# The ID of the row.
|
|
19
|
+
row_id: 'rowId',
|
|
20
|
+
|
|
21
|
+
# Number of rows a cell can span.
|
|
17
22
|
row_span: 'rowSpan',
|
|
23
|
+
|
|
24
|
+
# Style properties of the widget.
|
|
18
25
|
style: 'style',
|
|
19
|
-
|
|
26
|
+
|
|
27
|
+
# textContent properties of the widget.
|
|
28
|
+
text_content: 'textContent',
|
|
29
|
+
|
|
30
|
+
# The title of the widget in the outline.
|
|
31
|
+
title: 'title'
|
|
20
32
|
)
|
|
21
33
|
|
|
22
34
|
def self.decode(json)
|
|
@@ -29,6 +41,7 @@ module Mural
|
|
|
29
41
|
class Style
|
|
30
42
|
include Mural::Codec
|
|
31
43
|
|
|
44
|
+
# The backgroud color of the cell in hex with alpha format.
|
|
32
45
|
define_attributes(background_color: 'backgroundColor')
|
|
33
46
|
end
|
|
34
47
|
|
|
@@ -36,12 +49,29 @@ module Mural
|
|
|
36
49
|
include Mural::Codec
|
|
37
50
|
|
|
38
51
|
define_attributes(
|
|
52
|
+
# Font-family of the text.
|
|
39
53
|
font_family: 'fontFamily',
|
|
54
|
+
|
|
55
|
+
# Text size.
|
|
40
56
|
font_size: 'fontSize',
|
|
57
|
+
|
|
58
|
+
# The orientation of the text content.
|
|
59
|
+
# ["horizontal", "vertical-left", "vertical-right"]
|
|
41
60
|
orientation: 'orientation',
|
|
61
|
+
|
|
62
|
+
# Padding of the text content.
|
|
42
63
|
padding: 'padding',
|
|
64
|
+
|
|
65
|
+
# The text in the widget. It supports inline formatting using HTML
|
|
66
|
+
# tags.
|
|
43
67
|
text: 'text',
|
|
68
|
+
|
|
69
|
+
# The alignment of the text.
|
|
70
|
+
# ["left", "center", "right"]
|
|
44
71
|
text_align: 'textAlign',
|
|
72
|
+
|
|
73
|
+
# The vertical alignment of the text.
|
|
74
|
+
# ["top", "middle", "bottom"]
|
|
45
75
|
vertical_align: 'verticalAlign'
|
|
46
76
|
)
|
|
47
77
|
end
|
data/lib/mural/widget/text.rb
CHANGED
|
@@ -18,7 +18,7 @@ module Mural
|
|
|
18
18
|
hyperlink: 'hyperlink',
|
|
19
19
|
|
|
20
20
|
# Text displayed on the hyperlink button.
|
|
21
|
-
|
|
21
|
+
hyperlink_title: 'hyperlinkTitle',
|
|
22
22
|
|
|
23
23
|
# When true, the text wraps to fit the widget. When false, the widget
|
|
24
24
|
# grows to fit the text. True when widget is created as a textbox and
|
|
@@ -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
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class UpdateCommentParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/updatecomment
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::CreateCommentParams.attrs.reject do |attr|
|
|
11
|
+
%i[stacking_order].include? attr
|
|
12
|
+
end,
|
|
13
|
+
|
|
14
|
+
replies: 'replies'
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
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
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class UpdateImageParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
define_attributes(
|
|
9
|
+
**Mural::Widget::CreateImageParams.attrs.reject do |attr|
|
|
10
|
+
%i[name stacking_order].include? attr
|
|
11
|
+
end
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class UpdateShapeParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/updateshapewidget
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::CreateShapeParams.attrs.reject do |attr|
|
|
11
|
+
%i[shape stacking_order].include? attr
|
|
12
|
+
end
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
Style = Mural::Widget::Shape::Style
|
|
16
|
+
|
|
17
|
+
def encode
|
|
18
|
+
super.tap do |json|
|
|
19
|
+
json['style'] = json['style']&.encode
|
|
20
|
+
end.compact
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class UpdateStickyNoteParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/updatestickynote
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::CreateStickyNoteParams.attrs.reject do |attr|
|
|
11
|
+
%i[stacking_order shape].include? attr
|
|
12
|
+
end
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
Style = Mural::Widget::StickyNote::Style
|
|
16
|
+
|
|
17
|
+
def encode
|
|
18
|
+
super.tap do |json|
|
|
19
|
+
json['style'] = json['style']&.encode
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class UpdateTextBoxParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/updatetextbox
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::CreateTextBoxParams.attrs.reject do |attr|
|
|
11
|
+
%i[stacking_order].include? attr
|
|
12
|
+
end
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
Style = Mural::Widget::Text::Style
|
|
16
|
+
|
|
17
|
+
def encode
|
|
18
|
+
super.tap do |json|
|
|
19
|
+
json['style'] = json['style']&.encode
|
|
20
|
+
end.compact
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mural
|
|
4
|
+
class Widget
|
|
5
|
+
class UpdateTitleParams
|
|
6
|
+
include Mural::Codec
|
|
7
|
+
|
|
8
|
+
# https://developers.mural.co/public/reference/updatetitle
|
|
9
|
+
define_attributes(
|
|
10
|
+
**Mural::Widget::CreateTitleParams.attrs.reject do |attr|
|
|
11
|
+
%i[stacking_order].include? attr
|
|
12
|
+
end
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
Style = Mural::Widget::Text::Style
|
|
16
|
+
|
|
17
|
+
def encode
|
|
18
|
+
super.tap do |json|
|
|
19
|
+
json['style'] = json['style']&.encode
|
|
20
|
+
end.compact
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|