Skip to content

Add params to collaborators api calls #623

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

Merged
merged 2 commits into from
Aug 10, 2017
Merged

Add params to collaborators api calls #623

merged 2 commits into from
Aug 10, 2017

Conversation

convenient
Copy link
Contributor

https://developer.github.com/v3/repos/collaborators/#list-collaborators
GET /repos/:owner/:repo/collaborators
Params = affiliation

https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator
PUT /repos/:owner/:repo/collaborators/:username
Params = permission

https://developer.github.com/v3/repos/collaborators/#list-collaborators
`GET /repos/:owner/:repo/collaborators`
Params = `affiliation`

https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator
`PUT /repos/:owner/:repo/collaborators/:username`
Params = `permission`
Copy link
Collaborator

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Thanks!

Could you please add those links in the function doc blocks?

@convenient
Copy link
Contributor Author

@Nyholm Just to confirm what you're wanting as there are currently no phpdoc function blocks.

+   /**
+    * @link https://developer.github.com/v3/repos/collaborators/#list-collaborators
+    *
+    * @param $username
+    * @param $repository
+    * @param array $params
+    * @return array|string
+    */
    public function all($username, $repository, array $params = [])
    {
        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/collaborators', $params);
    }

Do you want me to add sections like that, or just the @link, or something else?

@Nyholm
Copy link
Collaborator

Nyholm commented Aug 10, 2017

A block like that with the link will be perfect.

@convenient
Copy link
Contributor Author

@Nyholm I added phpdoc to all functions within the class as it looked rather weird having only two of the functions doc'd.

@Nyholm
Copy link
Collaborator

Nyholm commented Aug 10, 2017

Awesome. Thanks!

@Nyholm Nyholm merged commit 22319ee into KnpLabs:master Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants