monday_ruby 1.0.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.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.env +1 -1
  3. data/.rspec +0 -1
  4. data/.rubocop.yml +19 -0
  5. data/.simplecov +1 -0
  6. data/CHANGELOG.md +49 -0
  7. data/CONTRIBUTING.md +165 -0
  8. data/README.md +167 -88
  9. data/docs/.vitepress/config.mjs +255 -0
  10. data/docs/.vitepress/theme/index.js +4 -0
  11. data/docs/.vitepress/theme/style.css +43 -0
  12. data/docs/README.md +80 -0
  13. data/docs/explanation/architecture.md +507 -0
  14. data/docs/explanation/best-practices/errors.md +478 -0
  15. data/docs/explanation/best-practices/performance.md +1084 -0
  16. data/docs/explanation/best-practices/rate-limiting.md +630 -0
  17. data/docs/explanation/best-practices/testing.md +820 -0
  18. data/docs/explanation/column-values.md +857 -0
  19. data/docs/explanation/design.md +795 -0
  20. data/docs/explanation/graphql.md +356 -0
  21. data/docs/explanation/migration/v1.md +808 -0
  22. data/docs/explanation/pagination.md +447 -0
  23. data/docs/guides/advanced/batch.md +1274 -0
  24. data/docs/guides/advanced/complex-queries.md +1114 -0
  25. data/docs/guides/advanced/errors.md +818 -0
  26. data/docs/guides/advanced/pagination.md +934 -0
  27. data/docs/guides/advanced/rate-limiting.md +981 -0
  28. data/docs/guides/authentication.md +286 -0
  29. data/docs/guides/boards/create.md +386 -0
  30. data/docs/guides/boards/delete.md +405 -0
  31. data/docs/guides/boards/duplicate.md +511 -0
  32. data/docs/guides/boards/query.md +530 -0
  33. data/docs/guides/boards/update.md +453 -0
  34. data/docs/guides/columns/create.md +452 -0
  35. data/docs/guides/columns/metadata.md +492 -0
  36. data/docs/guides/columns/query.md +455 -0
  37. data/docs/guides/columns/update-multiple.md +459 -0
  38. data/docs/guides/columns/update-values.md +509 -0
  39. data/docs/guides/files/add-to-column.md +40 -0
  40. data/docs/guides/files/add-to-update.md +37 -0
  41. data/docs/guides/files/clear-column.md +33 -0
  42. data/docs/guides/first-request.md +285 -0
  43. data/docs/guides/folders/manage.md +750 -0
  44. data/docs/guides/groups/items.md +626 -0
  45. data/docs/guides/groups/manage.md +501 -0
  46. data/docs/guides/installation.md +169 -0
  47. data/docs/guides/items/create.md +493 -0
  48. data/docs/guides/items/delete.md +514 -0
  49. data/docs/guides/items/query.md +605 -0
  50. data/docs/guides/items/subitems.md +483 -0
  51. data/docs/guides/items/update.md +699 -0
  52. data/docs/guides/updates/manage.md +619 -0
  53. data/docs/guides/use-cases/dashboard.md +1421 -0
  54. data/docs/guides/use-cases/import.md +1962 -0
  55. data/docs/guides/use-cases/task-management.md +1381 -0
  56. data/docs/guides/workspaces/manage.md +502 -0
  57. data/docs/index.md +69 -0
  58. data/docs/package-lock.json +2468 -0
  59. data/docs/package.json +13 -0
  60. data/docs/reference/client.md +540 -0
  61. data/docs/reference/configuration.md +586 -0
  62. data/docs/reference/errors.md +693 -0
  63. data/docs/reference/resources/account.md +208 -0
  64. data/docs/reference/resources/activity-log.md +369 -0
  65. data/docs/reference/resources/board-view.md +359 -0
  66. data/docs/reference/resources/board.md +393 -0
  67. data/docs/reference/resources/column.md +543 -0
  68. data/docs/reference/resources/file.md +236 -0
  69. data/docs/reference/resources/folder.md +386 -0
  70. data/docs/reference/resources/group.md +507 -0
  71. data/docs/reference/resources/item.md +348 -0
  72. data/docs/reference/resources/subitem.md +267 -0
  73. data/docs/reference/resources/update.md +259 -0
  74. data/docs/reference/resources/workspace.md +213 -0
  75. data/docs/reference/response.md +560 -0
  76. data/docs/tutorial/first-integration.md +713 -0
  77. data/lib/monday/client.rb +41 -2
  78. data/lib/monday/configuration.rb +13 -0
  79. data/lib/monday/deprecation.rb +23 -0
  80. data/lib/monday/error.rb +5 -2
  81. data/lib/monday/request.rb +19 -1
  82. data/lib/monday/resources/base.rb +4 -0
  83. data/lib/monday/resources/board.rb +52 -0
  84. data/lib/monday/resources/column.rb +6 -0
  85. data/lib/monday/resources/file.rb +56 -0
  86. data/lib/monday/resources/folder.rb +55 -0
  87. data/lib/monday/resources/group.rb +66 -0
  88. data/lib/monday/resources/item.rb +62 -0
  89. data/lib/monday/util.rb +33 -1
  90. data/lib/monday/version.rb +1 -1
  91. data/lib/monday_ruby.rb +1 -0
  92. metadata +92 -11
  93. data/monday_ruby.gemspec +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e8164389fc7acb67d40bee3bf79a9768e1256833268e5ef8002c6d9392a5b75
4
- data.tar.gz: 29165f3538b8658267944fd2ea91f2bbdf11c916c7967e17cfe55e27397959c3
3
+ metadata.gz: 65df3dcbdada1d02fb3573b444015cb6b566d6b77cc1d63d103d6b5e7803f65b
4
+ data.tar.gz: 319fd612684e644dc0235c0010ece6890214f844d5b48f3f9238319ff77e70c5
5
5
  SHA512:
6
- metadata.gz: f21b44ba54e5c14513cd7f39b6709126fe1a5e54a00468da76fc2275230d9a01e7cf4844ae5035bf8777dacd8153ee7571a8a53a3491b6bf4366b47ea324d6ce
7
- data.tar.gz: bbaee28c405107767469f7a9386c7d2b991b4e877ccc3b476a360837ca25bb776aee2d05579ef4aa641b74b747cafe2fb73dc72836dd6b8264f61d4982b36729
6
+ metadata.gz: bc4f34d8de144d95b4fe9cc78ea9801614389c4be7aaf72ba29186d6447d14200c95a3814ed5d8a3106045142b81f10b38fe7045ca8fcb5549153acf59b63c95
7
+ data.tar.gz: e5c15771ea6c5ec86e2b12508860c1927d67017b223b40c51b921ee28912a691aaa2750f39ef08ec6d9efec091a5d3fdaf07393e920e8b907b34659d72372a4a
data/.env CHANGED
@@ -1 +1 @@
1
- token="eyJhbGciOiJIUzI1NiJ9.eyJ0aWQiOjM4MTE3NTY1MywiYWFpIjoxMSwidWlkIjo2MzEzMDMxMiwiaWFkIjoiMjAyNC0wNy0wN1QxMzo0OTo0Mi4wMzJaIiwicGVyIjoibWU6d3JpdGUiLCJhY3RpZCI6MjQzMDgwODMsInJnbiI6InVzZTEifQ.AKgwPueXJkzm9d0I9y4DzSKBwJ3Vi3t8IsOc2hpyDtk"
1
+ token="[REPLACE_TOKEN]"
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
- --format documentation
2
1
  --color
3
2
  --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,6 +1,14 @@
1
+ plugins:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
1
5
  AllCops:
2
6
  TargetRubyVersion: 2.7
3
7
  NewCops: enable
8
+ SuggestExtensions: false
9
+ Exclude:
10
+ - "spec/support/**/*.rb"
11
+ - "vendor/**/*"
4
12
 
5
13
  Style/StringLiterals:
6
14
  Enabled: true
@@ -19,4 +27,15 @@ Metrics/BlockLength:
19
27
 
20
28
  Metrics/MethodLength:
21
29
  Exclude:
30
+ - "lib/monday/configuration.rb"
22
31
  - "lib/monday/util.rb"
32
+
33
+ Metrics/ParameterLists:
34
+ Exclude:
35
+ - "lib/monday/resources/group.rb"
36
+
37
+ RSpec/NestedGroups:
38
+ Max: 5
39
+
40
+ RSpec/MultipleMemoizedHelpers:
41
+ Max: 11
data/.simplecov CHANGED
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ SimpleCov.add_filter "/spec/support/"
3
4
  SimpleCov.minimum_coverage 97
data/CHANGELOG.md CHANGED
@@ -1,3 +1,52 @@
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
+
15
+ ## v1.1.0 (October 27, 2025)
16
+
17
+ ### Added
18
+
19
+ - **Cursor-based pagination for items**:
20
+ - Added `items_page` method to `Board` resource for paginated item retrieval
21
+ - Added `items_page` method to `Group` resource for paginated group items
22
+ - Added `items_page` method to `Item` resource for paginated item queries
23
+ - Support for cursor-based pagination with customizable limits (up to 500 items per page)
24
+ - Support for filtered queries using `query_params` with rules and operators
25
+
26
+ - **Deprecation warning system**:
27
+ - Added `Deprecation` module for issuing deprecation warnings
28
+ - Marked `delete_subscribers` method for deprecation in v2.0.0
29
+ - Provides clear migration paths for deprecated methods
30
+
31
+ - **Configurable request timeouts**:
32
+ - Added `open_timeout` configuration option (default: 10 seconds)
33
+ - Added `read_timeout` configuration option (default: 30 seconds)
34
+ - Configurable at both global and client instance levels
35
+
36
+ - **Documentation improvements**:
37
+ - Added CONTRIBUTING.md with development guidelines
38
+ - Added VCR testing guide in pull request template
39
+
40
+ ### Changed
41
+
42
+ - Updated Ruby version support matrix in CI (added Ruby 3.3 and 3.4)
43
+ - Updated base64 gem dependency to ~> 0.3.0
44
+ - Improved RuboCop configuration and fixed linting issues
45
+
46
+ ### Fixed
47
+
48
+ - CI workflow improvements and linting configurations
49
+
1
50
  ## v1.0.0 (July 30, 2024)
2
51
 
3
52
  ### Changed
