Skip to content

Commit

Permalink
Merge pull request #37 from is2ei/fmt
Browse files Browse the repository at this point in the history
Fmt
  • Loading branch information
vvatanabe committed Nov 23, 2018
2 parents 9019bce + 74b365a commit a52b760
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion typetalk/v1/likes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package v1

import (
"context"
"time"
. "github.com/nulab/go-typetalk/typetalk/internal"
. "github.com/nulab/go-typetalk/typetalk/shared"
"time"
)

type LikesService service
Expand Down
2 changes: 1 addition & 1 deletion typetalk/v2/likes.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ type MyLike struct {
}

type GetLikesOptions struct {
From int `json:"from,omitempty"`
From int `json:"from,omitempty"`
}

type getLikesOptions struct {
Expand Down
4 changes: 2 additions & 2 deletions typetalk/v2/likes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func Test_LikesService_GetLikesReceive_should_get_Likes(t *testing.T) {
fmt.Fprint(w, string(b))
})

result, _, err := client.Likes.GetLikesReceive(context.Background(), "qwerty", &GetLikesOptions{ 1})
result, _, err := client.Likes.GetLikesReceive(context.Background(), "qwerty", &GetLikesOptions{1})
if err != nil {
t.Errorf("Returned error: %v", err)
}
Expand Down Expand Up @@ -102,7 +102,7 @@ func Test_LikesService_ReadReceivedLikes_should_get_Likes(t *testing.T) {
TestMethod(t, r, "POST")
TestFormValues(t, r, Values{
"spaceKey": "qwerty",
"likeId": 1,
"likeId": 1,
})
fmt.Fprint(w, string(b))
})
Expand Down
6 changes: 3 additions & 3 deletions typetalk/v2/mentions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ type Mention struct {
}

type GetMentionListOptions struct {
From int `json:"from,omitempty"`
Unread bool `json:"unread,omitempty"`
From int `json:"from,omitempty"`
Unread bool `json:"unread,omitempty"`
}

type getMentionListOptions struct {
Expand All @@ -27,7 +27,7 @@ type getMentionListOptions struct {
}

// Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/get-mentions
func (s *MentionsService) GetMentionList(ctx context.Context, spaceKey string ,opt *GetMentionListOptions) ([]*Mention, *shared.Response, error) {
func (s *MentionsService) GetMentionList(ctx context.Context, spaceKey string, opt *GetMentionListOptions) ([]*Mention, *shared.Response, error) {
u, err := internal.AddQueries("mentions", &getMentionListOptions{opt, spaceKey})
if err != nil {
return nil, nil, err
Expand Down
4 changes: 2 additions & 2 deletions typetalk/v2/mentions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ func Test_MentionsService_GetMentionList_should_get_some_mentions(t *testing.T)
TestMethod(t, r, "GET")
TestQueryValues(t, r, Values{
"spaceKey": "qwerty",
"from": 10,
"unread": true,
"from": 10,
"unread": true,
})
fmt.Fprint(w, string(b))
})
Expand Down
8 changes: 4 additions & 4 deletions typetalk/v2/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ type service struct {
type Client struct {
client *internal.ClientCore

Topics *TopicsService
Likes *LikesService
Mentions *MentionsService
Topics *TopicsService
Likes *LikesService
Mentions *MentionsService
Notifications *NotificationsService
Messages *MessagesService
Messages *MessagesService
}

func (c *Client) SetTypetalkToken(token string) *Client {
Expand Down
2 changes: 1 addition & 1 deletion typetalk/v2/v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ func setup() {

func teardown() {
server.Close()
}
}

0 comments on commit a52b760

Please sign in to comment.