monday_ruby 0.1.0 → 0.2.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.env +1 -0
  3. data/.rubocop.yml +1 -1
  4. data/CHANGELOG.md +11 -0
  5. data/README.md +24 -2
  6. data/docs/README.md +12 -0
  7. data/docs/SUMMARY.md +39 -0
  8. data/docs/client.md +15 -0
  9. data/docs/configuration.md +28 -0
  10. data/docs/getting-started.md +25 -0
  11. data/docs/quick-start.md +269 -0
  12. data/docs/resources/README.md +27 -0
  13. data/docs/resources/account/README.md +9 -0
  14. data/docs/resources/account/accounts.md +82 -0
  15. data/docs/resources/activity-log/README.md +9 -0
  16. data/docs/resources/activity-log/activity_logs.md +95 -0
  17. data/docs/resources/board/README.md +21 -0
  18. data/docs/resources/board/archive_board.md +79 -0
  19. data/docs/resources/board/boards.md +96 -0
  20. data/docs/resources/board/create_board.md +95 -0
  21. data/docs/resources/board/delete_board.md +79 -0
  22. data/docs/resources/board/delete_board_subscribers.md +87 -0
  23. data/docs/resources/board/duplicate_board.md +94 -0
  24. data/docs/resources/board/update_board.md +91 -0
  25. data/docs/resources/board-view/README.md +9 -0
  26. data/docs/resources/board-view/board_views.md +88 -0
  27. data/docs/resources/column/README.md +25 -0
  28. data/docs/resources/column/change_column_metadata.md +70 -0
  29. data/docs/resources/column/change_column_title.md +68 -0
  30. data/docs/resources/column/change_column_value.md +73 -0
  31. data/docs/resources/column/change_multiple_column_value.md +81 -0
  32. data/docs/resources/column/change_simple_column_value.md +69 -0
  33. data/docs/resources/column/column_values.md +115 -0
  34. data/docs/resources/column/columns.md +117 -0
  35. data/docs/resources/column/create_column.md +70 -0
  36. data/docs/resources/column/delete_column.md +58 -0
  37. data/docs/resources/item/README.md +17 -0
  38. data/docs/resources/item/archive_item.md +80 -0
  39. data/docs/resources/item/create_item.md +105 -0
  40. data/docs/resources/item/delete_item.md +80 -0
  41. data/docs/resources/item/duplicate_item.md +87 -0
  42. data/docs/resources/item/items.md +95 -0
  43. data/docs/response.md +21 -0
  44. data/lib/monday/client.rb +9 -8
  45. data/lib/monday/configuration.rb +7 -1
  46. data/lib/monday/version.rb +1 -1
  47. data/lib/monday_ruby.rb +13 -0
  48. data/monday_ruby.gemspec +2 -2
  49. metadata +43 -4
