monday_ruby 0.6.2 → 1.1.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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/.env +1 -1
  3. data/.rspec +0 -1
  4. data/.rubocop.yml +18 -0
  5. data/.simplecov +1 -0
  6. data/CHANGELOG.md +55 -0
  7. data/CONTRIBUTING.md +61 -0
  8. data/README.md +97 -51
  9. data/lib/monday/client.rb +30 -12
  10. data/lib/monday/configuration.rb +8 -0
  11. data/lib/monday/deprecation.rb +23 -0
  12. data/lib/monday/error.rb +5 -2
  13. data/lib/monday/request.rb +4 -1
  14. data/lib/monday/resources/account.rb +6 -4
  15. data/lib/monday/resources/activity_log.rb +7 -5
  16. data/lib/monday/resources/base.rb +20 -0
  17. data/lib/monday/resources/board.rb +71 -17
  18. data/lib/monday/resources/board_view.rb +6 -4
  19. data/lib/monday/resources/column.rb +28 -20
  20. data/lib/monday/resources/folder.rb +55 -0
  21. data/lib/monday/resources/group.rb +84 -16
  22. data/lib/monday/resources/item.rb +77 -13
  23. data/lib/monday/resources/subitem.rb +8 -6
  24. data/lib/monday/resources/update.rb +13 -11
  25. data/lib/monday/resources/workspace.rb +10 -8
  26. data/lib/monday/resources.rb +16 -20
  27. data/lib/monday/util.rb +33 -1
  28. data/lib/monday/version.rb +1 -1
  29. data/lib/monday_ruby.rb +1 -0
  30. metadata +22 -48
  31. data/docs/README.md +0 -13
  32. data/docs/SUMMARY.md +0 -40
  33. data/docs/client.md +0 -15
  34. data/docs/configuration.md +0 -40
  35. data/docs/error-handling.md +0 -71
  36. data/docs/getting-started.md +0 -25
  37. data/docs/quick-start.md +0 -269
  38. data/docs/resources/README.md +0 -27
  39. data/docs/resources/account/README.md +0 -9
  40. data/docs/resources/account/accounts.md +0 -82
  41. data/docs/resources/activity-log/README.md +0 -9
  42. data/docs/resources/activity-log/activity_logs.md +0 -95
  43. data/docs/resources/board/README.md +0 -21
  44. data/docs/resources/board/archive_board.md +0 -79
  45. data/docs/resources/board/boards.md +0 -96
  46. data/docs/resources/board/create_board.md +0 -95
  47. data/docs/resources/board/delete_board.md +0 -79
  48. data/docs/resources/board/delete_board_subscribers.md +0 -87
  49. data/docs/resources/board/duplicate_board.md +0 -94
  50. data/docs/resources/board/update_board.md +0 -91
  51. data/docs/resources/board-view/README.md +0 -9
  52. data/docs/resources/board-view/board_views.md +0 -88
  53. data/docs/resources/column/README.md +0 -25
  54. data/docs/resources/column/change_column_metadata.md +0 -70
  55. data/docs/resources/column/change_column_title.md +0 -68
  56. data/docs/resources/column/change_column_value.md +0 -73
  57. data/docs/resources/column/change_multiple_column_value.md +0 -81
  58. data/docs/resources/column/change_simple_column_value.md +0 -69
  59. data/docs/resources/column/column_values.md +0 -115
  60. data/docs/resources/column/columns.md +0 -117
  61. data/docs/resources/column/create_column.md +0 -70
  62. data/docs/resources/column/delete_column.md +0 -58
  63. data/docs/resources/item/README.md +0 -17
  64. data/docs/resources/item/archive_item.md +0 -80
  65. data/docs/resources/item/create_item.md +0 -105
  66. data/docs/resources/item/delete_item.md +0 -80
  67. data/docs/resources/item/duplicate_item.md +0 -87
  68. data/docs/resources/item/items.md +0 -95
  69. data/docs/response.md +0 -21
  70. data/monday_ruby.gemspec +0 -37
