mural-ruby 0.3.0 → 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 +10 -0
- data/lib/mural/client/mural_content.rb +1 -0
- data/lib/mural/version.rb +1 -1
- data/lib/mural/widget/create_area_params.rb +38 -0
- data/lib/mural/widget/update_area_params.rb +21 -0
- data/lib/mural/widget/update_arrow_params.rb +27 -0
- metadata +5 -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
|
@@ -13,6 +13,16 @@ module Mural
|
|
13
13
|
|
14
14
|
Mural::Widget::Arrow.decode(json['value'])
|
15
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
|
16
26
|
end
|
17
27
|
end
|
18
28
|
end
|
data/lib/mural/version.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,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,7 @@ 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
|
49
50
|
- lib/mural/client/mural_content/arrows.rb
|
50
51
|
- lib/mural/client/mural_content/chats.rb
|
51
52
|
- lib/mural/client/mural_content/facilitation_features.rb
|
@@ -101,6 +102,7 @@ files:
|
|
101
102
|
- lib/mural/widget/area.rb
|
102
103
|
- lib/mural/widget/arrow.rb
|
103
104
|
- lib/mural/widget/comment.rb
|
105
|
+
- lib/mural/widget/create_area_params.rb
|
104
106
|
- lib/mural/widget/create_arrow_params.rb
|
105
107
|
- lib/mural/widget/create_file_params.rb
|
106
108
|
- lib/mural/widget/file.rb
|
@@ -111,6 +113,8 @@ files:
|
|
111
113
|
- lib/mural/widget/table.rb
|
112
114
|
- lib/mural/widget/table_cell.rb
|
113
115
|
- lib/mural/widget/text.rb
|
116
|
+
- lib/mural/widget/update_area_params.rb
|
117
|
+
- lib/mural/widget/update_arrow_params.rb
|
114
118
|
- lib/mural/widget/update_file_params.rb
|
115
119
|
- lib/mural/workspace.rb
|
116
120
|
- lib/mural/workspace_invitation.rb
|