Skip to content

Commit

Permalink
rename archived thread endpoints to match the api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Dec 3, 2022
1 parent 6d6607f commit a42d878
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions rest/rest_endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ var (
GetThreadMember = NewEndpoint(http.MethodGet, "/channels/{channel.id}/thread-members/{user.id}")
GetThreadMembers = NewEndpoint(http.MethodGet, "/channels/{channel.id}/thread-members")

GetArchivedPublicThreads = NewEndpoint(http.MethodGet, "/channels/{channel.id}/threads/archived/public")
GetArchivedPrivateThreads = NewEndpoint(http.MethodGet, "/channels/{channel.id}/threads/archived/private")
GetJoinedArchivedPrivateThreads = NewEndpoint(http.MethodGet, "/channels/{channel.id}/users/@me/threads/archived/private")
GetPublicArchivedThreads = NewEndpoint(http.MethodGet, "/channels/{channel.id}/threads/archived/public")
GetPrivateArchivedThreads = NewEndpoint(http.MethodGet, "/channels/{channel.id}/threads/archived/private")
GetJoinedPrivateArchivedThreads = NewEndpoint(http.MethodGet, "/channels/{channel.id}/users/@me/threads/archived/private")
)

// Messages
Expand Down
6 changes: 3 additions & 3 deletions rest/threads.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (s *threadImpl) GetPublicArchivedThreads(channelID snowflake.ID, before tim
if limit != 0 {
queryValues["limit"] = limit
}
err = s.client.Do(GetArchivedPublicThreads.Compile(queryValues, channelID), nil, &threads, opts...)
err = s.client.Do(GetPublicArchivedThreads.Compile(queryValues, channelID), nil, &threads, opts...)
return
}

Expand All @@ -100,7 +100,7 @@ func (s *threadImpl) GetPrivateArchivedThreads(channelID snowflake.ID, before ti
if limit != 0 {
queryValues["limit"] = limit
}
err = s.client.Do(GetArchivedPrivateThreads.Compile(queryValues, channelID), nil, &threads, opts...)
err = s.client.Do(GetPrivateArchivedThreads.Compile(queryValues, channelID), nil, &threads, opts...)
return
}

Expand All @@ -112,6 +112,6 @@ func (s *threadImpl) GetJoinedPrivateArchivedThreads(channelID snowflake.ID, bef
if limit != 0 {
queryValues["limit"] = limit
}
err = s.client.Do(GetJoinedArchivedPrivateThreads.Compile(queryValues, channelID), nil, &threads, opts...)
err = s.client.Do(GetJoinedPrivateArchivedThreads.Compile(queryValues, channelID), nil, &threads, opts...)
return
}

0 comments on commit a42d878

Please sign in to comment.