monday_ruby 0.6.1 → 0.6.2
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/CHANGELOG.md +6 -0
- data/lib/monday/resources/activity_log.rb +1 -1
- data/lib/monday/resources/board.rb +4 -4
- data/lib/monday/resources/board_view.rb +1 -1
- data/lib/monday/resources/column.rb +7 -7
- data/lib/monday/resources/group.rb +7 -7
- data/lib/monday/resources/item.rb +2 -2
- data/lib/monday/resources/subitem.rb +2 -2
- data/lib/monday/resources/update.rb +5 -5
- data/lib/monday/resources/workspace.rb +2 -2
- data/lib/monday/util.rb +5 -1
- data/lib/monday/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4da1daad80c509a485414efe293d4a628dd6b002871b403c877d150ec12c178
|
4
|
+
data.tar.gz: 10f869bd1cd5fdf8068a8314644bd59ac3da16c98e3794f0a60347fde951f44b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 206f792cdc8f7950c309380a58019dd8ce6874fc2a2dce2da0fdf9cd7cfd5d6e36f1fb8c65715f458de19039e60679bc4b9ba6b9723c3e90a9b8e34aa685011e
|
7
|
+
data.tar.gz: b635c776e2ea724aeb5dad4e047ef03a35226f7ee0031afd3b05831250e0bf4ef64c3835c41df332eb286e1e8992f3206772c0a1c113e9bc8b24825a8f961227
|
data/CHANGELOG.md
CHANGED
@@ -14,7 +14,7 @@ module Monday
|
|
14
14
|
# By default, ID, event and data are retrieved.
|
15
15
|
def activity_logs(board_ids, args: {}, select: DEFAULT_SELECT)
|
16
16
|
query = "query { boards(ids: #{board_ids}) " \
|
17
|
-
"{ activity_logs
|
17
|
+
"{ activity_logs#{Util.format_args(args)} {#{Util.format_select(select)}}}}"
|
18
18
|
|
19
19
|
make_request(query)
|
20
20
|
end
|
@@ -12,7 +12,7 @@ module Monday
|
|
12
12
|
# Allows customizing the values to retrieve using the select option.
|
13
13
|
# By default, ID, name and description fields are retrieved.
|
14
14
|
def boards(args: {}, select: DEFAULT_SELECT)
|
15
|
-
query = "query { boards
|
15
|
+
query = "query { boards#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
16
16
|
|
17
17
|
make_request(query)
|
18
18
|
end
|
@@ -23,7 +23,7 @@ module Monday
|
|
23
23
|
# Allows customizing the values to retrieve using the select option.
|
24
24
|
# By default, ID, name and description fields are retrieved.
|
25
25
|
def create_board(args: {}, select: DEFAULT_SELECT)
|
26
|
-
query = "mutation { create_board
|
26
|
+
query = "mutation { create_board#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
27
27
|
|
28
28
|
make_request(query)
|
29
29
|
end
|
@@ -34,7 +34,7 @@ module Monday
|
|
34
34
|
# Allows customizing the values to retrieve using the select option.
|
35
35
|
# By default, ID, name and description fields are retrieved.
|
36
36
|
def duplicate_board(args: {}, select: DEFAULT_SELECT)
|
37
|
-
query = "mutation { duplicate_board
|
37
|
+
query = "mutation { duplicate_board#{Util.format_args(args)} { board {#{Util.format_select(select)}}}}"
|
38
38
|
|
39
39
|
make_request(query)
|
40
40
|
end
|
@@ -44,7 +44,7 @@ module Monday
|
|
44
44
|
# Allows customizing updating the board using the args option.
|
45
45
|
# Returns the ID of the updated board.
|
46
46
|
def update_board(args: {})
|
47
|
-
query = "mutation { update_board
|
47
|
+
query = "mutation { update_board#{Util.format_args(args)}}"
|
48
48
|
|
49
49
|
make_request(query)
|
50
50
|
end
|
@@ -12,7 +12,7 @@ module Monday
|
|
12
12
|
# Allows customizing the values to retrieve using the select option.
|
13
13
|
# By default, ID, name and type fields are retrieved.
|
14
14
|
def board_views(args: {}, select: DEFAULT_SELECT)
|
15
|
-
query = "query { boards
|
15
|
+
query = "query { boards#{Util.format_args(args)} { views {#{Util.format_select(select)}}}}"
|
16
16
|
|
17
17
|
make_request(query)
|
18
18
|
end
|
@@ -12,7 +12,7 @@ module Monday
|
|
12
12
|
# Allows customizing the values to retrieve using the select option.
|
13
13
|
# By default, ID, title and description fields are retrieved.
|
14
14
|
def columns(args: {}, select: DEFAULT_SELECT)
|
15
|
-
query = "query { boards
|
15
|
+
query = "query { boards#{Util.format_args(args)} { columns {#{Util.format_select(select)}}}}"
|
16
16
|
|
17
17
|
make_request(query)
|
18
18
|
end
|
@@ -37,7 +37,7 @@ module Monday
|
|
37
37
|
# Allows customizing the values to retrieve using the select option.
|
38
38
|
# By default, ID, title and description fields are retrieved.
|
39
39
|
def create_column(args: {}, select: DEFAULT_SELECT)
|
40
|
-
query = "mutation { create_column
|
40
|
+
query = "mutation { create_column#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
41
41
|
|
42
42
|
make_request(query)
|
43
43
|
end
|
@@ -48,7 +48,7 @@ module Monday
|
|
48
48
|
# Allows customizing the values to retrieve using the select option.
|
49
49
|
# By default, ID, title and description fields are retrieved.
|
50
50
|
def change_column_title(args: {}, select: DEFAULT_SELECT)
|
51
|
-
query = "mutation { change_column_title
|
51
|
+
query = "mutation { change_column_title#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
52
52
|
|
53
53
|
make_request(query)
|
54
54
|
end
|
@@ -59,7 +59,7 @@ module Monday
|
|
59
59
|
# Allows customizing the values to retrieve using the select option.
|
60
60
|
# By default, ID, title and description fields are retrieved.
|
61
61
|
def change_column_metadata(args: {}, select: DEFAULT_SELECT)
|
62
|
-
query = "mutation { change_column_metadata
|
62
|
+
query = "mutation { change_column_metadata#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
63
63
|
|
64
64
|
make_request(query)
|
65
65
|
end
|
@@ -70,7 +70,7 @@ module Monday
|
|
70
70
|
# Allows customizing the item values to retrieve using the select option.
|
71
71
|
# By default, ID, and name fields are retrieved.
|
72
72
|
def change_column_value(args: {}, select: %w[id name])
|
73
|
-
query = "mutation { change_column_value
|
73
|
+
query = "mutation { change_column_value#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
74
74
|
|
75
75
|
make_request(query)
|
76
76
|
end
|
@@ -81,7 +81,7 @@ module Monday
|
|
81
81
|
# Allows customizing the item values to retrieve using the select option.
|
82
82
|
# By default, ID, and name fields are retrieved.
|
83
83
|
def change_simple_column_value(args: {}, select: %w[id name])
|
84
|
-
query = "mutation { change_simple_column_value
|
84
|
+
query = "mutation { change_simple_column_value#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
85
85
|
|
86
86
|
make_request(query)
|
87
87
|
end
|
@@ -92,7 +92,7 @@ module Monday
|
|
92
92
|
# Allows customizing the item values to retrieve using the select option.
|
93
93
|
# By default, ID, and name fields are retrieved.
|
94
94
|
def change_multiple_column_value(args: {}, select: %w[id name])
|
95
|
-
query = "mutation { change_multiple_column_values
|
95
|
+
query = "mutation { change_multiple_column_values#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
96
96
|
|
97
97
|
make_request(query)
|
98
98
|
end
|
@@ -12,7 +12,7 @@ module Monday
|
|
12
12
|
# Allows customizing the values to retrieve using the select option.
|
13
13
|
# By default, ID and title fields are retrieved.
|
14
14
|
def groups(args: {}, select: DEFAULT_SELECT)
|
15
|
-
query = "query { boards
|
15
|
+
query = "query { boards#{Util.format_args(args)} { groups{#{Util.format_select(select)}}}}"
|
16
16
|
|
17
17
|
make_request(query)
|
18
18
|
end
|
@@ -23,7 +23,7 @@ module Monday
|
|
23
23
|
# Allows customizing the values to retrieve using the select option.
|
24
24
|
# By default, ID and title fields are retrieved.
|
25
25
|
def create_group(args: {}, select: DEFAULT_SELECT)
|
26
|
-
query = "mutation { create_group
|
26
|
+
query = "mutation { create_group#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
27
27
|
|
28
28
|
make_request(query)
|
29
29
|
end
|
@@ -33,7 +33,7 @@ module Monday
|
|
33
33
|
# Allows customizing updating the group using the args option.
|
34
34
|
# By default, returns the ID of the updated group.
|
35
35
|
def update_group(args: {}, select: ["id"])
|
36
|
-
query = "mutation { update_group
|
36
|
+
query = "mutation { update_group#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
37
37
|
|
38
38
|
make_request(query)
|
39
39
|
end
|
@@ -44,7 +44,7 @@ module Monday
|
|
44
44
|
# Allows customizing the values to retrieve using the select option.
|
45
45
|
# By default, returns the ID of the group deleted.
|
46
46
|
def delete_group(args: {}, select: ["id"])
|
47
|
-
query = "mutation { delete_group
|
47
|
+
query = "mutation { delete_group#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
48
48
|
|
49
49
|
make_request(query)
|
50
50
|
end
|
@@ -55,7 +55,7 @@ module Monday
|
|
55
55
|
# Allows customizing the values to retrieve using the select option.
|
56
56
|
# By default, returns the ID of the group archived.
|
57
57
|
def archive_group(args: {}, select: ["id"])
|
58
|
-
query = "mutation { archive_group
|
58
|
+
query = "mutation { archive_group#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
59
59
|
|
60
60
|
make_request(query)
|
61
61
|
end
|
@@ -66,7 +66,7 @@ module Monday
|
|
66
66
|
# Allows customizing the values to retrieve using the select option.
|
67
67
|
# By default, ID and title fields are retrieved.
|
68
68
|
def duplicate_group(args: {}, select: DEFAULT_SELECT)
|
69
|
-
query = "mutation { duplicate_group
|
69
|
+
query = "mutation { duplicate_group#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
70
70
|
|
71
71
|
make_request(query)
|
72
72
|
end
|
@@ -77,7 +77,7 @@ module Monday
|
|
77
77
|
# Allows customizing the values to retrieve using the select option.
|
78
78
|
# By default, ID and title fields are retrieved.
|
79
79
|
def move_item_to_group(args: {}, select: ["id"])
|
80
|
-
query = "mutation { move_item_to_group
|
80
|
+
query = "mutation { move_item_to_group#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
81
81
|
|
82
82
|
make_request(query)
|
83
83
|
end
|
@@ -12,7 +12,7 @@ module Monday
|
|
12
12
|
# Allows customizing the values to retrieve using the select option.
|
13
13
|
# By default, ID, name and created_at fields are retrieved.
|
14
14
|
def items(args: {}, select: DEFAULT_SELECT)
|
15
|
-
query = "query { items
|
15
|
+
query = "query { items#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
16
16
|
|
17
17
|
make_request(query)
|
18
18
|
end
|
@@ -23,7 +23,7 @@ module Monday
|
|
23
23
|
# Allows customizing the values to retrieve using the select option.
|
24
24
|
# By default, ID, name and created_at fields are retrieved.
|
25
25
|
def create_item(args: {}, select: DEFAULT_SELECT)
|
26
|
-
query = "mutation { create_item
|
26
|
+
query = "mutation { create_item#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
27
27
|
|
28
28
|
make_request(query)
|
29
29
|
end
|
@@ -12,7 +12,7 @@ module Monday
|
|
12
12
|
# Allows customizing the values to retrieve using the select option.
|
13
13
|
# By default, ID, name and created_at fields are retrieved.
|
14
14
|
def subitems(args: {}, select: DEFAULT_SELECT)
|
15
|
-
query = "query { items
|
15
|
+
query = "query { items#{Util.format_args(args)} { subitems{#{Util.format_select(select)}}}}"
|
16
16
|
|
17
17
|
make_request(query)
|
18
18
|
end
|
@@ -23,7 +23,7 @@ module Monday
|
|
23
23
|
# Allows customizing the values to retrieve using the select option.
|
24
24
|
# By default, ID, name and created_at fields are retrieved.
|
25
25
|
def create_subitem(args: {}, select: DEFAULT_SELECT)
|
26
|
-
query = "mutation { create_subitem
|
26
|
+
query = "mutation { create_subitem#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
27
27
|
|
28
28
|
make_request(query)
|
29
29
|
end
|
@@ -12,7 +12,7 @@ module Monday
|
|
12
12
|
# Allows customizing the values to retrieve using the select option.
|
13
13
|
# By default, ID, body and created_at fields are retrieved.
|
14
14
|
def updates(args: {}, select: DEFAULT_SELECT)
|
15
|
-
query = "query { updates
|
15
|
+
query = "query { updates#{Util.format_args(args)} { #{Util.format_select(select)}}}"
|
16
16
|
|
17
17
|
make_request(query)
|
18
18
|
end
|
@@ -23,7 +23,7 @@ module Monday
|
|
23
23
|
# Allows customizing the values to retrieve using the select option.
|
24
24
|
# By default, ID, body and created_at fields are retrieved.
|
25
25
|
def create_update(args: {}, select: DEFAULT_SELECT)
|
26
|
-
query = "mutation { create_update
|
26
|
+
query = "mutation { create_update#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
27
27
|
|
28
28
|
make_request(query)
|
29
29
|
end
|
@@ -34,7 +34,7 @@ module Monday
|
|
34
34
|
# Allows customizing the values to retrieve using the select option.
|
35
35
|
# By default, ID is retrieved.
|
36
36
|
def like_update(args: {}, select: %w[id])
|
37
|
-
query = "mutation { like_update
|
37
|
+
query = "mutation { like_update#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
38
38
|
|
39
39
|
make_request(query)
|
40
40
|
end
|
@@ -45,7 +45,7 @@ module Monday
|
|
45
45
|
# Allows customizing the values to retrieve using the select option.
|
46
46
|
# By default, ID is retrieved.
|
47
47
|
def clear_item_updates(args: {}, select: %w[id])
|
48
|
-
query = "mutation { clear_item_updates
|
48
|
+
query = "mutation { clear_item_updates#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
49
49
|
|
50
50
|
make_request(query)
|
51
51
|
end
|
@@ -56,7 +56,7 @@ module Monday
|
|
56
56
|
# Allows customizing the values to retrieve using the select option.
|
57
57
|
# By default, ID is retrieved.
|
58
58
|
def delete_update(args: {}, select: %w[id])
|
59
|
-
query = "mutation { delete_update
|
59
|
+
query = "mutation { delete_update#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
60
60
|
|
61
61
|
make_request(query)
|
62
62
|
end
|
@@ -12,7 +12,7 @@ module Monday
|
|
12
12
|
# Allows customizing the values to retrieve using the select option.
|
13
13
|
# By default, ID, name and description fields are retrieved.
|
14
14
|
def workspaces(args: {}, select: DEFAULT_SELECT)
|
15
|
-
query = "query { workspaces
|
15
|
+
query = "query { workspaces#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
16
16
|
|
17
17
|
make_request(query)
|
18
18
|
end
|
@@ -23,7 +23,7 @@ module Monday
|
|
23
23
|
# Allows customizing the values to retrieve using the select option.
|
24
24
|
# By default, ID, name and description fields are retrieved.
|
25
25
|
def create_workspace(args: {}, select: DEFAULT_SELECT)
|
26
|
-
query = "mutation { create_workspace
|
26
|
+
query = "mutation { create_workspace#{Util.format_args(args)} {#{Util.format_select(select)}}}"
|
27
27
|
|
28
28
|
make_request(query)
|
29
29
|
end
|
data/lib/monday/util.rb
CHANGED
@@ -9,9 +9,13 @@ module Monday
|
|
9
9
|
# input: { key: "multiple word value" }
|
10
10
|
# output: "key: \"multiple word value\""
|
11
11
|
def format_args(obj)
|
12
|
-
|
12
|
+
return "" if obj.empty?
|
13
|
+
|
14
|
+
formatted = obj.map do |key, value|
|
13
15
|
"#{key}: #{formatted_args_value(value)}"
|
14
16
|
end.join(", ")
|
17
|
+
|
18
|
+
"(#{formatted})"
|
15
19
|
end
|
16
20
|
|
17
21
|
# Converts the select values into a valid string for API.
|
data/lib/monday/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monday_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sanif Himani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Gem to easily interact with monday.com API using native Ruby
|
15
15
|
email:
|
@@ -95,7 +95,7 @@ licenses:
|
|
95
95
|
metadata:
|
96
96
|
homepage_uri: https://github.com/sanifhimani/monday_ruby
|
97
97
|
documentation_uri: https://monday-ruby.gitbook.io/docs/
|
98
|
-
changelog_uri: https://github.com/sanifhimani/monday_ruby/blob/v0.6.
|
98
|
+
changelog_uri: https://github.com/sanifhimani/monday_ruby/blob/v0.6.2/CHANGELOG.md
|
99
99
|
rubygems_mfa_required: 'true'
|
100
100
|
post_install_message:
|
101
101
|
rdoc_options: []
|