Skip to content

Added Pagination whene listing resources #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Added Pagination whene listing resources #1

wants to merge 2 commits into from

Conversation

Zeichen32
Copy link

Gitlab has the ability to use a pagination when listing resources.

@Zeichen32
Copy link
Author

I think this is not necessary because the single entry will not be modify.

See:
https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/README.md

@m4tthumphrey
Copy link
Contributor

I mean for methods such as this: https://github.com/m4tthumphrey/php-gitlab-api/blob/master/lib/Gitlab/Model/Project.php#L203

Could you change them all to match your changes. In this case:

public function issues($page = 1, $per_page = 10)
{
    $data = $this->api('issues')->all($this->id, $page, $per_page);

    $issues = array();
    foreach ($data as $issue) {
        $issues[] = Issue::fromArray($this, $issue);
    }

    return $issues;
}

etc...

@thomasvargiu
Copy link
Contributor

I'm waiting for this pull request 👍

@m4tthumphrey
Copy link
Contributor

I'm not going to merge this as for some reason, it will not merge automatically. I will make these changes myself today.

@thomasvargiu
Copy link
Contributor

Thank you! :)

@m4tthumphrey
Copy link
Contributor

Fixed in 4f3b94e

@Zeichen32 Zeichen32 deleted the Pagination branch August 15, 2013 18:53
fbourigault pushed a commit that referenced this pull request Sep 19, 2017
m1guelpf pushed a commit that referenced this pull request Jun 15, 2018
m1guelpf pushed a commit that referenced this pull request Sep 25, 2018
m1guelpf pushed a commit that referenced this pull request Jan 28, 2019
Added support for the path parameter to the commits endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants