mural-ruby 0.2.1 → 0.4.0
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/lib/mural/client/mural_content/areas.rb +29 -0
- data/lib/mural/client/mural_content/arrows.rb +29 -0
- data/lib/mural/client/mural_content.rb +2 -0
- data/lib/mural/version.rb +1 -1
- data/lib/mural/widget/arrow.rb +7 -0
- data/lib/mural/widget/create_area_params.rb +38 -0
- data/lib/mural/widget/create_arrow_params.rb +43 -0
- data/lib/mural/widget/update_area_params.rb +21 -0
- data/lib/mural/widget/update_arrow_params.rb +27 -0
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb82932dd0ccbb4d24c3757001c13cbba96f7d4749d9a9d7c6b3af4c696e9a1a
|
4
|
+
data.tar.gz: 9e5f87168f3b1207c535923e2eeffb152b4ea2c25c1e175e5e71490aac91469e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ecef1c87c8f60b6919fa881e32197a789aa1792bf231e45f7b2e88d285d92aad5294eadc06af85a581bbfd0c16b266ca3890f0b004cc3153726b0c299b49cb2
|
7
|
+
data.tar.gz: e3bf3aef7df48aaaca7d789af5a8617a4090d596acb1b38a1344c04dd6610cbdb2c70b2191688c687584da7181589d8282fa8e64a39967ba2feaf003fa90405d
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mural
|
4
|
+
class Client
|
5
|
+
class MuralContent
|
6
|
+
module Areas
|
7
|
+
# https://developers.mural.co/public/reference/createarea
|
8
|
+
def create_area(mural_id, create_area_params)
|
9
|
+
json = post(
|
10
|
+
"/api/public/v1/murals/#{mural_id}/widgets/area",
|
11
|
+
create_area_params.encode
|
12
|
+
)
|
13
|
+
|
14
|
+
Mural::Widget::Area.decode(json['value'])
|
15
|
+
end
|
16
|
+
|
17
|
+
# https://developers.mural.co/public/reference/updatearea
|
18
|
+
def update_area(mural_id, area_id, update_area_params)
|
19
|
+
json = patch(
|
20
|
+
"/api/public/v1/murals/#{mural_id}/widgets/area/#{area_id}",
|
21
|
+
update_area_params.encode
|
22
|
+
)
|
23
|
+
|
24
|
+
Mural::Widget::Area.decode(json['value'])
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mural
|
4
|
+
class Client
|
5
|
+
class MuralContent
|
6
|
+
module Arrows
|
7
|
+
# https://developers.mural.co/public/reference/createarrow
|
8
|
+
def create_arrow(mural_id, create_arrow_params)
|
9
|
+
json = post(
|
10
|
+
"/api/public/v1/murals/#{mural_id}/widgets/arrow",
|
11
|
+
create_arrow_params.encode
|
12
|
+
)
|
13
|
+
|
14
|
+
Mural::Widget::Arrow.decode(json['value'])
|
15
|
+
end
|
16
|
+
|
17
|
+
# https://developers.mural.co/public/reference/updatearrow
|
18
|
+
def update_arrow(mural_id, arrow_id, update_arrow_params)
|
19
|
+
json = patch(
|
20
|
+
"/api/public/v1/murals/#{mural_id}/widgets/arrow/#{arrow_id}",
|
21
|
+
update_arrow_params.encode
|
22
|
+
)
|
23
|
+
|
24
|
+
Mural::Widget::Arrow.decode(json['value'])
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/mural/version.rb
CHANGED
data/lib/mural/widget/arrow.rb
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mural
|
4
|
+
class Widget
|
5
|
+
class CreateAreaParams
|
6
|
+
include Mural::Codec
|
7
|
+
|
8
|
+
define_attributes(
|
9
|
+
**Mural::Widget::Area.attrs.reject do |attr|
|
10
|
+
%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
|
25
|
+
].include? attr
|
26
|
+
end
|
27
|
+
)
|
28
|
+
|
29
|
+
Style = Mural::Widget::Area::Style
|
30
|
+
|
31
|
+
def encode
|
32
|
+
super.tap do |json|
|
33
|
+
json['style'] = json['style']&.encode
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mural
|
4
|
+
class Widget
|
5
|
+
class CreateArrowParams
|
6
|
+
include Mural::Codec
|
7
|
+
|
8
|
+
# https://developers.mural.co/public/reference/createarrow
|
9
|
+
define_attributes(
|
10
|
+
**Mural::Widget::Arrow.attrs.reject do |attr|
|
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
|
26
|
+
].include? attr
|
27
|
+
end
|
28
|
+
)
|
29
|
+
|
30
|
+
def encode
|
31
|
+
super.tap do |json|
|
32
|
+
json['points']&.map!(&:encode)
|
33
|
+
json['label'] = json['label']&.encode
|
34
|
+
json['style'] = json['style']&.encode
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
Style = Mural::Widget::Arrow::Style
|
39
|
+
Label = Mural::Widget::Arrow::Label
|
40
|
+
Point = Mural::Widget::Arrow::Point
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mural
|
4
|
+
class Widget
|
5
|
+
class UpdateAreaParams
|
6
|
+
include Mural::Codec
|
7
|
+
|
8
|
+
define_attributes(
|
9
|
+
**Mural::Widget::CreateAreaParams.attrs
|
10
|
+
)
|
11
|
+
|
12
|
+
Style = Mural::Widget::Area::Style
|
13
|
+
|
14
|
+
def encode
|
15
|
+
super.tap do |json|
|
16
|
+
json['style'] = json['style']&.encode
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mural
|
4
|
+
class Widget
|
5
|
+
class UpdateArrowParams
|
6
|
+
include Mural::Codec
|
7
|
+
|
8
|
+
define_attributes(
|
9
|
+
**Mural::Widget::CreateArrowParams.attrs.reject do |attr|
|
10
|
+
%i[stacking_order].include? attr
|
11
|
+
end
|
12
|
+
)
|
13
|
+
|
14
|
+
def encode
|
15
|
+
super.tap do |json|
|
16
|
+
json['points']&.map!(&:encode)
|
17
|
+
json['label'] = json['label']&.encode
|
18
|
+
json['style'] = json['style']&.encode
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
Style = Mural::Widget::Arrow::Style
|
23
|
+
Label = Mural::Widget::Arrow::Label
|
24
|
+
Point = Mural::Widget::Arrow::Point
|
25
|
+
end
|
26
|
+
end
|
27
|
+
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.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mickaël Pham
|
@@ -46,6 +46,8 @@ files:
|
|
46
46
|
- lib/mural/client.rb
|
47
47
|
- lib/mural/client/authentication.rb
|
48
48
|
- lib/mural/client/mural_content.rb
|
49
|
+
- lib/mural/client/mural_content/areas.rb
|
50
|
+
- lib/mural/client/mural_content/arrows.rb
|
49
51
|
- lib/mural/client/mural_content/chats.rb
|
50
52
|
- lib/mural/client/mural_content/facilitation_features.rb
|
51
53
|
- lib/mural/client/mural_content/files.rb
|
@@ -100,6 +102,8 @@ files:
|
|
100
102
|
- lib/mural/widget/area.rb
|
101
103
|
- lib/mural/widget/arrow.rb
|
102
104
|
- lib/mural/widget/comment.rb
|
105
|
+
- lib/mural/widget/create_area_params.rb
|
106
|
+
- lib/mural/widget/create_arrow_params.rb
|
103
107
|
- lib/mural/widget/create_file_params.rb
|
104
108
|
- lib/mural/widget/file.rb
|
105
109
|
- lib/mural/widget/icon.rb
|
@@ -109,6 +113,8 @@ files:
|
|
109
113
|
- lib/mural/widget/table.rb
|
110
114
|
- lib/mural/widget/table_cell.rb
|
111
115
|
- lib/mural/widget/text.rb
|
116
|
+
- lib/mural/widget/update_area_params.rb
|
117
|
+
- lib/mural/widget/update_arrow_params.rb
|
112
118
|
- lib/mural/widget/update_file_params.rb
|
113
119
|
- lib/mural/workspace.rb
|
114
120
|
- lib/mural/workspace_invitation.rb
|