monday_ruby 1.2.0 → 1.2.1

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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/lib/monday/version.rb +1 -1
  4. metadata +3 -79
  5. data/.env +0 -1
  6. data/.rspec +0 -2
  7. data/.rubocop.yml +0 -41
  8. data/.simplecov +0 -4
  9. data/.vscode/settings.json +0 -4
  10. data/CODE_OF_CONDUCT.md +0 -84
  11. data/CONTRIBUTING.md +0 -190
  12. data/Rakefile +0 -11
  13. data/docs/.vitepress/config.mjs +0 -255
  14. data/docs/.vitepress/theme/index.js +0 -4
  15. data/docs/.vitepress/theme/style.css +0 -43
  16. data/docs/README.md +0 -80
  17. data/docs/explanation/architecture.md +0 -507
  18. data/docs/explanation/best-practices/errors.md +0 -478
  19. data/docs/explanation/best-practices/performance.md +0 -1084
  20. data/docs/explanation/best-practices/rate-limiting.md +0 -630
  21. data/docs/explanation/best-practices/testing.md +0 -820
  22. data/docs/explanation/column-values.md +0 -857
  23. data/docs/explanation/design.md +0 -795
  24. data/docs/explanation/graphql.md +0 -356
  25. data/docs/explanation/migration/v1.md +0 -808
  26. data/docs/explanation/pagination.md +0 -447
  27. data/docs/guides/advanced/batch.md +0 -1274
  28. data/docs/guides/advanced/complex-queries.md +0 -1114
  29. data/docs/guides/advanced/errors.md +0 -818
  30. data/docs/guides/advanced/pagination.md +0 -934
  31. data/docs/guides/advanced/rate-limiting.md +0 -981
  32. data/docs/guides/authentication.md +0 -286
  33. data/docs/guides/boards/create.md +0 -386
  34. data/docs/guides/boards/delete.md +0 -405
  35. data/docs/guides/boards/duplicate.md +0 -511
  36. data/docs/guides/boards/query.md +0 -530
  37. data/docs/guides/boards/update.md +0 -453
  38. data/docs/guides/columns/create.md +0 -452
  39. data/docs/guides/columns/metadata.md +0 -492
  40. data/docs/guides/columns/query.md +0 -455
  41. data/docs/guides/columns/update-multiple.md +0 -459
  42. data/docs/guides/columns/update-values.md +0 -509
  43. data/docs/guides/files/add-to-column.md +0 -40
  44. data/docs/guides/files/add-to-update.md +0 -37
  45. data/docs/guides/files/clear-column.md +0 -33
  46. data/docs/guides/first-request.md +0 -285
  47. data/docs/guides/folders/manage.md +0 -750
  48. data/docs/guides/groups/items.md +0 -626
  49. data/docs/guides/groups/manage.md +0 -501
  50. data/docs/guides/installation.md +0 -169
  51. data/docs/guides/items/create.md +0 -493
  52. data/docs/guides/items/delete.md +0 -514
  53. data/docs/guides/items/query.md +0 -605
  54. data/docs/guides/items/subitems.md +0 -483
  55. data/docs/guides/items/update.md +0 -699
  56. data/docs/guides/updates/manage.md +0 -619
  57. data/docs/guides/use-cases/dashboard.md +0 -1421
  58. data/docs/guides/use-cases/import.md +0 -1962
  59. data/docs/guides/use-cases/task-management.md +0 -1381
  60. data/docs/guides/workspaces/manage.md +0 -502
  61. data/docs/index.md +0 -69
  62. data/docs/package-lock.json +0 -2468
  63. data/docs/package.json +0 -13
  64. data/docs/reference/client.md +0 -540
  65. data/docs/reference/configuration.md +0 -586
  66. data/docs/reference/errors.md +0 -693
  67. data/docs/reference/resources/account.md +0 -208
  68. data/docs/reference/resources/activity-log.md +0 -369
  69. data/docs/reference/resources/board-view.md +0 -359
  70. data/docs/reference/resources/board.md +0 -393
  71. data/docs/reference/resources/column.md +0 -543
  72. data/docs/reference/resources/file.md +0 -236
  73. data/docs/reference/resources/folder.md +0 -386
  74. data/docs/reference/resources/group.md +0 -507
  75. data/docs/reference/resources/item.md +0 -348
  76. data/docs/reference/resources/subitem.md +0 -267
  77. data/docs/reference/resources/update.md +0 -259
  78. data/docs/reference/resources/workspace.md +0 -213
  79. data/docs/reference/response.md +0 -560
  80. data/docs/tutorial/first-integration.md +0 -713
@@ -1,455 +0,0 @@
1
- # Query Column Values
2
-
3
- Retrieve column information and values from your boards.
4
-
5
- ## Query Board Columns
6
-
7
- Get all columns for a board:
8
-
9
- ```ruby
10
- require "monday_ruby"
11
-
12
- Monday.configure do |config|
13
- config.token = ENV["MONDAY_TOKEN"]
14
- end
15
-
16
- client = Monday::Client.new
17
-
18
- response = client.column.query(
19
- args: { ids: [1234567890] } # Board ID
20
- )
21
-
22
- if response.success?
23
- boards = response.body.dig("data", "boards")
24
- columns = boards.first&.dig("columns") || []
25
-
26
- puts "Found #{columns.length} columns:"
27
- columns.each do |column|
28
- puts " • #{column['title']}: '#{column['id']}' (#{column['type']})"
29
- end
30
- end
31
- ```
32
-
33
- **Output:**
34
- ```
35
- Found 7 columns:
36
- • Name: 'name' (name)
37
- • Status: 'status' (color)
38
- • Owner: 'people' (people)
39
- • Due Date: 'date4' (date)
40
- • Priority: 'status_1' (color)
41
- • Text: 'text' (text)
42
- • Budget: 'numbers' (numbers)
43
- ```
44
-
45
- ## Query Column Details
46
-
47
- Get detailed column information:
48
-
49
- ```ruby
50
- response = client.column.query(
51
- args: { ids: [1234567890] },
52
- select: [
53
- "id",
54
- "title",
55
- "description",
56
- "type",
57
- "width",
58
- "settings_str",
59
- "archived"
60
- ]
61
- )
62
-
63
- if response.success?
64
- boards = response.body.dig("data", "boards")
65
- columns = boards.first&.dig("columns") || []
66
-
67
- columns.each do |column|
68
- puts "\n#{column['title']}"
69
- puts " ID: #{column['id']}"
70
- puts " Type: #{column['type']}"
71
- puts " Width: #{column['width']}"
72
- puts " Archived: #{column['archived']}"
73
- puts " Description: #{column['description']}" if column['description']
74
- end
75
- end
76
- ```
77
-
78
- ## Query Multiple Boards
79
-
80
- Get columns for multiple boards:
81
-
82
- ```ruby
83
- response = client.column.query(
84
- args: { ids: [1234567890, 2345678901] },
85
- select: ["id", "title", "type"]
86
- )
87
-
88
- if response.success?
89
- boards = response.body.dig("data", "boards")
90
-
91
- boards.each do |board|
92
- columns = board["columns"] || []
93
- puts "\nBoard #{board['id']} has #{columns.length} columns"
94
-
95
- columns.each do |column|
96
- puts " • #{column['title']} (#{column['type']})"
97
- end
98
- end
99
- end
100
- ```
101
-
102
- ## Find Column by Title
103
-
104
- Search for a column by its title:
105
-
106
- ```ruby
107
- def find_column_by_title(client, board_id, title)
108
- response = client.column.query(
109
- args: { ids: [board_id] },
110
- select: ["id", "title", "type"]
111
- )
112
-
113
- return nil unless response.success?
114
-
115
- boards = response.body.dig("data", "boards")
116
- columns = boards.first&.dig("columns") || []
117
-
118
- columns.find { |col| col["title"].downcase == title.downcase }
119
- end
120
-
121
- # Usage
122
- column = find_column_by_title(client, 1234567890, "Status")
123
-
124
- if column
125
- puts "Found: #{column['title']}"
126
- puts " ID: #{column['id']}"
127
- puts " Type: #{column['type']}"
128
- else
129
- puts "Column not found"
130
- end
131
- ```
132
-
133
- ## Get Column ID by Title
134
-
135
- Quickly get a column's ID:
136
-
137
- ```ruby
138
- def get_column_id(client, board_id, title)
139
- column = find_column_by_title(client, board_id, title)
140
- column&.dig("id")
141
- end
142
-
143
- # Usage
144
- column_id = get_column_id(client, 1234567890, "Status")
145
- puts "Status column ID: #{column_id}" # => status
146
- ```
147
-
148
- ## Filter Columns by Type
149
-
150
- Find all columns of a specific type:
151
-
152
- ```ruby
153
- def find_columns_by_type(client, board_id, column_type)
154
- response = client.column.query(
155
- args: { ids: [board_id] },
156
- select: ["id", "title", "type"]
157
- )
158
-
159
- return [] unless response.success?
160
-
161
- boards = response.body.dig("data", "boards")
162
- columns = boards.first&.dig("columns") || []
163
-
164
- columns.select { |col| col["type"] == column_type }
165
- end
166
-
167
- # Find all status columns
168
- status_columns = find_columns_by_type(client, 1234567890, "color")
169
-
170
- puts "Found #{status_columns.length} status columns:"
171
- status_columns.each do |col|
172
- puts " • #{col['title']} (#{col['id']})"
173
- end
174
- ```
175
-
176
- ## Query Column Values for Items
177
-
178
- Get column values for specific items:
179
-
180
- ```ruby
181
- # Query items with their column values
182
- response = client.item.query(
183
- args: { ids: [987654321, 987654322] },
184
- select: [
185
- "id",
186
- "name",
187
- {
188
- column_values: ["id", "text", "type", "value"]
189
- }
190
- ]
191
- )
192
-
193
- if response.success?
194
- items = response.body.dig("data", "items")
195
-
196
- items.each do |item|
197
- puts "\n#{item['name']}"
198
- puts "Column Values:"
199
-
200
- item["column_values"].each do |col_val|
201
- next if col_val["text"].nil? || col_val["text"].empty?
202
- puts " • #{col_val['id']}: #{col_val['text']} (#{col_val['type']})"
203
- end
204
- end
205
- end
206
- ```
207
-
208
- ## Parse Column Settings
209
-
210
- Extract column settings (e.g., status labels):
211
-
212
- ```ruby
213
- require "json"
214
-
215
- response = client.column.query(
216
- args: { ids: [1234567890] },
217
- select: ["id", "title", "type", "settings_str"]
218
- )
219
-
220
- if response.success?
221
- boards = response.body.dig("data", "boards")
222
- columns = boards.first&.dig("columns") || []
223
-
224
- columns.each do |column|
225
- next unless column["settings_str"]
226
-
227
- settings = JSON.parse(column["settings_str"])
228
-
229
- puts "\n#{column['title']} (#{column['type']})"
230
- puts " Settings: #{settings.keys.join(', ')}"
231
-
232
- # For status columns, show labels
233
- if column["type"] == "color" && settings["labels"]
234
- puts " Labels:"
235
- settings["labels"].each do |id, label|
236
- puts " #{id}: #{label}"
237
- end
238
- end
239
- end
240
- end
241
- ```
242
-
243
- ## Get Column Structure
244
-
245
- Build a map of column IDs to titles:
246
-
247
- ```ruby
248
- def get_column_map(client, board_id)
249
- response = client.column.query(
250
- args: { ids: [board_id] },
251
- select: ["id", "title", "type"]
252
- )
253
-
254
- return {} unless response.success?
255
-
256
- boards = response.body.dig("data", "boards")
257
- columns = boards.first&.dig("columns") || []
258
-
259
- columns.each_with_object({}) do |col, hash|
260
- hash[col["id"]] = {
261
- title: col["title"],
262
- type: col["type"]
263
- }
264
- end
265
- end
266
-
267
- # Usage
268
- column_map = get_column_map(client, 1234567890)
269
-
270
- puts "Column Map:"
271
- column_map.each do |id, info|
272
- puts " #{id} => #{info[:title]} (#{info[:type]})"
273
- end
274
- ```
275
-
276
- ## Query Archived Columns
277
-
278
- Find archived columns:
279
-
280
- ```ruby
281
- response = client.column.query(
282
- args: { ids: [1234567890] },
283
- select: ["id", "title", "type", "archived"]
284
- )
285
-
286
- if response.success?
287
- boards = response.body.dig("data", "boards")
288
- columns = boards.first&.dig("columns") || []
289
-
290
- archived = columns.select { |col| col["archived"] }
291
-
292
- if archived.any?
293
- puts "Archived columns:"
294
- archived.each do |col|
295
- puts " • #{col['title']} (#{col['id']})"
296
- end
297
- else
298
- puts "No archived columns"
299
- end
300
- end
301
- ```
302
-
303
- ## Export Column Structure to CSV
304
-
305
- Export column information:
306
-
307
- ```ruby
308
- require "csv"
309
-
310
- def export_columns_to_csv(client, board_id, filename)
311
- response = client.column.query(
312
- args: { ids: [board_id] },
313
- select: ["id", "title", "type", "description", "width"]
314
- )
315
-
316
- return unless response.success?
317
-
318
- boards = response.body.dig("data", "boards")
319
- columns = boards.first&.dig("columns") || []
320
-
321
- CSV.open(filename, "w") do |csv|
322
- # Header
323
- csv << ["ID", "Title", "Type", "Description", "Width"]
324
-
325
- # Data
326
- columns.each do |column|
327
- csv << [
328
- column["id"],
329
- column["title"],
330
- column["type"],
331
- column["description"] || "",
332
- column["width"]
333
- ]
334
- end
335
- end
336
-
337
- puts "āœ“ Exported #{columns.length} columns to #{filename}"
338
- end
339
-
340
- # Usage
341
- export_columns_to_csv(client, 1234567890, "board_columns.csv")
342
- ```
343
-
344
- ## Complete Example
345
-
346
- Comprehensive column querying:
347
-
348
- ```ruby
349
- require "monday_ruby"
350
- require "dotenv/load"
351
-
352
- Monday.configure do |config|
353
- config.token = ENV["MONDAY_TOKEN"]
354
- end
355
-
356
- client = Monday::Client.new
357
-
358
- board_id = 1234567890
359
-
360
- response = client.column.query(
361
- args: { ids: [board_id] },
362
- select: [
363
- "id",
364
- "title",
365
- "description",
366
- "type",
367
- "width",
368
- "archived"
369
- ]
370
- )
371
-
372
- if response.success?
373
- boards = response.body.dig("data", "boards")
374
- columns = boards.first&.dig("columns") || []
375
-
376
- puts "\nšŸ“Š Board Column Structure\n#{'=' * 60}\n"
377
- puts "Total columns: #{columns.length}"
378
-
379
- # Group by type
380
- by_type = columns.group_by { |col| col["type"] }
381
-
382
- puts "\nColumns by Type:"
383
- by_type.each do |type, cols|
384
- puts " #{type}: #{cols.length} column(s)"
385
- end
386
-
387
- puts "\n#{'=' * 60}\n"
388
- puts "Column Details:\n"
389
-
390
- columns.each_with_index do |column, index|
391
- puts "\n#{index + 1}. #{column['title']}"
392
- puts " ID: #{column['id']}"
393
- puts " Type: #{column['type']}"
394
- puts " Width: #{column['width']}"
395
- puts " Archived: #{column['archived']}"
396
- puts " Description: #{column['description']}" if column['description']
397
- end
398
-
399
- puts "\n#{'=' * 60}"
400
- else
401
- puts "āŒ Failed to query columns"
402
- puts "Status: #{response.status}"
403
- end
404
- ```
405
-
406
- **Output:**
407
- ```
408
- šŸ“Š Board Column Structure
409
- ============================================================
410
-
411
- Total columns: 8
412
-
413
- Columns by Type:
414
- name: 1 column(s)
415
- color: 2 column(s)
416
- people: 1 column(s)
417
- date: 1 column(s)
418
- text: 1 column(s)
419
- numbers: 1 column(s)
420
- long-text: 1 column(s)
421
-
422
- ============================================================
423
-
424
- Column Details:
425
-
426
- 1. Name
427
- ID: name
428
- Type: name
429
- Width: 250
430
- Archived: false
431
-
432
- 2. Status
433
- ID: status
434
- Type: color
435
- Width: 120
436
- Archived: false
437
- Description: Current status of the task
438
-
439
- 3. Owner
440
- ID: people
441
- Type: people
442
- Width: 150
443
- Archived: false
444
-
445
- ...
446
-
447
- ============================================================
448
- ```
449
-
450
- ## Next Steps
451
-
452
- - [Create columns](/guides/columns/create)
453
- - [Update column values](/guides/columns/update-values)
454
- - [Change column metadata](/guides/columns/metadata)
455
- - [Query items](/guides/items/query)