data/CONTRIBUTING.md CHANGED
@@ -16,6 +16,171 @@ Please follow these steps to have your contribution considered:
16
16
  2. Follow the [commit guidelines](#commit-message-guidelines).
17
17
  3. After you submit your pull request, verify that all the status checks are passing.
18
18
 
19
+ ## Testing Guidelines
20
+
21
+ This project uses [VCR](https://github.com/vcr/vcr) to record HTTP interactions for tests. This means you **do not need a Monday.com API token** to run most tests or contribute to the project.
22
+
23
+ ### Running Tests
24
+
25
+ To run the test suite:
26
+
27
+ ```bash
28
+ bundle exec rake spec
29
+ ```
30
+
31
+ All tests will use pre-recorded VCR cassettes stored in `spec/fixtures/vcr_cassettes/`.
32
+
33
+ ### Working with VCR Cassettes
34
+
35
+ **For most contributions, you won't need to modify VCR cassettes.** The existing cassettes cover the current API functionality.
36
+
37
+ #### When You Need to Record New Cassettes
38
+
39
+ You only need to record new VCR cassettes when:
40
+ - Adding support for a **new API endpoint** that doesn't have existing test coverage
41
+ - Modifying an existing API call that changes the request/response structure
42
+
43
+ To record new cassettes:
44
+
45
+ 1. Set your Monday.com API token as an environment variable:
46
+ ```bash
47
+ export MONDAY_TOKEN="your_token_here"
48
+ ```
49
+
50
+ 2. Delete the old cassette file (if updating an existing test):
51
+ ```bash
52
+ rm spec/fixtures/vcr_cassettes/your_cassette_name.yml
53
+ ```
54
+
55
+ 3. Run the specific test to generate a new cassette:
56
+ ```bash
57
+ bundle exec rspec spec/path/to/your_spec.rb
58
+ ```
59
+
60
+ 4. **Important:** Before committing, verify the cassette doesn't contain sensitive data:
61
+ - VCR automatically filters the `Authorization` header
62
+ - Check for any other sensitive information in the cassette file
63
+ - Cassettes are committed to the repository
64
+
65
+ #### Testing New Features Without API Access
66
+
67
+ If you're adding a new feature but don't have API access to record cassettes:
68
+ 1. Write your implementation and tests
69
+ 2. Create a pull request noting that cassettes need to be recorded
70
+ 3. A maintainer with API access will record the cassettes for you
71
+
72
+ ### Code Quality
73
+
74
+ Run RuboCop to ensure code style compliance:
75
+
76
+ ```bash
77
+ bundle exec rake rubocop
78
+ ```
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
+
19
184
  ## Commit message guidelines
20
185
 
21
186
  * Use present tense ("Add feature" not "Added feature")
data/README.md CHANGED
@@ -1,165 +1,244 @@
1
- # Monday API Library for Ruby
1
+ # monday_ruby
2
2
 
3
3
  ![Build Status](https://github.com/sanifhimani/monday_ruby/actions/workflows/ci.yml/badge.svg)
4
4
  [![Gem Version](https://badge.fury.io/rb/monday_ruby.svg)](https://badge.fury.io/rb/monday_ruby)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/sanifhimani/monday_ruby/badge.svg?branch=main)](https://coveralls.io/github/sanifhimani/monday_ruby?branch=main)
6
6
 
7
- This library provides convenient access to the monday.com API from the application written in Ruby.
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
- The library provides:
9
+ ## Features
10
10
 
11
- 1. A pre-defined set of methods to easily interact with the API resources.
12
- 2. Easy configuration path for fast setup and use.
13
- 3. Easy error handling.
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
- **Check out the [Wiki](https://github.com/sanifhimani/monday_ruby/wiki) for detailed documentation on how to use the library.**
17
+ ## Documentation
16
18
 
17
- ## Installation
19
+ **[Complete Documentation →](https://sanifhimani.github.io/monday_ruby/)**
18
20
 
19
- ```bash
20
- gem install monday_ruby
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
- ## Usage
26
+ ## Installation
24
27
 
25
- ***Complete list of resources along with examples are provided in the [Wiki](https://github.com/sanifhimani/monday_ruby/wiki).***
28
+ Add to your Gemfile:
26
29
 
27
- The library needs to be configured with your account's authentication token which is available on the Admin tab on monday.com. Elaborate documentation can be found [here](https://developer.monday.com/api-reference/docs/authentication).
30
+ ```ruby
31
+ gem "monday_ruby"
32
+ ```
28
33
 
29
- ### Configuration
34
+ Or install directly:
30
35
 
31
- Once you have the authentication token, you can either globally configure the library or you can configure a specific client.
36
+ ```bash
37
+ gem install monday_ruby
38
+ ```
32
39
 
33
- #### Global config
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 = "<AUTH_TOKEN>"
47
+ config.token = ENV["MONDAY_TOKEN"]
40
48
  end
41
- ```
42
49
 
43
- #### Client specific config
44
- ```ruby
45
- require "monday_ruby"
50
+ # Create a client
51
+ client = Monday::Client.new
52
+
53
+ # Query boards
54
+ response = client.board.query(args: { limit: 5 })
46
55
 
47
- client = Monday::Client.new(token: "<AUTH_TOKEN>")
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
- The version configuration field allows you to optionally pass in the version of the API you want to use. By default, the latest stable version is used.
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
- ```ruby
53
- require "monday_ruby"
64
+ ## Usage
54
65
 
66
+ ### Configuration
67
+
68
+ **Global configuration** (recommended):
69
+
70
+ ```ruby
55
71
  Monday.configure do |config|
56
- config.token = "<AUTH_TOKEN>"
57
- config.version = "2023-07"
72
+ config.token = ENV["MONDAY_TOKEN"]
73
+ config.version = "2024-01" # API version (optional)
58
74
  end
59
- ```
60
75
 
61
- ### Accessing a response object
76
+ client = Monday::Client.new
77
+ ```
62
78
 
63
- Get access to response objects by initializing a client and using the appropriate action you want to perform:
79
+ **Per-client configuration**:
64
80
 
65
81
  ```ruby
66
- client = Monday::Client.new(token: "<AUTH_TOKEN>")
67
- response = client.boards
82
+ client = Monday::Client.new(
83
+ token: ENV["MONDAY_TOKEN"],
84
+ version: "2024-01"
85
+ )
86
+ ```
68
87
 
69
- puts response.success?
70
- puts response.body
88
+ **Configure timeouts**:
89
+
90
+ ```ruby
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
71
96
  ```
72
97
 
73
- ### Use cases
98
+ ### Working with Boards
74
99
 
75
- Here are some common use cases for the API client.
100
+ ```ruby
101
+ # Query boards
102
+ response = client.board.query(
103
+ args: { ids: [1234567890] },
104
+ select: ["id", "name", "description"]
105
+ )
106
+
107
+ boards = response.body.dig("data", "boards")
108
+
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
+ )
76
117
 
77
- #### Fetching all the boards
118
+ board = response.body.dig("data", "create_board")
119
+ ```
78
120
 
79
- Initialize the client with the auth token and call the `boards` method.
121
+ ### Working with Items
80
122
 
81
123
  ```ruby
82
- client = Monday::Client.new(token: <AUTH_TOKEN>)
83
-
84
- response = client.boards # => <Monday::Response ...>
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" }
132
+ }
133
+ }
134
+ )
85
135
 
86
- # To check if the request was successful
87
- response.success? # => true
136
+ # Query items
137
+ response = client.item.query(
138
+ args: { ids: [987654321] },
139
+ select: ["id", "name", { column_values: ["id", "text"] }]
140
+ )
88
141
 
89
- # To get the boards from the response
90
- response.dig("data", "boards") # => [...]
142
+ items = response.body.dig("data", "items")
91
143
  ```
92
144
 
93
- #### Creating a new board
145
+ ### Pagination
94
146
 
95
- Initialize the client with the auth token and call the `create_board` method.
147
+ Handle large datasets efficiently with cursor-based pagination:
96
148
 
97
149
  ```ruby
98
- client = Monday::Client.new(token: <AUTH_TOKEN>)
150
+ # Fetch first page
151
+ response = client.board.items_page(
152
+ board_ids: 1234567890,
153
+ limit: 100
154
+ )
155
+
156
+ items = response.body.dig("data", "boards", 0, "items_page", "items")
157
+ cursor = response.body.dig("data", "boards", 0, "items_page", "cursor")
158
+
159
+ # Fetch next page
160
+ if cursor
161
+ next_response = client.board.items_page(
162
+ board_ids: 1234567890,
163
+ limit: 100,
164
+ cursor: cursor
165
+ )
166
+ end
167
+ ```
99
168
 
100
- args = {
101
- board_name: "Test board",
102
- board_kind: "public",
103
- description: "Test board description"
104
- }
169
+ See the [Pagination Guide](https://sanifhimani.github.io/monday_ruby/guides/advanced/pagination) for more details.
105
170
 
106
- # => <Monday::Response ...>
107
- response = client.create_board(args: args)
171
+ ### Error Handling
108
172
 
109
- # To check if the request was successful
110
- response.success? # => true
173
+ The library provides typed exceptions for different error scenarios:
111
174
 
112
- # To get the created board from the response
113
- response.dig("data", "create_board") # => { ... }
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
114
187
  ```
115
188
 
116
- #### Creating a new item on board
189
+ See the [Error Handling Guide](https://sanifhimani.github.io/monday_ruby/guides/advanced/errors) for best practices.
117
190
 
118
- Initialize the client with the auth token and call the `create_item` method.
191
+ ## Available Resources
119
192
 
120
- ```ruby
121
- client = Monday::Client.new(token: <AUTH_TOKEN>)
122
-
123
- args = {
124
- board_id: <BOARD_ID>,
125
- item_name: "New item",
126
- column_values: {
127
- status: {
128
- label: "Working on it"
129
- },
130
- keywords: {
131
- labels: ["Tech team", "DevOps team"]
132
- }
133
- }
134
- }
193
+ The client provides access to all monday.com resources:
135
194
 
136
- # => <Monday::Response ...>
137
- response = client.create_item(args: args)
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`
138
207
 
139
- # To check if the request was successful
140
- response.success? # => true
141
-
142
- # To get the created item from the response
143
- response.dig("data", "create_item") # => { ... }
144
- ```
208
+ For complete API documentation, see the [API Reference](https://sanifhimani.github.io/monday_ruby/reference/client).
145
209
 
146
210
  ## Development
147
211
 
148
- Run all tests:
212
+ ### Running Tests
149
213
 
150
214
  ```bash
151
215
  bundle exec rake spec
152
216
  ```
153
217
 
154
- Run linter:
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
155
221
 
156
222
  ```bash
157
223
  bundle exec rake rubocop
158
224
  ```
159
225
 
226
+ ### All Checks
227
+
228
+ ```bash
229
+ bundle exec rake # Runs both tests and linter
230
+ ```
231
+
160
232
  ## Contributing
161
233
 
162
- Bug reports and pull requests are welcome on [GitHub](https://github.com/sanifhimani/monday_ruby). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/sanifhimani/monday_ruby/blob/main/CODE_OF_CONDUCT.md).
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).
163
242
 
164
243
  ## License
165
244