monday_ruby 1.1.0 → 1.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.
- checksums.yaml +4 -4
- data/.env +1 -1
- data/.rubocop.yml +2 -1
- data/CHANGELOG.md +14 -0
- data/CONTRIBUTING.md +104 -0
- data/README.md +146 -142
- data/docs/.vitepress/config.mjs +255 -0
- data/docs/.vitepress/theme/index.js +4 -0
- data/docs/.vitepress/theme/style.css +43 -0
- data/docs/README.md +80 -0
- data/docs/explanation/architecture.md +507 -0
- data/docs/explanation/best-practices/errors.md +478 -0
- data/docs/explanation/best-practices/performance.md +1084 -0
- data/docs/explanation/best-practices/rate-limiting.md +630 -0
- data/docs/explanation/best-practices/testing.md +820 -0
- data/docs/explanation/column-values.md +857 -0
- data/docs/explanation/design.md +795 -0
- data/docs/explanation/graphql.md +356 -0
- data/docs/explanation/migration/v1.md +808 -0
- data/docs/explanation/pagination.md +447 -0
- data/docs/guides/advanced/batch.md +1274 -0
- data/docs/guides/advanced/complex-queries.md +1114 -0
- data/docs/guides/advanced/errors.md +818 -0
- data/docs/guides/advanced/pagination.md +934 -0
- data/docs/guides/advanced/rate-limiting.md +981 -0
- data/docs/guides/authentication.md +286 -0
- data/docs/guides/boards/create.md +386 -0
- data/docs/guides/boards/delete.md +405 -0
- data/docs/guides/boards/duplicate.md +511 -0
- data/docs/guides/boards/query.md +530 -0
- data/docs/guides/boards/update.md +453 -0
- data/docs/guides/columns/create.md +452 -0
- data/docs/guides/columns/metadata.md +492 -0
- data/docs/guides/columns/query.md +455 -0
- data/docs/guides/columns/update-multiple.md +459 -0
- data/docs/guides/columns/update-values.md +509 -0
- data/docs/guides/files/add-to-column.md +40 -0
- data/docs/guides/files/add-to-update.md +37 -0
- data/docs/guides/files/clear-column.md +33 -0
- data/docs/guides/first-request.md +285 -0
- data/docs/guides/folders/manage.md +750 -0
- data/docs/guides/groups/items.md +626 -0
- data/docs/guides/groups/manage.md +501 -0
- data/docs/guides/installation.md +169 -0
- data/docs/guides/items/create.md +493 -0
- data/docs/guides/items/delete.md +514 -0
- data/docs/guides/items/query.md +605 -0
- data/docs/guides/items/subitems.md +483 -0
- data/docs/guides/items/update.md +699 -0
- data/docs/guides/updates/manage.md +619 -0
- data/docs/guides/use-cases/dashboard.md +1421 -0
- data/docs/guides/use-cases/import.md +1962 -0
- data/docs/guides/use-cases/task-management.md +1381 -0
- data/docs/guides/workspaces/manage.md +502 -0
- data/docs/index.md +69 -0
- data/docs/package-lock.json +2468 -0
- data/docs/package.json +13 -0
- data/docs/reference/client.md +540 -0
- data/docs/reference/configuration.md +586 -0
- data/docs/reference/errors.md +693 -0
- data/docs/reference/resources/account.md +208 -0
- data/docs/reference/resources/activity-log.md +369 -0
- data/docs/reference/resources/board-view.md +359 -0
- data/docs/reference/resources/board.md +393 -0
- data/docs/reference/resources/column.md +543 -0
- data/docs/reference/resources/file.md +236 -0
- data/docs/reference/resources/folder.md +386 -0
- data/docs/reference/resources/group.md +507 -0
- data/docs/reference/resources/item.md +348 -0
- data/docs/reference/resources/subitem.md +267 -0
- data/docs/reference/resources/update.md +259 -0
- data/docs/reference/resources/workspace.md +213 -0
- data/docs/reference/response.md +560 -0
- data/docs/tutorial/first-integration.md +713 -0
- data/lib/monday/client.rb +24 -0
- data/lib/monday/configuration.rb +5 -0
- data/lib/monday/request.rb +15 -0
- data/lib/monday/resources/base.rb +4 -0
- data/lib/monday/resources/file.rb +56 -0
- data/lib/monday/util.rb +1 -0
- data/lib/monday/version.rb +1 -1
- metadata +87 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65df3dcbdada1d02fb3573b444015cb6b566d6b77cc1d63d103d6b5e7803f65b
|
|
4
|
+
data.tar.gz: 319fd612684e644dc0235c0010ece6890214f844d5b48f3f9238319ff77e70c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc4f34d8de144d95b4fe9cc78ea9801614389c4be7aaf72ba29186d6447d14200c95a3814ed5d8a3106045142b81f10b38fe7045ca8fcb5549153acf59b63c95
|
|
7
|
+
data.tar.gz: e5c15771ea6c5ec86e2b12508860c1927d67017b223b40c51b921ee28912a691aaa2750f39ef08ec6d9efec091a5d3fdaf07393e920e8b907b34659d72372a4a
|
data/.env
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
token="
|
|
1
|
+
token="[REPLACE_TOKEN]"
|
data/.rubocop.yml
CHANGED
|
@@ -27,6 +27,7 @@ Metrics/BlockLength:
|
|
|
27
27
|
|
|
28
28
|
Metrics/MethodLength:
|
|
29
29
|
Exclude:
|
|
30
|
+
- "lib/monday/configuration.rb"
|
|
30
31
|
- "lib/monday/util.rb"
|
|
31
32
|
|
|
32
33
|
Metrics/ParameterLists:
|
|
@@ -37,4 +38,4 @@ RSpec/NestedGroups:
|
|
|
37
38
|
Max: 5
|
|
38
39
|
|
|
39
40
|
RSpec/MultipleMemoizedHelpers:
|
|
40
|
-
Max:
|
|
41
|
+
Max: 11
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## v1.2.0 (November 18, 2025)
|
|
2
|
+
|
|
3
|
+
#### Added
|
|
4
|
+
|
|
5
|
+
- Added support for adding Files (Assets) to a File column.
|
|
6
|
+
- Added support for adding Files (Assets) to an Update (Comments).
|
|
7
|
+
- Added helper method for clearing a Files column.
|
|
8
|
+
|
|
9
|
+
#### Changed
|
|
10
|
+
|
|
11
|
+
- Updated gemspec dependency to use multipart-post (~> 2.4.0)
|
|
12
|
+
- Updated rubocop RSpec/MultipleMemoizedHelpers from 10 to 11.
|
|
13
|
+
- Updated Utils to allow GraphQL variables in queries.
|
|
14
|
+
|
|
1
15
|
## v1.1.0 (October 27, 2025)
|
|
2
16
|
|
|
3
17
|
### Added
|
data/CONTRIBUTING.md
CHANGED
|
@@ -77,6 +77,110 @@ Run RuboCop to ensure code style compliance:
|
|
|
77
77
|
bundle exec rake rubocop
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
## Documentation
|
|
81
|
+
|
|
82
|
+
The project uses [VitePress](https://vitepress.dev/) to generate documentation from Markdown files. The documentation site is hosted at [https://sanifhimani.github.io/monday_ruby/](https://sanifhimani.github.io/monday_ruby/).
|
|
83
|
+
|
|
84
|
+
### When to Update Documentation
|
|
85
|
+
|
|
86
|
+
Update documentation when you:
|
|
87
|
+
- Add a new resource or method to the public API
|
|
88
|
+
- Change the behavior of existing methods
|
|
89
|
+
- Add new features or configuration options
|
|
90
|
+
- Fix bugs that affect documented behavior
|
|
91
|
+
|
|
92
|
+
### Documentation Structure
|
|
93
|
+
|
|
94
|
+
Documentation follows the [Diataxis framework](https://diataxis.fr):
|
|
95
|
+
|
|
96
|
+
- **Tutorial** (`docs/tutorial/`) - Learning-oriented, gets users started
|
|
97
|
+
- **How-to Guides** (`docs/guides/`) - Task-oriented, solves specific problems
|
|
98
|
+
- **Reference** (`docs/reference/`) - Information-oriented, describes the API
|
|
99
|
+
- **Explanation** (`docs/explanation/`) - Understanding-oriented, explains concepts
|
|
100
|
+
|
|
101
|
+
### Adding/Updating Documentation
|
|
102
|
+
|
|
103
|
+
Documentation files are located in the `docs/` directory:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
docs/
|
|
107
|
+
├── .vitepress/
|
|
108
|
+
│ └── config.mjs # Navigation and site configuration
|
|
109
|
+
├── guides/ # How-to guides
|
|
110
|
+
│ ├── boards/
|
|
111
|
+
│ ├── items/
|
|
112
|
+
│ ├── columns/
|
|
113
|
+
│ └── advanced/
|
|
114
|
+
├── reference/ # API reference
|
|
115
|
+
│ ├── resources/
|
|
116
|
+
│ └── client.md
|
|
117
|
+
├── explanation/ # Conceptual documentation
|
|
118
|
+
└── tutorial/ # Getting started tutorial
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Steps to Update Documentation:
|
|
122
|
+
|
|
123
|
+
1. **Find or create the appropriate file** based on what you're documenting
|
|
124
|
+
2. **Follow the existing format** - look at similar documentation files for examples
|
|
125
|
+
3. **Test your code examples** - all examples should be runnable and accurate
|
|
126
|
+
4. **Update navigation** if adding new pages - edit `docs/.vitepress/config.mjs`
|
|
127
|
+
5. **Build locally** to preview changes:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
cd docs
|
|
131
|
+
npm install # First time only
|
|
132
|
+
npm run dev # Start local dev server
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Visit `http://localhost:5173/monday_ruby/` to preview your changes.
|
|
136
|
+
|
|
137
|
+
6. **Check for broken links** before submitting:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
cd docs
|
|
141
|
+
npm run build # Build will fail if there are dead links
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### Documentation Guidelines:
|
|
145
|
+
|
|
146
|
+
- **Code examples must be accurate** - verify against VCR test fixtures or real API
|
|
147
|
+
- **Include practical examples** - show real-world usage, not just syntax
|
|
148
|
+
- **Be consistent** - follow the style and tone of existing documentation
|
|
149
|
+
- **No emojis** - maintain professional tone in documentation
|
|
150
|
+
- **Link related pages** - help users discover relevant documentation
|
|
151
|
+
- **Keep examples self-contained** - users should be able to copy-paste and run
|
|
152
|
+
|
|
153
|
+
#### Example Documentation Pattern:
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
# Resource Name
|
|
157
|
+
|
|
158
|
+
Brief description of what this resource does.
|
|
159
|
+
|
|
160
|
+
## Methods
|
|
161
|
+
|
|
162
|
+
### method_name
|
|
163
|
+
|
|
164
|
+
Description of what the method does.
|
|
165
|
+
|
|
166
|
+
\`\`\`ruby
|
|
167
|
+
# Example code that actually works
|
|
168
|
+
client = Monday::Client.new(token: ENV["MONDAY_TOKEN"])
|
|
169
|
+
response = client.resource.method_name(args: {})
|
|
170
|
+
\`\`\`
|
|
171
|
+
|
|
172
|
+
**Parameters:**
|
|
173
|
+
- List parameters and their types
|
|
174
|
+
|
|
175
|
+
**Returns:** Description of return value
|
|
176
|
+
|
|
177
|
+
**See:** Link to monday.com API docs
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Deploying Documentation
|
|
181
|
+
|
|
182
|
+
Documentation is automatically deployed via GitHub Actions when changes are merged to the `main` branch. You don't need to manually deploy.
|
|
183
|
+
|
|
80
184
|
## Commit message guidelines
|
|
81
185
|
|
|
82
186
|
* Use present tense ("Add feature" not "Added feature")
|
data/README.md
CHANGED
|
@@ -1,240 +1,244 @@
|
|
|
1
|
-
#
|
|
1
|
+
# monday_ruby
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
[](https://badge.fury.io/rb/monday_ruby)
|
|
5
5
|
[](https://coveralls.io/github/sanifhimani/monday_ruby?branch=main)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A Ruby client library for the [monday.com GraphQL API](https://developer.monday.com/api-reference). Build integrations with boards, items, columns, and more using idiomatic Ruby.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Features
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
- **Resource-based API** - Clean, intuitive interface (`client.board.query`, `client.item.create`)
|
|
12
|
+
- **Flexible configuration** - Global or per-client setup
|
|
13
|
+
- **Comprehensive error handling** - Typed exceptions for different error scenarios
|
|
14
|
+
- **Cursor-based pagination** - Efficiently handle large datasets
|
|
15
|
+
- **Fully tested** - 100% test coverage with VCR-recorded fixtures
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
## Documentation
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
**[Complete Documentation →](https://sanifhimani.github.io/monday_ruby/)**
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
- [Getting Started Tutorial](https://sanifhimani.github.io/monday_ruby/tutorial/first-integration)
|
|
22
|
+
- [How-to Guides](https://sanifhimani.github.io/monday_ruby/guides/installation)
|
|
23
|
+
- [API Reference](https://sanifhimani.github.io/monday_ruby/reference/client)
|
|
24
|
+
- [Best Practices](https://sanifhimani.github.io/monday_ruby/explanation/best-practices/errors)
|
|
22
25
|
|
|
23
|
-
##
|
|
26
|
+
## Installation
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
Add to your Gemfile:
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
```ruby
|
|
31
|
+
gem "monday_ruby"
|
|
32
|
+
```
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
Or install directly:
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
```bash
|
|
37
|
+
gem install monday_ruby
|
|
38
|
+
```
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
## Quick Start
|
|
34
41
|
|
|
35
42
|
```ruby
|
|
36
43
|
require "monday_ruby"
|
|
37
44
|
|
|
45
|
+
# Configure with your API token
|
|
38
46
|
Monday.configure do |config|
|
|
39
|
-
config.token = "
|
|
47
|
+
config.token = ENV["MONDAY_TOKEN"]
|
|
40
48
|
end
|
|
41
|
-
```
|
|
42
49
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
require "monday_ruby"
|
|
50
|
+
# Create a client
|
|
51
|
+
client = Monday::Client.new
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+
# Query boards
|
|
54
|
+
response = client.board.query(args: { limit: 5 })
|
|
55
|
+
|
|
56
|
+
if response.success?
|
|
57
|
+
boards = response.body.dig("data", "boards")
|
|
58
|
+
boards.each { |board| puts board["name"] }
|
|
59
|
+
end
|
|
48
60
|
```
|
|
49
61
|
|
|
50
|
-
|
|
62
|
+
Get your API token from your [monday.com Admin settings](https://support.monday.com/hc/en-us/articles/360005144659-Does-monday-com-have-an-API).
|
|
51
63
|
|
|
52
|
-
|
|
53
|
-
require "monday_ruby"
|
|
64
|
+
## Usage
|
|
54
65
|
|
|
55
|
-
|
|
56
|
-
config.token = "<AUTH_TOKEN>"
|
|
57
|
-
config.version = "2023-07"
|
|
58
|
-
end
|
|
59
|
-
```
|
|
66
|
+
### Configuration
|
|
60
67
|
|
|
61
|
-
|
|
68
|
+
**Global configuration** (recommended):
|
|
62
69
|
|
|
63
70
|
```ruby
|
|
64
|
-
require "monday_ruby"
|
|
65
|
-
|
|
66
71
|
Monday.configure do |config|
|
|
67
|
-
config.token = "
|
|
68
|
-
config.
|
|
69
|
-
config.read_timeout = 30 # seconds (default: 30)
|
|
72
|
+
config.token = ENV["MONDAY_TOKEN"]
|
|
73
|
+
config.version = "2024-01" # API version (optional)
|
|
70
74
|
end
|
|
71
75
|
|
|
72
|
-
|
|
73
|
-
client = Monday::Client.new(
|
|
74
|
-
token: "<AUTH_TOKEN>",
|
|
75
|
-
open_timeout: 15,
|
|
76
|
-
read_timeout: 45
|
|
77
|
-
)
|
|
76
|
+
client = Monday::Client.new
|
|
78
77
|
```
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
Get access to response objects by initializing a client and using the appropriate action you want to perform:
|
|
79
|
+
**Per-client configuration**:
|
|
83
80
|
|
|
84
81
|
```ruby
|
|
85
|
-
client = Monday::Client.new(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
puts response.body
|
|
82
|
+
client = Monday::Client.new(
|
|
83
|
+
token: ENV["MONDAY_TOKEN"],
|
|
84
|
+
version: "2024-01"
|
|
85
|
+
)
|
|
90
86
|
```
|
|
91
87
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Here are some common use cases for the API client.
|
|
95
|
-
|
|
96
|
-
#### Fetching all the boards
|
|
97
|
-
|
|
98
|
-
Initialize the client with the auth token and call the `boards` method.
|
|
88
|
+
**Configure timeouts**:
|
|
99
89
|
|
|
100
90
|
```ruby
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
response.success? # => true
|
|
107
|
-
|
|
108
|
-
# To get the boards from the response
|
|
109
|
-
response.body.dig("data", "boards") # => [...]
|
|
91
|
+
Monday.configure do |config|
|
|
92
|
+
config.token = ENV["MONDAY_TOKEN"]
|
|
93
|
+
config.open_timeout = 10 # seconds (default: 10)
|
|
94
|
+
config.read_timeout = 30 # seconds (default: 30)
|
|
95
|
+
end
|
|
110
96
|
```
|
|
111
97
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
Initialize the client with the auth token and call the `create_board` method.
|
|
98
|
+
### Working with Boards
|
|
115
99
|
|
|
116
100
|
```ruby
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
args
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
description: "Test board description"
|
|
123
|
-
}
|
|
101
|
+
# Query boards
|
|
102
|
+
response = client.board.query(
|
|
103
|
+
args: { ids: [1234567890] },
|
|
104
|
+
select: ["id", "name", "description"]
|
|
105
|
+
)
|
|
124
106
|
|
|
125
|
-
|
|
126
|
-
response = client.create_board(args: args)
|
|
107
|
+
boards = response.body.dig("data", "boards")
|
|
127
108
|
|
|
128
|
-
#
|
|
129
|
-
response
|
|
109
|
+
# Create a board
|
|
110
|
+
response = client.board.create(
|
|
111
|
+
args: {
|
|
112
|
+
board_name: "Project Tasks",
|
|
113
|
+
board_kind: "public",
|
|
114
|
+
description: "Track project deliverables"
|
|
115
|
+
}
|
|
116
|
+
)
|
|
130
117
|
|
|
131
|
-
|
|
132
|
-
response.body.dig("data", "create_board") # => { ... }
|
|
118
|
+
board = response.body.dig("data", "create_board")
|
|
133
119
|
```
|
|
134
120
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Initialize the client with the auth token and call the `create_item` method.
|
|
121
|
+
### Working with Items
|
|
138
122
|
|
|
139
123
|
```ruby
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
args
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
keywords: {
|
|
150
|
-
labels: ["Tech team", "DevOps team"]
|
|
124
|
+
# Create an item
|
|
125
|
+
response = client.item.create(
|
|
126
|
+
args: {
|
|
127
|
+
board_id: 1234567890,
|
|
128
|
+
item_name: "Implement authentication",
|
|
129
|
+
column_values: {
|
|
130
|
+
status: { label: "Working on it" },
|
|
131
|
+
date4: { date: "2024-12-31" }
|
|
151
132
|
}
|
|
152
133
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
# => <Monday::Response ...>
|
|
156
|
-
response = client.create_item(args: args)
|
|
134
|
+
)
|
|
157
135
|
|
|
158
|
-
#
|
|
159
|
-
response
|
|
136
|
+
# Query items
|
|
137
|
+
response = client.item.query(
|
|
138
|
+
args: { ids: [987654321] },
|
|
139
|
+
select: ["id", "name", { column_values: ["id", "text"] }]
|
|
140
|
+
)
|
|
160
141
|
|
|
161
|
-
|
|
162
|
-
response.body.dig("data", "create_item") # => { ... }
|
|
142
|
+
items = response.body.dig("data", "items")
|
|
163
143
|
```
|
|
164
144
|
|
|
165
|
-
|
|
145
|
+
### Pagination
|
|
166
146
|
|
|
167
|
-
|
|
147
|
+
Handle large datasets efficiently with cursor-based pagination:
|
|
168
148
|
|
|
169
149
|
```ruby
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
# Fetch first page of items from a board (up to 500 items per page)
|
|
150
|
+
# Fetch first page
|
|
173
151
|
response = client.board.items_page(
|
|
174
|
-
board_ids:
|
|
152
|
+
board_ids: 1234567890,
|
|
175
153
|
limit: 100
|
|
176
154
|
)
|
|
177
155
|
|
|
178
|
-
# Extract items and cursor from response
|
|
179
156
|
items = response.body.dig("data", "boards", 0, "items_page", "items")
|
|
180
157
|
cursor = response.body.dig("data", "boards", 0, "items_page", "cursor")
|
|
181
158
|
|
|
182
|
-
# Fetch next page
|
|
159
|
+
# Fetch next page
|
|
183
160
|
if cursor
|
|
184
161
|
next_response = client.board.items_page(
|
|
185
|
-
board_ids:
|
|
162
|
+
board_ids: 1234567890,
|
|
186
163
|
limit: 100,
|
|
187
164
|
cursor: cursor
|
|
188
165
|
)
|
|
189
166
|
end
|
|
190
|
-
|
|
191
|
-
# You can also filter items using query_params
|
|
192
|
-
response = client.board.items_page(
|
|
193
|
-
board_ids: <BOARD_ID>,
|
|
194
|
-
limit: 50,
|
|
195
|
-
query_params: {
|
|
196
|
-
rules: [{ column_id: "status", compare_value: [1] }],
|
|
197
|
-
operator: :and
|
|
198
|
-
}
|
|
199
|
-
)
|
|
200
167
|
```
|
|
201
168
|
|
|
202
|
-
|
|
169
|
+
See the [Pagination Guide](https://sanifhimani.github.io/monday_ruby/guides/advanced/pagination) for more details.
|
|
203
170
|
|
|
204
|
-
|
|
205
|
-
# Fetch paginated items from a group
|
|
206
|
-
response = client.group.items_page(
|
|
207
|
-
board_ids: <BOARD_ID>,
|
|
208
|
-
group_ids: "group_id",
|
|
209
|
-
limit: 100
|
|
210
|
-
)
|
|
171
|
+
### Error Handling
|
|
211
172
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
173
|
+
The library provides typed exceptions for different error scenarios:
|
|
174
|
+
|
|
175
|
+
```ruby
|
|
176
|
+
begin
|
|
177
|
+
response = client.board.query(args: { ids: [123] })
|
|
178
|
+
rescue Monday::AuthorizationError => e
|
|
179
|
+
puts "Invalid API token: #{e.message}"
|
|
180
|
+
rescue Monday::InvalidRequestError => e
|
|
181
|
+
puts "Invalid request: #{e.message}"
|
|
182
|
+
rescue Monday::RateLimitError => e
|
|
183
|
+
puts "Rate limit exceeded: #{e.message}"
|
|
184
|
+
rescue Monday::Error => e
|
|
185
|
+
puts "API error: #{e.message}"
|
|
186
|
+
end
|
|
219
187
|
```
|
|
220
188
|
|
|
189
|
+
See the [Error Handling Guide](https://sanifhimani.github.io/monday_ruby/guides/advanced/errors) for best practices.
|
|
190
|
+
|
|
191
|
+
## Available Resources
|
|
192
|
+
|
|
193
|
+
The client provides access to all monday.com resources:
|
|
194
|
+
|
|
195
|
+
- **Boards** - `client.board`
|
|
196
|
+
- **Items** - `client.item`
|
|
197
|
+
- **Columns** - `client.column`
|
|
198
|
+
- **Files** - `client.file`
|
|
199
|
+
- **Groups** - `client.group`
|
|
200
|
+
- **Updates** - `client.update`
|
|
201
|
+
- **Subitems** - `client.subitem`
|
|
202
|
+
- **Workspaces** - `client.workspace`
|
|
203
|
+
- **Folders** - `client.folder`
|
|
204
|
+
- **Account** - `client.account`
|
|
205
|
+
- **Activity Logs** - `client.activity_log`
|
|
206
|
+
- **Board Views** - `client.board_view`
|
|
207
|
+
|
|
208
|
+
For complete API documentation, see the [API Reference](https://sanifhimani.github.io/monday_ruby/reference/client).
|
|
209
|
+
|
|
221
210
|
## Development
|
|
222
211
|
|
|
223
|
-
|
|
212
|
+
### Running Tests
|
|
224
213
|
|
|
225
214
|
```bash
|
|
226
215
|
bundle exec rake spec
|
|
227
216
|
```
|
|
228
217
|
|
|
229
|
-
|
|
218
|
+
Tests use [VCR](https://github.com/vcr/vcr) to record HTTP interactions, so you don't need a monday.com API token to run them.
|
|
219
|
+
|
|
220
|
+
### Linting
|
|
230
221
|
|
|
231
222
|
```bash
|
|
232
223
|
bundle exec rake rubocop
|
|
233
224
|
```
|
|
234
225
|
|
|
226
|
+
### All Checks
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
bundle exec rake # Runs both tests and linter
|
|
230
|
+
```
|
|
231
|
+
|
|
235
232
|
## Contributing
|
|
236
233
|
|
|
237
|
-
Bug reports and pull requests are welcome on [GitHub](https://github.com/sanifhimani/monday_ruby).
|
|
234
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/sanifhimani/monday_ruby).
|
|
235
|
+
|
|
236
|
+
Please read our [Contributing Guide](CONTRIBUTING.md) for details on:
|
|
237
|
+
- Development setup and testing
|
|
238
|
+
- Documentation guidelines
|
|
239
|
+
- Code style and commit conventions
|
|
240
|
+
|
|
241
|
+
This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).
|
|
238
242
|
|
|
239
243
|
## License
|
|
240
244
|
|