added pagination options for listing requests #203

Manually merged
sauravhaloi merged 1 commits from spawn2kill/go-sdk:master into master 2019-12-30 15:16:39 +00:00
Contributor

Like discussed on #202, all ListXXXXX requests now supports pagination.

ListXXXXXOptions structs which includes ListOptions struct have been added to all methods. By default it gets the first page with 10 results.

Gitea's API needs to be changed in order to support pagination in all requests.

Like discussed on [#202](https://gitea.com/gitea/go-sdk/pulls/202), all `ListXXXXX` requests now supports pagination. `ListXXXXXOptions` structs which includes `ListOptions` struct have been added to all methods. By default it gets the first page with 10 results. Gitea's API needs to be changed in order to support pagination in all requests.
lunny reviewed 2019-12-20 13:50:11 +00:00
Dismissed
@ -12,2 +12,4 @@
)
// AdminListOrgsOptions options for listing admin's organizations
type AdminListOrgsOptions struct {
Owner

What's the difference between AdminListOrgsOptions and ListOrgsOptions?

What's the difference between `AdminListOrgsOptions` and `ListOrgsOptions`?
Author
Contributor

I'm not sure what you are talking about... there isn't any struct called ListOrgsOptions. I just created an options struct for each request that lists something. About the AdminListOrgsOptions naming it's because it is sub route from /admin: https://try.gitea.io/api/swagger#/admin/adminGetAllOrgs

I'm not sure what you are talking about... there isn't any struct called `ListOrgsOptions`. I just created an options struct for each request that lists something. About the **Admin**ListOrgsOptions naming it's because it is sub route from `/admin`: https://try.gitea.io/api/swagger#/admin/adminGetAllOrgs
lunny added the
kind/breaking
label 2019-12-20 13:50:53 +00:00
Owner

Good. But this is a break change. We may need to name it a v2 version.

Good. But this is a break change. We may need to name it a v2 version.
Owner

We can release a v0.1.0 and this PR will be in v0.2.x

We can release a v0.1.0 and this PR will be in v0.2.x
Author
Contributor

go-gitea/gitea#9452 adds support on Gitea's API to pagination in most of the requests.

[go-gitea/gitea#9452](https://github.com/go-gitea/gitea/pull/9452) adds support on Gitea's API to pagination in most of the requests.
sauravhaloi closed this pull request 2019-12-30 15:16:39 +00:00
Sign in to join this conversation.
No description provided.