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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +21 -0
- data/lib/bukku.rb +23 -0
- data/lib/bukku_rails/version.rb +1 -1
- data/lib/bukku_test.rb +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b0900a75e1a3a94d686933e2afd5c22aa8d0b92e47b39ffc1ebaa4f7a2b8a93
|
|
4
|
+
data.tar.gz: 254fad26a47fd1e938f3934614166944345f74532cfcba2165df0d48007c3b1a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb421a6f712e9d7d57d58498fa01ee2c4d9959203d87c97db5d73d84e70f6a9170fde5632c8430248308b749494e6de44493fa705a79f44263a6229b1643bad2
|
|
7
|
+
data.tar.gz: ead17cee9580de8b13193b925ad054a98f0ff98fd3f74ea4d5240ae214c3e7728fb0b6bb1292f1081338869027d61d8291b2c899fe11fd4ad19c3e38077ca0af
|
data/CHANGELOG.md
CHANGED
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
|
data/lib/bukku_rails/version.rb
CHANGED
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.
|
|
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-
|
|
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:
|