fizzy-cli 0.3.0 → 0.3.2
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 +11 -0
- data/README.md +12 -20
- data/lib/fizzy/cli/base.rb +0 -4
- data/lib/fizzy/cli/boards.rb +5 -5
- data/lib/fizzy/cli/cards.rb +16 -16
- data/lib/fizzy/cli/columns.rb +5 -5
- data/lib/fizzy/cli/comments.rb +5 -5
- data/lib/fizzy/cli/notifications.rb +4 -4
- data/lib/fizzy/cli/pins.rb +2 -2
- data/lib/fizzy/cli/reactions.rb +1 -1
- data/lib/fizzy/cli/steps.rb +4 -4
- data/lib/fizzy/cli/tags.rb +1 -1
- data/lib/fizzy/cli/users.rb +4 -4
- data/lib/fizzy/client.rb +2 -3
- data/lib/fizzy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e138fc3dd09193bc96ddc984ec1a4c68c5d425ab1522f90633cb8013741dcab2
|
|
4
|
+
data.tar.gz: ad8e75db7233f1fb6fb6aed72713c0a7876bc5cc94f0e39644b18562e02f3c97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9fc0ed67b2f598b0959ba808b1b0b992430f2aba7c1e98f5b29aeb757351575e3700da8864943f385f2ffcd9be3795229cfdbb57a4bea963768559eacd1aac7
|
|
7
|
+
data.tar.gz: 4e3d6af1559e5994c1431b1a5681c806c8a3661cf8de8d0e84dbca5f44c7f1df598a4bac10238dada7f05267f48bfbc264ff6f526a8ac2eb4c0f49a5eed514d9
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.3.2] - 2026-02-22
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Moved AI Agent Skill section in README to immediately follow Install
|
|
12
|
+
|
|
13
|
+
## [0.3.1] - 2026-02-22
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Client auto-prepends account slug to API paths; CLI subcommands pass relative paths instead of manually building `/slug/resource` strings
|
|
17
|
+
- Removed `slug` helper from CLI::Base and `account_slug` accessor from Client
|
|
18
|
+
|
|
8
19
|
## [0.3.0] - 2026-02-22
|
|
9
20
|
|
|
10
21
|
### Added
|
data/README.md
CHANGED
|
@@ -13,6 +13,18 @@ Requires Ruby >= 3.2.
|
|
|
13
13
|
gem install fizzy
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
### AI Agent Skill
|
|
17
|
+
|
|
18
|
+
Fizzy CLI ships with a [skill file](skills/fizzy-cli/SKILL.md) that teaches AI coding assistants (Claude Code, Codex) how to use the CLI. Install it so agents can manage your Fizzy boards and cards autonomously.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
fizzy skill install # Claude Code, user-level (default)
|
|
22
|
+
fizzy skill install --target codex # OpenAI Codex / OpenCode
|
|
23
|
+
fizzy skill install --target all # All supported agents
|
|
24
|
+
fizzy skill install --scope project # Project-level instead of user-level
|
|
25
|
+
fizzy skill uninstall # Remove skill file
|
|
26
|
+
```
|
|
27
|
+
|
|
16
28
|
## Authentication
|
|
17
29
|
|
|
18
30
|
### Getting a Personal Access Token
|
|
@@ -190,26 +202,6 @@ bundle exec rake test # tests only
|
|
|
190
202
|
bundle exec rubocop # lint only
|
|
191
203
|
```
|
|
192
204
|
|
|
193
|
-
## AI Agent Integration
|
|
194
|
-
|
|
195
|
-
Fizzy CLI ships with a [skill file](skills/fizzy-cli/SKILL.md) that teaches AI coding assistants how to use the CLI. Install it so agents can manage your Fizzy boards and cards autonomously.
|
|
196
|
-
|
|
197
|
-
The `fizzy` gem must be installed and authenticated first:
|
|
198
|
-
|
|
199
|
-
```sh
|
|
200
|
-
gem install fizzy-cli
|
|
201
|
-
fizzy auth login --token YOUR_TOKEN
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
```sh
|
|
205
|
-
fizzy skill install # Claude Code, user-level (default)
|
|
206
|
-
fizzy skill install --target codex # OpenAI Codex / OpenCode
|
|
207
|
-
fizzy skill install --target all # All supported agents
|
|
208
|
-
fizzy skill install --scope project # Project-level instead of user-level
|
|
209
|
-
fizzy skill uninstall # Remove skill file
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
|
|
213
205
|
## Contributing
|
|
214
206
|
|
|
215
207
|
Bug reports and pull requests are welcome on GitHub at https://github.com/dpaluy/fizzy-cli.
|
data/lib/fizzy/cli/base.rb
CHANGED
data/lib/fizzy/cli/boards.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Fizzy
|
|
|
7
7
|
|
|
8
8
|
desc "list", "List all boards"
|
|
9
9
|
def list
|
|
10
|
-
data = paginator.all("
|
|
10
|
+
data = paginator.all("boards")
|
|
11
11
|
output_list(data, headers: %w[ID Name Cards Columns]) do |b|
|
|
12
12
|
[b["id"], b["name"], b["open_cards_count"], b["columns_count"]]
|
|
13
13
|
end
|
|
@@ -15,7 +15,7 @@ module Fizzy
|
|
|
15
15
|
|
|
16
16
|
desc "get BOARD_ID", "Show a board"
|
|
17
17
|
def get(board_id)
|
|
18
|
-
resp = client.get("
|
|
18
|
+
resp = client.get("boards/#{board_id}")
|
|
19
19
|
b = resp.body
|
|
20
20
|
output_detail(b, pairs: [
|
|
21
21
|
["ID", b["id"]],
|
|
@@ -28,7 +28,7 @@ module Fizzy
|
|
|
28
28
|
|
|
29
29
|
desc "create NAME", "Create a board"
|
|
30
30
|
def create(name)
|
|
31
|
-
resp = client.post("
|
|
31
|
+
resp = client.post("boards", body: { name: name })
|
|
32
32
|
b = resp.body
|
|
33
33
|
output_detail(b, pairs: [
|
|
34
34
|
["ID", b["id"]],
|
|
@@ -39,7 +39,7 @@ module Fizzy
|
|
|
39
39
|
desc "update BOARD_ID", "Update a board"
|
|
40
40
|
option :name, required: true, desc: "New board name"
|
|
41
41
|
def update(board_id)
|
|
42
|
-
resp = client.put("
|
|
42
|
+
resp = client.put("boards/#{board_id}", body: { name: options[:name] })
|
|
43
43
|
b = resp.body
|
|
44
44
|
output_detail(b, pairs: [
|
|
45
45
|
["ID", b["id"]],
|
|
@@ -49,7 +49,7 @@ module Fizzy
|
|
|
49
49
|
|
|
50
50
|
desc "delete BOARD_ID", "Delete a board"
|
|
51
51
|
def delete(board_id)
|
|
52
|
-
client.delete("
|
|
52
|
+
client.delete("boards/#{board_id}")
|
|
53
53
|
puts "Board #{board_id} deleted."
|
|
54
54
|
end
|
|
55
55
|
end
|
data/lib/fizzy/cli/cards.rb
CHANGED
|
@@ -19,7 +19,7 @@ module Fizzy
|
|
|
19
19
|
params[:assignee_id] = options[:assignee] if options[:assignee]
|
|
20
20
|
options[:tag]&.each { |t| (params[:"tag_ids[]"] ||= []) << t }
|
|
21
21
|
|
|
22
|
-
data = paginator.all("
|
|
22
|
+
data = paginator.all("cards", params: params)
|
|
23
23
|
output_list(data, headers: %w[# Title Board Status Column]) do |c|
|
|
24
24
|
[
|
|
25
25
|
c["number"],
|
|
@@ -33,7 +33,7 @@ module Fizzy
|
|
|
33
33
|
|
|
34
34
|
desc "get NUMBER", "Show a card"
|
|
35
35
|
def get(number)
|
|
36
|
-
resp = client.get("
|
|
36
|
+
resp = client.get("cards/#{number}")
|
|
37
37
|
c = resp.body
|
|
38
38
|
output_detail(c, pairs: [
|
|
39
39
|
["Number", "##{c["number"]}"],
|
|
@@ -58,7 +58,7 @@ module Fizzy
|
|
|
58
58
|
body = { title: title }
|
|
59
59
|
body[:body] = options[:body] if options[:body]
|
|
60
60
|
body[:column_id] = options[:column] if options[:column]
|
|
61
|
-
resp = client.post("
|
|
61
|
+
resp = client.post("boards/#{options[:board]}/cards", body: body)
|
|
62
62
|
c = resp.body
|
|
63
63
|
output_detail(c, pairs: [
|
|
64
64
|
["Number", "##{c["number"]}"],
|
|
@@ -71,7 +71,7 @@ module Fizzy
|
|
|
71
71
|
option :title, desc: "New title"
|
|
72
72
|
option :body, desc: "New body (HTML)"
|
|
73
73
|
def update(number)
|
|
74
|
-
resp = client.put("
|
|
74
|
+
resp = client.put("cards/#{number}", body: build_body(:title, :body))
|
|
75
75
|
c = resp.body
|
|
76
76
|
output_detail(c, pairs: [
|
|
77
77
|
["Number", "##{c["number"]}"],
|
|
@@ -81,75 +81,75 @@ module Fizzy
|
|
|
81
81
|
|
|
82
82
|
desc "delete NUMBER", "Delete a card"
|
|
83
83
|
def delete(number)
|
|
84
|
-
client.delete("
|
|
84
|
+
client.delete("cards/#{number}")
|
|
85
85
|
puts "Card ##{number} deleted."
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
desc "close NUMBER", "Close a card"
|
|
89
89
|
def close(number)
|
|
90
|
-
client.post("
|
|
90
|
+
client.post("cards/#{number}/closure")
|
|
91
91
|
puts "Card ##{number} closed."
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
desc "reopen NUMBER", "Reopen a closed card"
|
|
95
95
|
def reopen(number)
|
|
96
|
-
client.delete("
|
|
96
|
+
client.delete("cards/#{number}/closure")
|
|
97
97
|
puts "Card ##{number} reopened."
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
desc "not-now NUMBER", "Mark a card as not-now"
|
|
101
101
|
map "not-now" => :not_now
|
|
102
102
|
def not_now(number)
|
|
103
|
-
client.post("
|
|
103
|
+
client.post("cards/#{number}/not_now")
|
|
104
104
|
puts "Card ##{number} marked not-now."
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
desc "triage NUMBER", "Triage a card into a column"
|
|
108
108
|
option :column, required: true, desc: "Column ID"
|
|
109
109
|
def triage(number)
|
|
110
|
-
client.post("
|
|
110
|
+
client.post("cards/#{number}/triage", body: { column_id: options[:column] })
|
|
111
111
|
puts "Card ##{number} triaged."
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
desc "untriage NUMBER", "Remove a card from triage"
|
|
115
115
|
def untriage(number)
|
|
116
|
-
client.delete("
|
|
116
|
+
client.delete("cards/#{number}/triage")
|
|
117
117
|
puts "Card ##{number} untriaged."
|
|
118
118
|
end
|
|
119
119
|
|
|
120
120
|
desc "tag NUMBER TAG_TITLE", "Add a tag to a card"
|
|
121
121
|
def tag(number, tag_title)
|
|
122
|
-
client.post("
|
|
122
|
+
client.post("cards/#{number}/taggings", body: { tag_title: tag_title })
|
|
123
123
|
puts "Tag '#{tag_title}' added to card ##{number}."
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
desc "assign NUMBER ASSIGNEE_ID", "Toggle assignment on a card"
|
|
127
127
|
def assign(number, assignee_id)
|
|
128
|
-
client.post("
|
|
128
|
+
client.post("cards/#{number}/assignments", body: { assignee_id: assignee_id })
|
|
129
129
|
puts "Assignment toggled for card ##{number}."
|
|
130
130
|
end
|
|
131
131
|
|
|
132
132
|
desc "watch NUMBER", "Watch a card"
|
|
133
133
|
def watch(number)
|
|
134
|
-
client.post("
|
|
134
|
+
client.post("cards/#{number}/watch")
|
|
135
135
|
puts "Watching card ##{number}."
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
desc "unwatch NUMBER", "Unwatch a card"
|
|
139
139
|
def unwatch(number)
|
|
140
|
-
client.delete("
|
|
140
|
+
client.delete("cards/#{number}/watch")
|
|
141
141
|
puts "Unwatched card ##{number}."
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
desc "golden NUMBER", "Mark a card as golden"
|
|
145
145
|
def golden(number)
|
|
146
|
-
client.post("
|
|
146
|
+
client.post("cards/#{number}/goldness")
|
|
147
147
|
puts "Card ##{number} marked golden."
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
desc "ungolden NUMBER", "Remove golden from a card"
|
|
151
151
|
def ungolden(number)
|
|
152
|
-
client.delete("
|
|
152
|
+
client.delete("cards/#{number}/goldness")
|
|
153
153
|
puts "Card ##{number} ungolden."
|
|
154
154
|
end
|
|
155
155
|
|
data/lib/fizzy/cli/columns.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Fizzy
|
|
|
8
8
|
desc "list", "List columns for a board"
|
|
9
9
|
option :board, required: true, desc: "Board ID"
|
|
10
10
|
def list
|
|
11
|
-
data = paginator.all("
|
|
11
|
+
data = paginator.all("boards/#{options[:board]}/columns")
|
|
12
12
|
output_list(data, headers: %w[ID Name Position]) do |c|
|
|
13
13
|
[c["id"], c["name"], c["position"]]
|
|
14
14
|
end
|
|
@@ -17,7 +17,7 @@ module Fizzy
|
|
|
17
17
|
desc "get COLUMN_ID", "Show a column"
|
|
18
18
|
option :board, required: true, desc: "Board ID"
|
|
19
19
|
def get(column_id)
|
|
20
|
-
resp = client.get("
|
|
20
|
+
resp = client.get("boards/#{options[:board]}/columns/#{column_id}")
|
|
21
21
|
c = resp.body
|
|
22
22
|
output_detail(c, pairs: [
|
|
23
23
|
["ID", c["id"]],
|
|
@@ -30,7 +30,7 @@ module Fizzy
|
|
|
30
30
|
desc "create NAME", "Create a column"
|
|
31
31
|
option :board, required: true, desc: "Board ID"
|
|
32
32
|
def create(name)
|
|
33
|
-
resp = client.post("
|
|
33
|
+
resp = client.post("boards/#{options[:board]}/columns", body: { name: name })
|
|
34
34
|
c = resp.body
|
|
35
35
|
output_detail(c, pairs: [
|
|
36
36
|
["ID", c["id"]],
|
|
@@ -42,7 +42,7 @@ module Fizzy
|
|
|
42
42
|
option :board, required: true, desc: "Board ID"
|
|
43
43
|
option :name, required: true, desc: "New column name"
|
|
44
44
|
def update(column_id)
|
|
45
|
-
resp = client.put("
|
|
45
|
+
resp = client.put("boards/#{options[:board]}/columns/#{column_id}", body: { name: options[:name] })
|
|
46
46
|
c = resp.body
|
|
47
47
|
output_detail(c, pairs: [
|
|
48
48
|
["ID", c["id"]],
|
|
@@ -53,7 +53,7 @@ module Fizzy
|
|
|
53
53
|
desc "delete COLUMN_ID", "Delete a column"
|
|
54
54
|
option :board, required: true, desc: "Board ID"
|
|
55
55
|
def delete(column_id)
|
|
56
|
-
client.delete("
|
|
56
|
+
client.delete("boards/#{options[:board]}/columns/#{column_id}")
|
|
57
57
|
puts "Column #{column_id} deleted."
|
|
58
58
|
end
|
|
59
59
|
end
|
data/lib/fizzy/cli/comments.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Fizzy
|
|
|
8
8
|
desc "list", "List comments on a card"
|
|
9
9
|
option :card, required: true, type: :numeric, desc: "Card number"
|
|
10
10
|
def list
|
|
11
|
-
data = paginator.all("
|
|
11
|
+
data = paginator.all("cards/#{options[:card]}/comments")
|
|
12
12
|
output_list(data, headers: %w[ID Author Created]) do |c|
|
|
13
13
|
[c["id"], c.dig("creator", "name"), c["created_at"]]
|
|
14
14
|
end
|
|
@@ -17,7 +17,7 @@ module Fizzy
|
|
|
17
17
|
desc "get COMMENT_ID", "Show a comment"
|
|
18
18
|
option :card, required: true, type: :numeric, desc: "Card number"
|
|
19
19
|
def get(comment_id)
|
|
20
|
-
resp = client.get("
|
|
20
|
+
resp = client.get("cards/#{options[:card]}/comments/#{comment_id}")
|
|
21
21
|
c = resp.body
|
|
22
22
|
output_detail(c, pairs: [
|
|
23
23
|
["ID", c["id"]],
|
|
@@ -30,7 +30,7 @@ module Fizzy
|
|
|
30
30
|
desc "create BODY", "Add a comment to a card"
|
|
31
31
|
option :card, required: true, type: :numeric, desc: "Card number"
|
|
32
32
|
def create(body_text)
|
|
33
|
-
resp = client.post("
|
|
33
|
+
resp = client.post("cards/#{options[:card]}/comments", body: { body: body_text })
|
|
34
34
|
c = resp.body
|
|
35
35
|
output_detail(c, pairs: [
|
|
36
36
|
["ID", c["id"]],
|
|
@@ -42,7 +42,7 @@ module Fizzy
|
|
|
42
42
|
option :card, required: true, type: :numeric, desc: "Card number"
|
|
43
43
|
option :body, required: true, desc: "New body"
|
|
44
44
|
def update(comment_id)
|
|
45
|
-
resp = client.put("
|
|
45
|
+
resp = client.put("cards/#{options[:card]}/comments/#{comment_id}", body: build_body(:body))
|
|
46
46
|
c = resp.body
|
|
47
47
|
output_detail(c, pairs: [
|
|
48
48
|
["ID", c["id"]],
|
|
@@ -53,7 +53,7 @@ module Fizzy
|
|
|
53
53
|
desc "delete COMMENT_ID", "Delete a comment"
|
|
54
54
|
option :card, required: true, type: :numeric, desc: "Card number"
|
|
55
55
|
def delete(comment_id)
|
|
56
|
-
client.delete("
|
|
56
|
+
client.delete("cards/#{options[:card]}/comments/#{comment_id}")
|
|
57
57
|
puts "Comment #{comment_id} deleted."
|
|
58
58
|
end
|
|
59
59
|
end
|
|
@@ -7,7 +7,7 @@ module Fizzy
|
|
|
7
7
|
|
|
8
8
|
desc "list", "List notifications"
|
|
9
9
|
def list
|
|
10
|
-
data = paginator.all("
|
|
10
|
+
data = paginator.all("notifications")
|
|
11
11
|
output_list(data, headers: %w[ID Type Card Read Created]) do |n|
|
|
12
12
|
[
|
|
13
13
|
n["id"],
|
|
@@ -21,20 +21,20 @@ module Fizzy
|
|
|
21
21
|
|
|
22
22
|
desc "read ID", "Mark notification as read"
|
|
23
23
|
def read(id)
|
|
24
|
-
client.post("
|
|
24
|
+
client.post("notifications/#{id}/reading")
|
|
25
25
|
puts "Notification #{id} marked read."
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
desc "unread ID", "Mark notification as unread"
|
|
29
29
|
def unread(id)
|
|
30
|
-
client.delete("
|
|
30
|
+
client.delete("notifications/#{id}/reading")
|
|
31
31
|
puts "Notification #{id} marked unread."
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
desc "mark-all-read", "Mark all notifications as read"
|
|
35
35
|
map "mark-all-read" => :mark_all_read
|
|
36
36
|
def mark_all_read
|
|
37
|
-
client.post("
|
|
37
|
+
client.post("notifications/bulk_reading")
|
|
38
38
|
puts "All notifications marked read."
|
|
39
39
|
end
|
|
40
40
|
end
|
data/lib/fizzy/cli/pins.rb
CHANGED
|
@@ -16,13 +16,13 @@ module Fizzy
|
|
|
16
16
|
|
|
17
17
|
desc "pin NUMBER", "Pin a card"
|
|
18
18
|
def pin(number)
|
|
19
|
-
client.post("
|
|
19
|
+
client.post("cards/#{number}/pin")
|
|
20
20
|
puts "Card ##{number} pinned."
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
desc "unpin NUMBER", "Unpin a card"
|
|
24
24
|
def unpin(number)
|
|
25
|
-
client.delete("
|
|
25
|
+
client.delete("cards/#{number}/pin")
|
|
26
26
|
puts "Card ##{number} unpinned."
|
|
27
27
|
end
|
|
28
28
|
end
|
data/lib/fizzy/cli/reactions.rb
CHANGED
data/lib/fizzy/cli/steps.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Fizzy
|
|
|
8
8
|
desc "get STEP_ID", "Show a step"
|
|
9
9
|
option :card, required: true, type: :numeric, desc: "Card number"
|
|
10
10
|
def get(step_id)
|
|
11
|
-
resp = client.get("
|
|
11
|
+
resp = client.get("cards/#{options[:card]}/steps/#{step_id}")
|
|
12
12
|
s = resp.body
|
|
13
13
|
output_detail(s, pairs: [
|
|
14
14
|
["ID", s["id"]],
|
|
@@ -21,7 +21,7 @@ module Fizzy
|
|
|
21
21
|
desc "create DESCRIPTION", "Add a step to a card"
|
|
22
22
|
option :card, required: true, type: :numeric, desc: "Card number"
|
|
23
23
|
def create(description)
|
|
24
|
-
resp = client.post("
|
|
24
|
+
resp = client.post("cards/#{options[:card]}/steps", body: { description: description })
|
|
25
25
|
s = resp.body
|
|
26
26
|
output_detail(s, pairs: [
|
|
27
27
|
["ID", s["id"]],
|
|
@@ -34,7 +34,7 @@ module Fizzy
|
|
|
34
34
|
option :description, desc: "New description"
|
|
35
35
|
option :completed, type: :boolean, desc: "Mark completed"
|
|
36
36
|
def update(step_id)
|
|
37
|
-
path = "
|
|
37
|
+
path = "cards/#{options[:card]}/steps/#{step_id}"
|
|
38
38
|
resp = client.put(path, body: build_body(:description, :completed))
|
|
39
39
|
s = resp.body
|
|
40
40
|
output_detail(s, pairs: [
|
|
@@ -47,7 +47,7 @@ module Fizzy
|
|
|
47
47
|
desc "delete STEP_ID", "Delete a step"
|
|
48
48
|
option :card, required: true, type: :numeric, desc: "Card number"
|
|
49
49
|
def delete(step_id)
|
|
50
|
-
client.delete("
|
|
50
|
+
client.delete("cards/#{options[:card]}/steps/#{step_id}")
|
|
51
51
|
puts "Step #{step_id} deleted."
|
|
52
52
|
end
|
|
53
53
|
end
|
data/lib/fizzy/cli/tags.rb
CHANGED
data/lib/fizzy/cli/users.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Fizzy
|
|
|
7
7
|
|
|
8
8
|
desc "list", "List users"
|
|
9
9
|
def list
|
|
10
|
-
data = paginator.all("
|
|
10
|
+
data = paginator.all("users")
|
|
11
11
|
output_list(data, headers: %w[ID Name Email Role Active]) do |u|
|
|
12
12
|
[u["id"], u["name"], u["email_address"], u["role"], u["active"]]
|
|
13
13
|
end
|
|
@@ -15,7 +15,7 @@ module Fizzy
|
|
|
15
15
|
|
|
16
16
|
desc "get USER_ID", "Show a user"
|
|
17
17
|
def get(user_id)
|
|
18
|
-
resp = client.get("
|
|
18
|
+
resp = client.get("users/#{user_id}")
|
|
19
19
|
u = resp.body
|
|
20
20
|
output_detail(u, pairs: [
|
|
21
21
|
["ID", u["id"]],
|
|
@@ -31,7 +31,7 @@ module Fizzy
|
|
|
31
31
|
option :name, desc: "New name"
|
|
32
32
|
option :role, desc: "New role"
|
|
33
33
|
def update(user_id)
|
|
34
|
-
resp = client.put("
|
|
34
|
+
resp = client.put("users/#{user_id}", body: build_body(:name, :role))
|
|
35
35
|
u = resp.body
|
|
36
36
|
output_detail(u, pairs: [
|
|
37
37
|
["ID", u["id"]],
|
|
@@ -42,7 +42,7 @@ module Fizzy
|
|
|
42
42
|
|
|
43
43
|
desc "deactivate USER_ID", "Deactivate a user"
|
|
44
44
|
def deactivate(user_id)
|
|
45
|
-
client.delete("
|
|
45
|
+
client.delete("users/#{user_id}")
|
|
46
46
|
puts "User #{user_id} deactivated."
|
|
47
47
|
end
|
|
48
48
|
end
|
data/lib/fizzy/client.rb
CHANGED
|
@@ -6,8 +6,6 @@ module Fizzy
|
|
|
6
6
|
class Client
|
|
7
7
|
BASE_URL = "https://app.fizzy.do"
|
|
8
8
|
|
|
9
|
-
attr_reader :account_slug
|
|
10
|
-
|
|
11
9
|
def initialize(token:, account_slug:)
|
|
12
10
|
@token = token
|
|
13
11
|
@account_slug = account_slug
|
|
@@ -49,7 +47,8 @@ module Fizzy
|
|
|
49
47
|
end
|
|
50
48
|
|
|
51
49
|
def request(method, path, body: nil, params: {})
|
|
52
|
-
|
|
50
|
+
full_path = path.start_with?("/") ? path : "/#{@account_slug}/#{path}"
|
|
51
|
+
uri = URI("#{BASE_URL}#{full_path}")
|
|
53
52
|
uri.query = URI.encode_www_form(params) unless params.empty?
|
|
54
53
|
|
|
55
54
|
req = build_request(method, uri)
|
data/lib/fizzy/version.rb
CHANGED