bukku_rails 0.3.1 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36d08d91675a4c29f50674fb3116b717ec5f9a9f605d11823b1c851fb78a15e9
4
- data.tar.gz: 3de8d96557a0de06fb5c32aa9acbbf2481950503269444374a65efed7bd08c72
3
+ metadata.gz: 2b0900a75e1a3a94d686933e2afd5c22aa8d0b92e47b39ffc1ebaa4f7a2b8a93
4
+ data.tar.gz: 254fad26a47fd1e938f3934614166944345f74532cfcba2165df0d48007c3b1a
5
5
  SHA512:
6
- metadata.gz: 7f23d58a50ee544681bfc961fa195d7706312cdd88bc9a08dd0b151208d78ac0e4ed6ff7c319de2f1810c07533befee1afd587d64861ae1035b07b8ccee5456c
7
- data.tar.gz: caaee0c21c1003d44e83ea6a15953145bfe196fea59e79eae6ec0be0d0c0956a150267e6e67f5687180f3308cb9b3d1e1ba68c9d90d0e14a5ed938fb679af44f
6
+ metadata.gz: eb421a6f712e9d7d57d58498fa01ee2c4d9959203d87c97db5d73d84e70f6a9170fde5632c8430248308b749494e6de44493fa705a79f44263a6229b1643bad2
7
+ data.tar.gz: ead17cee9580de8b13193b925ad054a98f0ff98fd3f74ea4d5240ae214c3e7728fb0b6bb1292f1081338869027d61d8291b2c899fe11fd4ad19c3e38077ca0af
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.4.0] - 2026-10-01
4
+
5
+ - Add Tags: `get_tags`, `get_tag(id)`, `create_tag(body:)`
6
+ - Add Tag Groups: `get_tag_groups`, `create_tag_group(body:)`
7
+
3
8
  ## [0.1.0] - 2025-12-02
4
9
 
5
10
  - Initial release
data/README.md CHANGED
@@ -144,6 +144,16 @@ Just like in Rails the methods follow the singular and plural expression. Method
144
144
  | GET | `get_account(id)` | `/accounts/:id` |
145
145
  | POST | `create_account(body:)` | `/accounts` |
146
146
 
147
+ #### Control Panel
148
+
149
+ | HTTP Method | Ruby Method | Endpoint |
150
+ |------------|-------------|----------|
151
+ | GET | `get_tags(query-parameters)` | `/tags` |
152
+ | GET | `get_tag(id)` | `/tags/:id` |
153
+ | POST | `create_tag(body:)` | `/tags` |
154
+ | GET | `get_tag_groups(query-parameters)` | `/tags/groups` |
155
+ | POST | `create_tag_group(body:)` | `/tags/groups` |
156
+
147
157
  #### Files
148
158
 
149
159
  | HTTP Method | Ruby Method | Endpoint |
@@ -203,6 +213,17 @@ body = {
203
213
  contact = client.create_contact(body: body)
204
214
  ```
205
215
 
216
+ **Creating a tag:**
217
+ Every tag belongs to a tag group, so create (or look up) the group first.
218
+
219
+ ```ruby
220
+ group = client.create_tag_group(body: { name: "Branch" })
221
+ tag = client.create_tag(body: { name: "Kuala Lumpur", tag_group_id: group["tag_group"]["id"] })
222
+
223
+ # Existing groups, each with its tags under "children"
224
+ client.get_tag_groups
225
+ ```
226
+
206
227
  **File upload:**
207
228
 
208
229
  ```ruby
data/lib/bukku.rb CHANGED
@@ -307,6 +307,29 @@ class Bukku < Client
307
307
  post '/accounts', body: body
308
308
  end
309
309
 
310
+ ## CONTROL PANEL
311
+ # Tags
312
+ def get_tags(**kwargs)
313
+ get '/tags', query: kwargs
314
+ end
315
+
316
+ def get_tag(id)
317
+ get "/tags/#{id}"
318
+ end
319
+
320
+ def create_tag(body:)
321
+ post '/tags', body: body
322
+ end
323
+
324
+ # Tag Groups
325
+ def get_tag_groups(**kwargs)
326
+ get '/tags/groups', query: kwargs
327
+ end
328
+
329
+ def create_tag_group(body:)
330
+ post '/tags/groups', body: body
331
+ end
332
+
310
333
  # Files
311
334
  def upload_file(file_data:, filename:, mime_type:)
312
335
  upload '/files', file_data: file_data, filename: filename, mime_type: mime_type
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BukkuRails
4
- VERSION = '0.3.1'
4
+ VERSION = '0.4.0'
5
5
  end
data/lib/bukku_test.rb CHANGED
@@ -307,6 +307,29 @@ class BukkuTest < Client
307
307
  post '/accounts', body: body
308
308
  end
309
309
 
310
+ ## CONTROL PANEL
311
+ # Tags
312
+ def get_tags(**kwargs)
313
+ get '/tags', query: kwargs
314
+ end
315
+
316
+ def get_tag(id)
317
+ get "/tags/#{id}"
318
+ end
319
+
320
+ def create_tag(body:)
321
+ post '/tags', body: body
322
+ end
323
+
324
+ # Tag Groups
325
+ def get_tag_groups(**kwargs)
326
+ get '/tags/groups', query: kwargs
327
+ end
328
+
329
+ def create_tag_group(body:)
330
+ post '/tags/groups', body: body
331
+ end
332
+
310
333
  # Files
311
334
  def upload_file(file_data:, filename:, mime_type:)
312
335
  upload '/files', file_data: file_data, filename: filename, mime_type: mime_type
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bukku_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muzaffar Ariff
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-28 00:00:00.000000000 Z
11
+ date: 2026-10-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Use Rails conventions to call Bukku API requests.
14
14
  email: