Skip to content

Commit

Permalink
feat: NewsfeedUnignoreItem add TrackCode param
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud committed Jun 11, 2020
1 parent 688a254 commit 0b6b611
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/params/newsfeed.go
Expand Up @@ -636,6 +636,12 @@ func (b *NewsfeedUnignoreItemBuilder) ItemID(v int) *NewsfeedUnignoreItemBuilder
return b
}

// TrackCode parameter.
func (b *NewsfeedUnignoreItemBuilder) TrackCode(v string) *NewsfeedUnignoreItemBuilder {
b.Params["track_code"] = v
return b
}

// NewsfeedUnsubscribeBuilder builder.
//
// Unsubscribes the current user from specified newsfeeds.
Expand Down
2 changes: 2 additions & 0 deletions api/params/newsfeed_test.go
Expand Up @@ -237,10 +237,12 @@ func TestNewsfeedUnignoreItemBuilder(t *testing.T) {
b.Type("text")
b.OwnerID(1)
b.ItemID(1)
b.TrackCode("text")

assert.Equal(t, b.Params["type"], "text")
assert.Equal(t, b.Params["owner_id"], 1)
assert.Equal(t, b.Params["item_id"], 1)
assert.Equal(t, b.Params["track_code"], "text")
}

func TestNewsfeedUnsubscribeBuilder(t *testing.T) {
Expand Down

0 comments on commit 0b6b611

Please sign in to comment.