fizzy-cli 0.4.0 → 0.6.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 (49) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/cmd/board_create.go +15 -16
  3. package/cmd/board_create_test.go +0 -17
  4. package/cmd/card_create.go +24 -25
  5. package/cmd/card_create_test.go +20 -40
  6. package/cmd/card_update.go +30 -21
  7. package/cmd/card_update_test.go +28 -24
  8. package/cmd/column_create.go +11 -12
  9. package/cmd/column_create_test.go +3 -21
  10. package/cmd/comment.go +14 -0
  11. package/cmd/comment_create.go +51 -0
  12. package/cmd/comment_create_test.go +129 -0
  13. package/cmd/comment_delete.go +46 -0
  14. package/cmd/comment_delete_test.go +92 -0
  15. package/cmd/comment_list.go +51 -0
  16. package/cmd/comment_list_test.go +132 -0
  17. package/cmd/comment_show.go +46 -0
  18. package/cmd/comment_show_test.go +104 -0
  19. package/cmd/comment_update.go +51 -0
  20. package/cmd/comment_update_test.go +130 -0
  21. package/cmd/reaction.go +13 -0
  22. package/cmd/reaction_create.go +46 -0
  23. package/cmd/reaction_create_test.go +113 -0
  24. package/cmd/reaction_delete.go +46 -0
  25. package/cmd/reaction_delete_test.go +92 -0
  26. package/cmd/reaction_list.go +51 -0
  27. package/cmd/reaction_list_test.go +125 -0
  28. package/cmd/step.go +14 -0
  29. package/cmd/step_create.go +53 -0
  30. package/cmd/step_create_test.go +171 -0
  31. package/cmd/step_delete.go +46 -0
  32. package/cmd/step_delete_test.go +92 -0
  33. package/cmd/step_update.go +66 -0
  34. package/cmd/step_update_test.go +190 -0
  35. package/internal/api/boards.go +59 -0
  36. package/internal/api/cards.go +288 -0
  37. package/internal/api/client.go +5 -644
  38. package/internal/api/columns.go +50 -0
  39. package/internal/api/comments.go +99 -0
  40. package/internal/api/identity.go +24 -0
  41. package/internal/api/notifications.go +89 -0
  42. package/internal/api/reactions.go +61 -0
  43. package/internal/api/steps.go +93 -0
  44. package/internal/api/tags.go +24 -0
  45. package/internal/api/types.go +178 -0
  46. package/internal/ui/comment_list.go +25 -0
  47. package/internal/ui/reaction_list.go +14 -0
  48. package/package.json +1 -1
  49. package/IMPLEMENTATION_PLAN.md +0 -338