@@ -0,0 +1,91 @@
1
+ # #update\_board
2
+
3
+ The `update_board` mutation will allow you to update a board.
4
+
5
+ ### Basic usage
6
+
7
+ This method accepts various arguments to duplicate a board. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/boards#arguments-3).
8
+
9
+ You can pass these filters using the `args` option.
10
+
11
+ {% code lineNumbers="true" %}
12
+ ```ruby
13
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
14
+
15
+ args = {
16
+ board_id: 789,
17
+ board_attribute: "description",
18
+ new_value: "Updated description"
19
+ }
20
+ response = client.update_board(args: args)
21
+
22
+ puts response.body
23
+ ```
24
+ {% endcode %}
25
+
26
+ This will update board `789`'s description.
27
+
28
+ This will return the boards' ID, name and description fields by default.
29
+
30
+ The response body from the above query would be as follows:
31
+
32
+ {% code lineNumbers="true" %}
33
+ ```json
34
+ {
35
+ "data": {
36
+ "update_board": "{\"success\":true,\"undo_data\":{\"undo_record_id\":65894,\"action_type\":\"modify_project\",\"entity_type\":\"Board\",\"entity_id\":789,\"count\":1}}"
37
+ },
38
+ "account_id": 123
39
+ }
40
+ ```
41
+ {% endcode %}
42
+
43
+ ### Customizing fields to retrieve
44
+
45
+ You can customize the fields to retrieve by passing in the `select` option and listing all the fields you need to retrieve as an array.
46
+
47
+ {% code lineNumbers="true" %}
48
+ ```ruby
49
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
50
+
51
+ args = {
52
+ board_id: 789,
53
+ board_attribute: "description",
54
+ new_value: "Updated description"
55
+ }
56
+ select = %w[id name description items_count permissions]
57
+
58
+ response = client.update_board(args: args, select: select)
59
+
60
+ puts response.body
61
+ ```
62
+ {% endcode %}
63
+
64
+ ### Retrieving nested fields
65
+
66
+ Some fields have nested attributes, and you need to specify the attributes to retrieve that field; else, the API will respond with an error.
67
+
68
+ {% code lineNumbers="true" %}
69
+ ```ruby
70
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
71
+
72
+ args = {
73
+ board_id: 789,
74
+ board_attribute: "description",
75
+ new_value: "Updated description"
76
+ }
77
+ select = [
78
+ "id",
79
+ "name",
80
+ {
81
+ creator: %w[id name email is_admin]
82
+ }
83
+ ]
84
+
85
+ response = client.update_board(args: args, select: select)
86
+
87
+ puts response.body
88
+ ```
89
+ {% endcode %}
90
+
91
+ You can find the list of all the available fields for boards [here](https://developer.monday.com/api-reference/docs/board-view-queries#fields).
@@ -0,0 +1,9 @@
1
+ # Board View
2
+
3
+ The board view API is used to access the board view data. It includes the following methods:
4
+
5
+ [board\_views.md](board\_views.md "mention")
6
+
7
+ {% hint style="info" %}
8
+ Visit monday.com's API documentation to know more about the [board views API](https://developer.monday.com/api-reference/docs/board-view-queries).
9
+ {% endhint %}
@@ -0,0 +1,88 @@
1
+ # #board\_views
2
+
3
+ Querying `board_views` will return a collection of board views from a specific board.
4
+
5
+ ### Basic usage
6
+
7
+ {% code lineNumbers="true" %}
8
+ ```ruby
9
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
10
+
11
+ response = client.board_views
12
+
13
+ puts response.body
14
+ ```
15
+ {% endcode %}
16
+
17
+ This will return the board views' ID, name and type fields by default.
18
+
19
+ The response body from the above query would be as follows:
20
+
21
+ {% code lineNumbers="true" %}
22
+ ```json
23
+ {
24
+ "data": {
25
+ "boards": [
26
+ {
27
+ "views" : [
28
+ {
29
+ "type": "FormBoardView",
30
+ "name": "Contact Form",
31
+ "id": "55567306"
32
+ },
33
+ {
34
+ "type": "ItemsGalleryBoardView",
35
+ "name": "Cards",
36
+ "id": "212647324"
37
+ },
38
+ {
39
+ "type": "KanbanBoardView",
40
+ "name": "Kanban",
41
+ "id": "212644479"
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ },
47
+ "account_id": 123
48
+ }
49
+ ```
50
+ {% endcode %}
51
+
52
+ ### Filtering board views
53
+
54
+ This method accepts various arguments to filter down the views. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/board-view-queries#arguments).
55
+
56
+ You can pass these filters using the `args` option.
57
+
58
+ {% code lineNumbers="true" %}
59
+ ```ruby
60
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
61
+
62
+ args = {
63
+ ids: [123, 456]
64
+ }
65
+ response = client.board_views(args: args)
66
+
67
+ puts response.body
68
+ ```
69
+ {% endcode %}
70
+
71
+ This will filter and return the views for boards `123` and `456`.
72
+
73
+ ### Customizing fields to retrieve
74
+
75
+ You can customize the fields to retrieve by passing in the `select` option and listing all the fields you need to retrieve as an array.
76
+
77
+ {% code lineNumbers="true" %}
78
+ ```ruby
79
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
80
+
81
+ select = %w[id name settings_str type]
82
+ response = client.board_views(select: select)
83
+
84
+ puts response.body
85
+ ```
86
+ {% endcode %}
87
+
88
+ You can find the list of all the available fields for board views [here](https://developer.monday.com/api-reference/docs/board-view-queries#fields).
@@ -0,0 +1,25 @@
1
+ # Column
2
+
3
+ The column API is used to access and mutate the columns. It includes the following methods:
4
+
5
+ [columns.md](columns.md "mention")
6
+
7
+ [column\_values.md](column\_values.md "mention")
8
+
9
+ [create\_column.md](create\_column.md "mention")
10
+
11
+ [change\_column\_title.md](change\_column\_title.md "mention")
12
+
13
+ [change\_column\_metadata.md](change\_column\_metadata.md "mention")
14
+
15
+ [change\_column\_value.md](change\_column\_value.md "mention")
16
+
17
+ [change\_simple\_column\_value.md](change\_simple\_column\_value.md "mention")
18
+
19
+ [change\_multiple\_column\_value.md](change\_multiple\_column\_value.md "mention")
20
+
21
+ [delete\_column.md](delete\_column.md "mention")
22
+
23
+ {% hint style="info" %}
24
+ Visit monday.com's API documentation to know more about the [columns API](https://developer.monday.com/api-reference/docs/columns).
25
+ {% endhint %}
@@ -0,0 +1,70 @@
1
+ # #change\_column\_metadata
2
+
3
+ The `change_column_metadata` mutation will allow you to update the metadata of a column.
4
+
5
+ ### Basic usage
6
+
7
+ This method accepts various arguments to update a column's metadata. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/columns#arguments-7).
8
+
9
+ You can pass these filters using the `args` option.
10
+
11
+ {% code lineNumbers="true" %}
12
+ ```ruby
13
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
14
+
15
+ args = {
16
+ board_id: 123,
17
+ column_id: "status",
18
+ column_property: "description",
19
+ value: "Updated status column description"
20
+ }
21
+ response = client.change_column_metadata(args: args)
22
+
23
+ puts response.body
24
+ ```
25
+ {% endcode %}
26
+
27
+ This will update the description for the `status` column on `123` board to "Updated status column description".
28
+
29
+ This will return the columns' ID, title and description fields by default.
30
+
31
+ The response body from the above query would be as follows:
32
+
33
+ {% code lineNumbers="true" %}
34
+ ```json
35
+ {
36
+ "data": {
37
+ "change_column_metadata": {
38
+ "id": "status",
39
+ "title": "New Work Status",
40
+ "description": "Updated status column description"
41
+ }
42
+ },
43
+ "account_id": 123
44
+ }
45
+ ```
46
+ {% endcode %}
47
+
48
+ ### Customizing fields to retrieve
49
+
50
+ You can customize the fields to retrieve by passing in the `select` option and listing all the fields you need to retrieve as an array.
51
+
52
+ {% code lineNumbers="true" %}
53
+ ```ruby
54
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
55
+
56
+ args = {
57
+ board_id: 123,
58
+ column_id: "status",
59
+ column_property: "description",
60
+ value: "Updated status column description"
61
+ }
62
+ select = %w[id archived width settings_str]
63
+
64
+ response = client.change_column_metadata(args: args, select: select)
65
+
66
+ puts response.body
67
+ ```
68
+ {% endcode %}
69
+
70
+ You can find the list of all the available fields for columns [here](https://developer.monday.com/api-reference/docs/columns#fields).
@@ -0,0 +1,68 @@
1
+ # #change\_column\_title
2
+
3
+ The `change_column_title` mutation will allow you to update a column's title.
4
+
5
+ ### Basic usage
6
+
7
+ This method accepts various arguments to update a column's title. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/columns#arguments-6).
8
+
9
+ You can pass these filters using the `args` option.
10
+
11
+ {% code lineNumbers="true" %}
12
+ ```ruby
13
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
14
+
15
+ args = {
16
+ board_id: 123,
17
+ column_id: "status",
18
+ title: "New Work Status"
19
+ }
20
+ response = client.change_column_title(args: args)
21
+
22
+ puts response.body
23
+ ```
24
+ {% endcode %}
25
+
26
+ This will update the column title for the `status` column on `123` board to "New Work Status".
27
+
28
+ This will return the columns' ID, title and description fields by default.
29
+
30
+ The response body from the above query would be as follows:
31
+
32
+ {% code lineNumbers="true" %}
33
+ ```json
34
+ {
35
+ "data": {
36
+ "change_column_title": {
37
+ "id": "status",
38
+ "title": "New Work Status",
39
+ "description": "Status Column"
40
+ }
41
+ },
42
+ "account_id": 123
43
+ }
44
+ ```
45
+ {% endcode %}
46
+
47
+ ### Customizing fields to retrieve
48
+
49
+ You can customize the fields to retrieve by passing in the `select` option and listing all the fields you need to retrieve as an array.
50
+
51
+ {% code lineNumbers="true" %}
52
+ ```ruby
53
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
54
+
55
+ args = {
56
+ board_id: 123,
57
+ column_id: "status",
58
+ title: "New Work Status"
59
+ }
60
+ select = %w[id archived width settings_str]
61
+
62
+ response = client.change_column_title(args: args, select: select)
63
+
64
+ puts response.body
65
+ ```
66
+ {% endcode %}
67
+
68
+ You can find the list of all the available fields for columns [here](https://developer.monday.com/api-reference/docs/columns#fields).
@@ -0,0 +1,73 @@
1
+ # #change\_column\_value
2
+
3
+ The `change_column_value` mutation will allow you to update the value of a column for a specific item.
4
+
5
+ ### Basic usage
6
+
7
+ This method accepts various arguments to update the column's value. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/columns#arguments-3).
8
+
9
+ You can pass these filters using the `args` option.
10
+
11
+ {% code lineNumbers="true" %}
12
+ ```ruby
13
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
14
+
15
+ args = {
16
+ board_id: 123,
17
+ item_id: 1234,
18
+ column_id: "status",
19
+ value: {
20
+ label: "Working on it"
21
+ }
22
+ }
23
+ response = client.change_column_value(args: args)
24
+
25
+ puts response.body
26
+ ```
27
+ {% endcode %}
28
+
29
+ This will update the `status` column value for item ID `1234` on the board ID `123` to "Working on it".
30
+
31
+ This will return the items' ID and name fields by default.
32
+
33
+ The response body from the above query would be as follows:
34
+
35
+ {% code lineNumbers="true" %}
36
+ ```json
37
+ {
38
+ "data": {
39
+ "change_column_value": {
40
+ "id": "1234",
41
+ "name": "Task 1"
42
+ }
43
+ },
44
+ "account_id": 123
45
+ }
46
+ ```
47
+ {% endcode %}
48
+
49
+ ### Customizing fields to retrieve
50
+
51
+ You can customize the fields to retrieve by passing in the `select` option and listing all the fields you need to retrieve as an array.
52
+
53
+ {% code lineNumbers="true" %}
54
+ ```ruby
55
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
56
+
57
+ args = {
58
+ board_id: 123,
59
+ item_id: 1234,
60
+ column_id: "status",
61
+ value: {
62
+ label: "Working on it"
63
+ }
64
+ }
65
+ select = %w[id name email]
66
+
67
+ response = client.change_column_value(args: args, select: select)
68
+
69
+ puts response.body
70
+ ```
71
+ {% endcode %}
72
+
73
+ You can find the list of all the available fields for items [here](https://developer.monday.com/api-reference/docs/items#fields).
@@ -0,0 +1,81 @@
1
+ # #change\_multiple\_column\_value
2
+
3
+ The `change_multiple_column_value` mutation will allow you to update the values of multiple columns for a specific item.
4
+
5
+ ### Basic usage
6
+
7
+ This method accepts various arguments to update the column values. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/columns#arguments-5).
8
+
9
+ You can pass these filters using the `args` option.
10
+
11
+ {% code lineNumbers="true" %}
12
+ ```ruby
13
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
14
+
15
+ args = {
16
+ board_id: 123,
17
+ item_id: 1234,
18
+ column_values: {
19
+ status: {
20
+ label: "Done"
21
+ },
22
+ keywords: {
23
+ labels: %w[Tech Marketing]
24
+ }
25
+ }
26
+ }
27
+ response = client.change_multiple_column_value(args: args)
28
+
29
+ puts response.body
30
+ ```
31
+ {% endcode %}
32
+
33
+ This will update the `status` column value for item ID `1234` on the board ID `123` to "Done" and the `keywords` column value to "Tech, Marketing".
34
+
35
+ This will return the items' ID and name fields by default.
36
+
37
+ The response body from the above query would be as follows:
38
+
39
+ {% code lineNumbers="true" %}
40
+ ```json
41
+ {
42
+ "data": {
43
+ "change_multiple_column_value": {
44
+ "id": "1234",
45
+ "name": "Task 1"
46
+ }
47
+ },
48
+ "account_id": 123
49
+ }
50
+ ```
51
+ {% endcode %}
52
+
53
+ ### Customizing fields to retrieve
54
+
55
+ You can customize the fields to retrieve by passing in the `select` option and listing all the fields you need to retrieve as an array.
56
+
57
+ {% code lineNumbers="true" %}
58
+ ```ruby
59
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
60
+
61
+ args = {
62
+ board_id: 123,
63
+ item_id: 1234,
64
+ column_values: {
65
+ status: {
66
+ label: "Done"
67
+ },
68
+ keywords: {
69
+ labels: %w[Tech Marketing]
70
+ }
71
+ }
72
+ }
73
+ select = %w[id name email]
74
+
75
+ response = client.change_multiple_column_value(args: args, select: select)
76
+
77
+ puts response.body
78
+ ```
79
+ {% endcode %}
80
+
81
+ You can find the list of all the available fields for items [here](https://developer.monday.com/api-reference/docs/items#fields).
@@ -0,0 +1,69 @@
1
+ # #change\_simple\_column\_value
2
+
3
+ The `change_simple_column_value` mutation will allow you to update the value of a column for a specific item.
4
+
5
+ ### Basic usage
6
+
7
+ This method accepts various arguments to update the column's value. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/columns#arguments-4).
8
+
9
+ You can pass these filters using the `args` option.
10
+
11
+ {% code lineNumbers="true" %}
12
+ ```ruby
13
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
14
+
15
+ args = {
16
+ board_id: 123,
17
+ item_id: 1234,
18
+ column_id: "status",
19
+ value: "Triage"
20
+ }
21
+ response = client.change_simple_column_value(args: args)
22
+
23
+ puts response.body
24
+ ```
25
+ {% endcode %}
26
+
27
+ This will update the `status` column value for item ID `1234` on the board ID `123` to "Triage".
28
+
29
+ This will return the items' ID and name fields by default.
30
+
31
+ The response body from the above query would be as follows:
32
+
33
+ {% code lineNumbers="true" %}
34
+ ```json
35
+ {
36
+ "data": {
37
+ "change_simple_column_value": {
38
+ "id": "1234",
39
+ "name": "Task 1"
40
+ }
41
+ },
42
+ "account_id": 123
43
+ }
44
+ ```
45
+ {% endcode %}
46
+
47
+ ### Customizing fields to retrieve
48
+
49
+ You can customize the fields to retrieve by passing in the `select` option and listing all the fields you need to retrieve as an array.
50
+
51
+ {% code lineNumbers="true" %}
52
+ ```ruby
53
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
54
+
55
+ args = {
56
+ board_id: 123,
57
+ item_id: 1234,
58
+ column_id: "status",
59
+ value: "Triage"
60
+ }
61
+ select = %w[id name email]
62
+
63
+ response = client.change_simple_column_value(args: args, select: select)
64
+
65
+ puts response.body
66
+ ```
67
+ {% endcode %}
68
+
69
+ You can find the list of all the available fields for items [here](https://developer.monday.com/api-reference/docs/items#fields).
@@ -0,0 +1,115 @@
1
+ # #column\_values
2
+
3
+ Querying `column_values` will return the metadata for one or a collection of columns.
4
+
5
+ ### Basic usage
6
+
7
+ {% code lineNumbers="true" %}
8
+ ```ruby
9
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
10
+
11
+ response = client.column_values
12
+
13
+ puts response.body
14
+ ```
15
+ {% endcode %}
16
+
17
+ By default, this will return the columns metadata for the ID, title, and description fields.
18
+
19
+ The response body from the above query would be as follows:
20
+
21
+ {% code lineNumbers="true" %}
22
+ ```json
23
+ "data": {
24
+ "boards": [
25
+ {
26
+ "items": [
27
+ {
28
+ "column_values": [
29
+ {
30
+ "id": "subitems",
31
+ "title": "Subitems",
32
+ "description": null
33
+ },
34
+ {
35
+ "id": "work_status",
36
+ "title": "Status",
37
+ "description": "New description"
38
+ },
39
+ {
40
+ "id": "keywords",
41
+ "title": "Keywords",
42
+ "description": "This is keywords column"
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "items": [
50
+ {
51
+ "column_values": [
52
+ {
53
+ "id": "person",
54
+ "title": "Owner",
55
+ "description": null
56
+ },
57
+ {
58
+ "id": "status",
59
+ "title": "Status",
60
+ "description": null
61
+ },
62
+ {
63
+ "id": "date0",
64
+ "title": "Date",
65
+ "description": null
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "column_values": [
71
+ {
72
+ "id": "person",
73
+ "title": "Owner",
74
+ "description": null
75
+ },
76
+ {
77
+ "id": "status",
78
+ "title": "Status",
79
+ "description": null
80
+ },
81
+ {
82
+ "id": "date0",
83
+ "title": "Date",
84
+ "description": null
85
+ }
86
+ ]
87
+ }
88
+ ]
89
+ }
90
+ ]
91
+ },
92
+ "account_id": 123
93
+ }
94
+ ```
95
+ {% endcode %}
96
+
97
+ ### Customizing fields to retrieve
98
+
99
+ You can customize the fields to retrieve by passing in the `board_ids` and `item_ids` options and listing all the fields you need to retrieve as an array.
100
+
101
+ {% code lineNumbers="true" %}
102
+ ```ruby
103
+ client = Monday::Client.new(token: <AUTH_TOKEN>)
104
+
105
+ board_ids = [456]
106
+ item_ids = [1234, 5678]
107
+ select = %w[id description value]
108
+
109
+ response = client.column_values(board_ids, item_ids, select: select)
110
+
111
+ puts response.body
112
+ ```
113
+ {% endcode %}
114
+
115
+ You can find the list of all the available fields for columns [here](https://developer.monday.com/api-reference/docs/column-values#fields).