@@ -1,73 +0,0 @@
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).
@@ -1,81 +0,0 @@
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).
@@ -1,69 +0,0 @@
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).
@@ -1,115 +0,0 @@
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).
@@ -1,117 +0,0 @@
1
- # #columns
2
-
3
- Querying `columns` 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.columns
12
-
13
- puts response.body
14
- ```
15
- {% endcode %}
16
-
17
- This will return the columns' ID, title and description 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
- "columns": [
28
- {
29
- "id": "name",
30
- "title": "Name",
31
- "description": null
32
- },
33
- {
34
- "id": "subitems",
35
- "title": "Subitems",
36
- "description": null
37
- },
38
- {
39
- "id": "work_status",
40
- "title": "Status",
41
- "description": "New description"
42
- },
43
- {
44
- "id": "keywords",
45
- "title": "Keywords",
46
- "description": "This is keywords column"
47
- }
48
- ]
49
- },
50
- {
51
- "columns": [
52
- {
53
- "id": "name",
54
- "title": "Name",
55
- "description": null
56
- },
57
- {
58
- "id": "person",
59
- "title": "Owner",
60
- "description": null
61
- },
62
- {
63
- "id": "status",
64
- "title": "Status",
65
- "description": null
66
- },
67
- {
68
- "id": "date0",
69
- "title": "Date",
70
- "description": null
71
- }
72
- ]
73
- }
74
- ]
75
- },
76
- "account_id": 123
77
- }
78
- ```
79
- {% endcode %}
80
-
81
- ### Filtering columns
82
-
83
- This method accepts various arguments to filter down the columns. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/columns#arguments).
84
-
85
- You can pass these filters using the `args` option.
86
-
87
- {% code lineNumbers="true" %}
88
- ```ruby
89
- client = Monday::Client.new(token: <AUTH_TOKEN>)
90
-
91
- args = {
92
- ids: [456],
93
- }
94
- response = client.columns(args: args)
95
-
96
- puts response.body
97
- ```
98
- {% endcode %}
99
-
100
- This will filter and return the columns that belong to board ID `456`.
101
-
102
- ### Customizing fields to retrieve
103
-
104
- 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.
105
-
106
- {% code lineNumbers="true" %}
107
- ```ruby
108
- client = Monday::Client.new(token: <AUTH_TOKEN>)
109
-
110
- select = %w[id archived width settings_str]
111
- response = client.columns(select: select)
112
-
113
- puts response.body
114
- ```
115
- {% endcode %}
116
-
117
- You can find the list of all the available fields for columns [here](https://developer.monday.com/api-reference/docs/columns#fields).
@@ -1,70 +0,0 @@
1
- # #create\_column
2
-
3
- The `create_column` mutation will allow you to create a column.
4
-
5
- ### Basic usage
6
-
7
- This method accepts various arguments to create a column. You can find the complete list of arguments [here](https://developer.monday.com/api-reference/docs/columns#arguments-1).
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
- title: "Work Status",
18
- description: "This is the work status column",
19
- column_type: status
20
- }
21
- response = client.create_column(args: args)
22
-
23
- puts response.body
24
- ```
25
- {% endcode %}
26
-
27
- This will create a new column on the `123` board titled "Work Status" and the "This is the work status column" description with the column type as status.
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
- "create_column": {
38
- "id": "status",
39
- "title": "Work Status",
40
- "description": "This is the work status column"
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
- title: "Work Status",
59
- description: "This is the work status column",
60
- column_type: status
61
- }
62
- select = %w[id archived width settings_str]
63
-
64
- response = client.create_column(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).
@@ -1,58 +0,0 @@
1
- # #delete\_column
2
-
3
- The `delete_column` mutation will allow you to delete a column from a specific board.
4
-
5
- ### Basic usage
6
-
7
- This method accepts two required arguments - `board_id` and `column_id`.
8
-
9
- {% code lineNumbers="true" %}
10
- ```ruby
11
- client = Monday::Client.new(token: <AUTH_TOKEN>)
12
-
13
- board_id = 123
14
- column_id = "keywords"
15
- response = client.delete_column(board_id, column_id)
16
-
17
- puts response.body
18
- ```
19
- {% endcode %}
20
-
21
- This will delete the `keywords` column from the board ID `123`.
22
-
23
- This will return the deleted column's ID by default.
24
-
25
- The response body from the above query would be as follows:
26
-
27
- {% code lineNumbers="true" %}
28
- ```json
29
- {
30
- "data": {
31
- "delete_column": {
32
- "id": "keywords"
33
- }
34
- },
35
- "account_id": 123
36
- }
37
- ```
38
- {% endcode %}
39
-
40
- ### Customizing fields to retrieve
41
-
42
- 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.
43
-
44
- {% code lineNumbers="true" %}
45
- ```ruby
46
- client = Monday::Client.new(token: <AUTH_TOKEN>)
47
-
48
- board_id = 123
49
- column_id = "keywords"
50
- select = %w[id type title]
51
-
52
- response = client.delete_column(board_id, column_id, select: select)
53
-
54
- puts response.body
55
- ```
56
- {% endcode %}
57
-
58
- You can find the list of all the available fields for columns [here](https://developer.monday.com/api-reference/docs/columns#fields).
@@ -1,17 +0,0 @@
1
- # Item
2
-
3
- The item API is used to access and mutate the items. It includes the following methods:
4
-
5
- [items.md](items.md "mention")
6
-
7
- [create\_item.md](create\_item.md "mention")
8
-
9
- [duplicate\_item.md](duplicate\_item.md "mention")
10
-
11
- [archive\_item.md](archive\_item.md "mention")
12
-
13
- [delete\_item.md](delete\_item.md "mention")
14
-
15
- {% hint style="info" %}
16
- Visit monday.com's API documentation to know more about the [items API](https://developer.monday.com/api-reference/docs/items).
17
- {% endhint %}
@@ -1,80 +0,0 @@
1
- # #archive\_item
2
-
3
- The `archive_item` mutation will allow you to archive an item.
4
-
5
- ### Basic usage
6
-
7
- This method accepts one required argument - `item_id`.
8
-
9
- {% code lineNumbers="true" %}
10
- ```ruby
11
- client = Monday::Client.new(token: <AUTH_TOKEN>)
12
-
13
- item_id = "0123"
14
-
15
- response = client.archive_item(item_id)
16
-
17
- puts response.body
18
- ```
19
- {% endcode %}
20
-
21
- This will return the archived item's ID by default.
22
-
23
- The response body from the above query would be as follows:
24
-
25
- {% code lineNumbers="true" %}
26
- ```json
27
- {
28
- "data": {
29
- "archive_item": {
30
- "id": "0123"
31
- }
32
- },
33
- "account_id": 123
34
- }
35
- ```
36
- {% endcode %}
37
-
38
- ### Customizing fields to retrieve
39
-
40
- 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.
41
-
42
- {% code lineNumbers="true" %}
43
- ```ruby
44
- client = Monday::Client.new(token: <AUTH_TOKEN>)
45
-
46
- item_id = "0123"
47
-
48
- select = %w[id state creator_id]
49
- response = client.archive_item(item_id, select: select)
50
-
51
- puts response.body
52
- ```
53
- {% endcode %}
54
-
55
- ### Retrieving nested fields
56
-
57
- Some fields have nested attributes, and you need to specify the attributes to retrieve that field; else, the API will respond with an error. For example, the field `creator` is of type `User` and expects you to pass the attributes from `User` that you want to retrieve for `creator`.
58
-
59
- {% code lineNumbers="true" %}
60
- ```ruby
61
- client = Monday::Client.new(token: <AUTH_TOKEN>)
62
-
63
- item_id = "0123"
64
-
65
- select = [
66
- "id",
67
- "state",
68
- "creator_id",
69
- {
70
- creator: %w[id name email is_admin]
71
- }
72
- ]
73
-
74
- response = client.archive_item(item_id, select: select)
75
-
76
- puts response.body
77
- ```
78
- {% endcode %}
79
-
80
- You can find the list of all the available fields for items [here](https://developer.monday.com/api-reference/docs/items#fields).