@@ -0,0 +1,99 @@
1
+ package api
2
+
3
+ import (
4
+ "context"
5
+ "fmt"
6
+ "net/http"
7
+ )
8
+
9
+ func (c *Client) GetCardComments(ctx context.Context, cardNumber int) ([]Comment, error) {
10
+ endpointURL := fmt.Sprintf("%s/cards/%d/comments", c.AccountBaseURL, cardNumber)
11
+
12
+ req, err := c.newRequest(ctx, http.MethodGet, endpointURL, nil)
13
+ if err != nil {
14
+ return nil, fmt.Errorf("failed to create get card comments request: %w", err)
15
+ }
16
+
17
+ var response []Comment
18
+ _, err = c.decodeResponse(req, &response)
19
+ if err != nil {
20
+ return nil, err
21
+ }
22
+
23
+ return response, nil
24
+ }
25
+
26
+ func (c *Client) GetCardComment(ctx context.Context, cardNumber int, commentID string) (*Comment, error) {
27
+ endpointURL := fmt.Sprintf("%s/cards/%d/comments/%s", c.AccountBaseURL, cardNumber, commentID)
28
+
29
+ req, err := c.newRequest(ctx, http.MethodGet, endpointURL, nil)
30
+ if err != nil {
31
+ return nil, fmt.Errorf("failed to create get card comment request: %w", err)
32
+ }
33
+
34
+ var response Comment
35
+ _, err = c.decodeResponse(req, &response)
36
+ if err != nil {
37
+ return nil, err
38
+ }
39
+
40
+ return &response, nil
41
+ }
42
+
43
+ func (c *Client) PostCardComment(ctx context.Context, cardNumber int, body string) (*Comment, error) {
44
+ endpointURL := fmt.Sprintf("%s/cards/%d/comments", c.AccountBaseURL, cardNumber)
45
+
46
+ payload := map[string]map[string]string{
47
+ "comment": {"body": body},
48
+ }
49
+
50
+ req, err := c.newRequest(ctx, http.MethodPost, endpointURL, payload)
51
+ if err != nil {
52
+ return nil, fmt.Errorf("failed to create post card comment request: %w", err)
53
+ }
54
+
55
+ var response Comment
56
+ _, err = c.decodeResponse(req, &response, http.StatusCreated)
57
+ if err != nil {
58
+ return nil, err
59
+ }
60
+
61
+ return &response, nil
62
+ }
63
+
64
+ func (c *Client) PutCardComment(ctx context.Context, cardNumber int, commentID string, body string) (*Comment, error) {
65
+ endpointURL := fmt.Sprintf("%s/cards/%d/comments/%s", c.AccountBaseURL, cardNumber, commentID)
66
+
67
+ payload := map[string]map[string]string{
68
+ "comment": {"body": body},
69
+ }
70
+
71
+ req, err := c.newRequest(ctx, http.MethodPut, endpointURL, payload)
72
+ if err != nil {
73
+ return nil, fmt.Errorf("failed to create put card comment request: %w", err)
74
+ }
75
+
76
+ var response Comment
77
+ _, err = c.decodeResponse(req, &response)
78
+ if err != nil {
79
+ return nil, err
80
+ }
81
+
82
+ return &response, nil
83
+ }
84
+
85
+ func (c *Client) DeleteCardComment(ctx context.Context, cardNumber int, commentID string) (bool, error) {
86
+ endpointURL := fmt.Sprintf("%s/cards/%d/comments/%s", c.AccountBaseURL, cardNumber, commentID)
87
+
88
+ req, err := c.newRequest(ctx, http.MethodDelete, endpointURL, nil)
89
+ if err != nil {
90
+ return false, fmt.Errorf("failed to create delete card comment request: %w", err)
91
+ }
92
+
93
+ _, err = c.decodeResponse(req, nil, http.StatusNoContent)
94
+ if err != nil {
95
+ return false, err
96
+ }
97
+
98
+ return true, nil
99
+ }
@@ -0,0 +1,24 @@
1
+ package api
2
+
3
+ import (
4
+ "context"
5
+ "fmt"
6
+ "net/http"
7
+ )
8
+
9
+ func (c *Client) GetMyIdentity(ctx context.Context) (*GetMyIdentityResponse, error) {
10
+ endpointURL := c.BaseURL + "/my/identity"
11
+
12
+ req, err := c.newRequest(ctx, http.MethodGet, endpointURL, nil)
13
+ if err != nil {
14
+ return nil, fmt.Errorf("failed to create request: %w", err)
15
+ }
16
+
17
+ var response GetMyIdentityResponse
18
+ _, err = c.decodeResponse(req, &response)
19
+ if err != nil {
20
+ return nil, err
21
+ }
22
+
23
+ return &response, nil
24
+ }
@@ -0,0 +1,89 @@
1
+ package api
2
+
3
+ import (
4
+ "context"
5
+ "fmt"
6
+ "net/http"
7
+ )
8
+
9
+ func (c *Client) GetNotifications(ctx context.Context) ([]Notification, error) {
10
+ endpointURL := c.AccountBaseURL + "/notifications"
11
+
12
+ req, err := c.newRequest(ctx, http.MethodGet, endpointURL, nil)
13
+ if err != nil {
14
+ return nil, fmt.Errorf("failed to create get notifications request: %w", err)
15
+ }
16
+
17
+ var response []Notification
18
+ _, err = c.decodeResponse(req, &response)
19
+ if err != nil {
20
+ return nil, err
21
+ }
22
+
23
+ return response, nil
24
+ }
25
+
26
+ func (c *Client) GetNotification(ctx context.Context, notificationID string) (*Notification, error) {
27
+ endpointURL := fmt.Sprintf("%s/notifications/%s", c.AccountBaseURL, notificationID)
28
+
29
+ req, err := c.newRequest(ctx, http.MethodGet, endpointURL, nil)
30
+ if err != nil {
31
+ return nil, fmt.Errorf("failed to create get notification request: %w", err)
32
+ }
33
+
34
+ var response Notification
35
+ _, err = c.decodeResponse(req, &response)
36
+ if err != nil {
37
+ return nil, err
38
+ }
39
+
40
+ return &response, nil
41
+ }
42
+
43
+ func (c *Client) PostNotificationReading(ctx context.Context, notificationID string) (bool, error) {
44
+ endpointURL := fmt.Sprintf("%s/notifications/%s/reading", c.AccountBaseURL, notificationID)
45
+
46
+ req, err := c.newRequest(ctx, http.MethodPost, endpointURL, nil)
47
+ if err != nil {
48
+ return false, fmt.Errorf("failed to create mark notification as read request: %w", err)
49
+ }
50
+
51
+ _, err = c.decodeResponse(req, nil, http.StatusNoContent)
52
+ if err != nil {
53
+ return false, err
54
+ }
55
+
56
+ return true, nil
57
+ }
58
+
59
+ func (c *Client) DeleteNotificationReading(ctx context.Context, notificationID string) (bool, error) {
60
+ endpointURL := fmt.Sprintf("%s/notifications/%s/reading", c.AccountBaseURL, notificationID)
61
+
62
+ req, err := c.newRequest(ctx, http.MethodDelete, endpointURL, nil)
63
+ if err != nil {
64
+ return false, fmt.Errorf("failed to create delete notification request: %w", err)
65
+ }
66
+
67
+ _, err = c.decodeResponse(req, nil, http.StatusNoContent)
68
+ if err != nil {
69
+ return false, err
70
+ }
71
+
72
+ return true, nil
73
+ }
74
+
75
+ func (c *Client) PostBulkNotificationsReading(ctx context.Context) (bool, error) {
76
+ endpointURL := c.AccountBaseURL + "/notifications/bulk_reading"
77
+
78
+ req, err := c.newRequest(ctx, http.MethodPost, endpointURL, nil)
79
+ if err != nil {
80
+ return false, fmt.Errorf("failed to create bulk notifications reading request: %w", err)
81
+ }
82
+
83
+ _, err = c.decodeResponse(req, nil, http.StatusNoContent)
84
+ if err != nil {
85
+ return false, err
86
+ }
87
+
88
+ return true, nil
89
+ }
@@ -0,0 +1,61 @@
1
+ package api
2
+
3
+ import (
4
+ "context"
5
+ "fmt"
6
+ "net/http"
7
+ )
8
+
9
+ func (c *Client) GetCommentReactions(ctx context.Context, cardNumber int, commentID string) ([]Reaction, error) {
10
+ endpointURL := fmt.Sprintf("%s/cards/%d/comments/%s/reactions", c.AccountBaseURL, cardNumber, commentID)
11
+
12
+ req, err := c.newRequest(ctx, http.MethodGet, endpointURL, nil)
13
+ if err != nil {
14
+ return nil, fmt.Errorf("failed to create get comment reactions request: %w", err)
15
+ }
16
+
17
+ var response []Reaction
18
+ _, err = c.decodeResponse(req, &response)
19
+ if err != nil {
20
+ return nil, err
21
+ }
22
+
23
+ return response, nil
24
+ }
25
+
26
+ func (c *Client) PostCommentReaction(ctx context.Context, cardNumber int, commentID string, content string) (*Reaction, error) {
27
+ endpointURL := fmt.Sprintf("%s/cards/%d/comments/%s/reactions", c.AccountBaseURL, cardNumber, commentID)
28
+
29
+ payload := map[string]map[string]string{
30
+ "reaction": {"content": content},
31
+ }
32
+
33
+ req, err := c.newRequest(ctx, http.MethodPost, endpointURL, payload)
34
+ if err != nil {
35
+ return nil, fmt.Errorf("failed to create post comment reaction request: %w", err)
36
+ }
37
+
38
+ var response Reaction
39
+ _, err = c.decodeResponse(req, &response, http.StatusCreated)
40
+ if err != nil {
41
+ return nil, err
42
+ }
43
+
44
+ return &response, nil
45
+ }
46
+
47
+ func (c *Client) DeleteCommentReaction(ctx context.Context, cardNumber int, commentID string, reactionID string) (bool, error) {
48
+ endpointURL := fmt.Sprintf("%s/cards/%d/comments/%s/reactions/%s", c.AccountBaseURL, cardNumber, commentID, reactionID)
49
+
50
+ req, err := c.newRequest(ctx, http.MethodDelete, endpointURL, nil)
51
+ if err != nil {
52
+ return false, fmt.Errorf("failed to create delete comment reaction request: %w", err)
53
+ }
54
+
55
+ _, err = c.decodeResponse(req, nil, http.StatusNoContent)
56
+ if err != nil {
57
+ return false, err
58
+ }
59
+
60
+ return true, nil
61
+ }
@@ -0,0 +1,93 @@
1
+ package api
2
+
3
+ import (
4
+ "context"
5
+ "fmt"
6
+ "net/http"
7
+ )
8
+
9
+ func (c *Client) GetCardStep(ctx context.Context, cardNumber int, stepID string) (*Step, error) {
10
+ endpointURL := fmt.Sprintf("%s/cards/%d/steps/%s", c.AccountBaseURL, cardNumber, stepID)
11
+
12
+ req, err := c.newRequest(ctx, http.MethodGet, endpointURL, nil)
13
+ if err != nil {
14
+ return nil, fmt.Errorf("failed to create get card step request: %w", err)
15
+ }
16
+
17
+ var response Step
18
+ _, err = c.decodeResponse(req, &response)
19
+ if err != nil {
20
+ return nil, err
21
+ }
22
+
23
+ return &response, nil
24
+ }
25
+
26
+ func (c *Client) PostCardStep(ctx context.Context, cardNumber int, content string, completed bool) (*Step, error) {
27
+ endpointURL := fmt.Sprintf("%s/cards/%d/steps", c.AccountBaseURL, cardNumber)
28
+
29
+ payload := map[string]map[string]any{
30
+ "step": {
31
+ "content": content,
32
+ "completed": completed,
33
+ },
34
+ }
35
+
36
+ req, err := c.newRequest(ctx, http.MethodPost, endpointURL, payload)
37
+ if err != nil {
38
+ return nil, fmt.Errorf("failed to create post card step request: %w", err)
39
+ }
40
+
41
+ var response Step
42
+ _, err = c.decodeResponse(req, &response, http.StatusCreated)
43
+ if err != nil {
44
+ return nil, err
45
+ }
46
+
47
+ return &response, nil
48
+ }
49
+
50
+ func (c *Client) PutCardStep(ctx context.Context, cardNumber int, stepID string, content *string, completed *bool) (*Step, error) {
51
+ endpointURL := fmt.Sprintf("%s/cards/%d/steps/%s", c.AccountBaseURL, cardNumber, stepID)
52
+
53
+ stepPayload := make(map[string]any)
54
+ if content != nil {
55
+ stepPayload["content"] = *content
56
+ }
57
+ if completed != nil {
58
+ stepPayload["completed"] = *completed
59
+ }
60
+
61
+ payload := map[string]map[string]any{
62
+ "step": stepPayload,
63
+ }
64
+
65
+ req, err := c.newRequest(ctx, http.MethodPut, endpointURL, payload)
66
+ if err != nil {
67
+ return nil, fmt.Errorf("failed to create put card step request: %w", err)
68
+ }
69
+
70
+ var response Step
71
+ _, err = c.decodeResponse(req, &response)
72
+ if err != nil {
73
+ return nil, err
74
+ }
75
+
76
+ return &response, nil
77
+ }
78
+
79
+ func (c *Client) DeleteCardStep(ctx context.Context, cardNumber int, stepID string) (bool, error) {
80
+ endpointURL := fmt.Sprintf("%s/cards/%d/steps/%s", c.AccountBaseURL, cardNumber, stepID)
81
+
82
+ req, err := c.newRequest(ctx, http.MethodDelete, endpointURL, nil)
83
+ if err != nil {
84
+ return false, fmt.Errorf("failed to create delete card step request: %w", err)
85
+ }
86
+
87
+ _, err = c.decodeResponse(req, nil, http.StatusNoContent)
88
+ if err != nil {
89
+ return false, err
90
+ }
91
+
92
+ return true, nil
93
+ }
@@ -0,0 +1,24 @@
1
+ package api
2
+
3
+ import (
4
+ "context"
5
+ "fmt"
6
+ "net/http"
7
+ )
8
+
9
+ func (c *Client) GetTags(ctx context.Context) ([]Tag, error) {
10
+ endpointURL := c.AccountBaseURL + "/tags"
11
+
12
+ req, err := c.newRequest(ctx, http.MethodGet, endpointURL, nil)
13
+ if err != nil {
14
+ return nil, fmt.Errorf("failed to create get tags request: %w", err)
15
+ }
16
+
17
+ var response []Tag
18
+ _, err = c.decodeResponse(req, &response)
19
+ if err != nil {
20
+ return nil, err
21
+ }
22
+
23
+ return response, nil
24
+ }
@@ -0,0 +1,178 @@
1
+ package api
2
+
3
+ import "github.com/rogeriopvl/fizzy/internal/colors"
4
+
5
+ type Board struct {
6
+ ID string `json:"id"`
7
+ Name string `json:"name"`
8
+ AllAccess bool `json:"all_access"`
9
+ CreatedAt string `json:"created_at"`
10
+ URL string `json:"url"`
11
+ Creator User `json:"creator"`
12
+ }
13
+
14
+ type CreateBoardPayload struct {
15
+ Name string `json:"name"`
16
+ AllAccess bool `json:"all_access"`
17
+ AutoPostponePeriod int `json:"auto_postpone_period"`
18
+ PublicDescription string `json:"public_description"`
19
+ }
20
+
21
+ type Column struct {
22
+ ID string `json:"id"`
23
+ Name string `json:"name"`
24
+ Color ColorObject `json:"color"`
25
+ CreatedAt string `json:"created_at"`
26
+ }
27
+
28
+ type ColorObject struct {
29
+ Name string `json:"name"`
30
+ Value Color `json:"value"`
31
+ }
32
+
33
+ type CreateColumnPayload struct {
34
+ Name string `json:"name"`
35
+ Color *Color `json:"color,omitempty"`
36
+ }
37
+
38
+ type Card struct {
39
+ ID string `json:"id"`
40
+ Number int `json:"number"`
41
+ Title string `json:"title"`
42
+ Status string `json:"status"`
43
+ Description string `json:"description"`
44
+ DescriptionHTML string `json:"description_html"`
45
+ ImageURL string `json:"image_url"`
46
+ Tags []string `json:"tags"`
47
+ Golden bool `json:"golden"`
48
+ LastActiveAt string `json:"last_active_at"`
49
+ CreatedAt string `json:"created_at"`
50
+ URL string `json:"url"`
51
+ Board Board `json:"board"`
52
+ Creator User `json:"creator"`
53
+ CommentsURL string `json:"comments_url"`
54
+ }
55
+
56
+ type CardFilters struct {
57
+ BoardIDs []string
58
+ TagIDs []string
59
+ AssigneeIDs []string
60
+ CreatorIDs []string
61
+ CloserIDs []string
62
+ CardIDs []string
63
+ IndexedBy string
64
+ SortedBy string
65
+ AssignmentStatus string
66
+ CreationStatus string
67
+ ClosureStatus string
68
+ Terms []string
69
+ }
70
+
71
+ type CreateCardPayload struct {
72
+ Title string `json:"title"`
73
+ Description string `json:"description,omitempty"`
74
+ Status string `json:"status,omitempty"`
75
+ ImageURL string `json:"image_url,omitempty"`
76
+ TagIDS []string `json:"tag_ids,omitempty"`
77
+ CreatedAt string `json:"created_at,omitempty"`
78
+ LastActiveAt string `json:"last_active_at,omitempty"`
79
+ }
80
+
81
+ // UpdateCardPayload image not included because we don't support files yet
82
+ type UpdateCardPayload struct {
83
+ Title string `json:"title,omitempty"`
84
+ Description string `json:"description,omitempty"`
85
+ Status string `json:"status,omitempty"`
86
+ TagIDS []string `json:"tag_ids,omitempty"`
87
+ LastActiveAt string `json:"last_active_at,omitempty"`
88
+ }
89
+
90
+ type GetMyIdentityResponse struct {
91
+ Accounts []Account `json:"accounts"`
92
+ }
93
+
94
+ type Account struct {
95
+ ID string `json:"id"`
96
+ Name string `json:"name"`
97
+ User User `json:"user"`
98
+ Slug string `json:"slug"`
99
+ CreatedAt string `json:"created_at"`
100
+ }
101
+
102
+ type User struct {
103
+ ID string `json:"id"`
104
+ Email string `json:"email_address"`
105
+ Role string `json:"role"`
106
+ Active bool `json:"active"`
107
+ Name string `json:"name"`
108
+ CreatedAt string `json:"created_at"`
109
+ URL string `json:"url"`
110
+ }
111
+
112
+ type Notification struct {
113
+ ID string `json:"id"`
114
+ Read bool `json:"read"`
115
+ ReadAt string `json:"read_at"`
116
+ CreatedAt string `json:"created_at"`
117
+ Title string `json:"title"`
118
+ Body string `json:"body"`
119
+ Creator User `json:"creator"`
120
+ Card CardReference `json:"card"`
121
+ URL string `json:"url"`
122
+ }
123
+
124
+ type CardReference struct {
125
+ ID string `json:"id"`
126
+ Title string `json:"title"`
127
+ Status string `json:"status"`
128
+ URL string `json:"url"`
129
+ }
130
+
131
+ type Tag struct {
132
+ ID string `json:"id"`
133
+ Title string `json:"title"`
134
+ CreatedAt string `json:"created_at"`
135
+ URL string `json:"url"`
136
+ }
137
+
138
+ type Comment struct {
139
+ ID string `json:"id"`
140
+ CreatedAt string `json:"created_at"`
141
+ UpdatedAt string `json:"updated_at"`
142
+ Body struct {
143
+ PlainText string `json:"plain_text"`
144
+ HTML string `json:"html"`
145
+ } `json:"body"`
146
+ Creator User `json:"creator"`
147
+ Card CardReference `json:"card"`
148
+ ReactionsURL string `json:"reactions_url"`
149
+ URL string `json:"url"`
150
+ }
151
+
152
+ type Reaction struct {
153
+ ID string `json:"id"`
154
+ Content string `json:"content"`
155
+ Reacter User `json:"reacter"`
156
+ URL string `json:"url"`
157
+ }
158
+
159
+ type Step struct {
160
+ ID string `json:"id"`
161
+ Content string `json:"content"`
162
+ Completed bool `json:"completed"`
163
+ }
164
+
165
+ type Color string
166
+
167
+ // Color constants using centralized definitions
168
+ var (
169
+ Blue Color = Color(colors.Blue.CSSValue)
170
+ Gray Color = Color(colors.Gray.CSSValue)
171
+ Tan Color = Color(colors.Tan.CSSValue)
172
+ Yellow Color = Color(colors.Yellow.CSSValue)
173
+ Lime Color = Color(colors.Lime.CSSValue)
174
+ Aqua Color = Color(colors.Aqua.CSSValue)
175
+ Violet Color = Color(colors.Violet.CSSValue)
176
+ Purple Color = Color(colors.Purple.CSSValue)
177
+ Pink Color = Color(colors.Pink.CSSValue)
178
+ )
@@ -0,0 +1,25 @@
1
+ package ui
2
+
3
+ import (
4
+ "fmt"
5
+
6
+ "github.com/rogeriopvl/fizzy/internal/api"
7
+ )
8
+
9
+ func DisplayComments(comments []api.Comment) error {
10
+ for _, comment := range comments {
11
+ fmt.Printf("%s - %s (%s)\n", comment.Creator.Name, comment.Body.PlainText, DisplayID(comment.ID))
12
+ }
13
+ return nil
14
+ }
15
+
16
+ func DisplayComment(comment *api.Comment) error {
17
+ fmt.Printf("Author: %s\n", comment.Creator.Name)
18
+ fmt.Printf("Created: %s\n", comment.CreatedAt)
19
+ if comment.UpdatedAt != comment.CreatedAt {
20
+ fmt.Printf("Updated: %s\n", comment.UpdatedAt)
21
+ }
22
+ fmt.Printf("Card: %s\n", comment.Card.Title)
23
+ fmt.Printf("\n%s\n", comment.Body.PlainText)
24
+ return nil
25
+ }
@@ -0,0 +1,14 @@
1
+ package ui
2
+
3
+ import (
4
+ "fmt"
5
+
6
+ "github.com/rogeriopvl/fizzy/internal/api"
7
+ )
8
+
9
+ func DisplayReactions(reactions []api.Reaction) error {
10
+ for _, reaction := range reactions {
11
+ fmt.Printf("%s %s (%s)\n", reaction.Content, reaction.Reacter.Name, DisplayID(reaction.ID))
12
+ }
13
+ return nil
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fizzy-cli",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "CLI for https://fizzy.do",
5
5
  "main": "bin/fizzy",
6
6
  "type": "module",