Skip to content

Add support for retrieving a single notification info using his ID #489

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 11 commits into from
Dec 20, 2016
Merged

Add support for retrieving a single notification info using his ID #489

merged 11 commits into from
Dec 20, 2016

Conversation

m1guelpf
Copy link
Contributor

@m1guelpf m1guelpf commented Dec 19, 2016

Fix #488
Add support for retrieving a single notification info using his ID.

public function id($id)
{
if (!is_numeric($id)) {
// Error
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do I do here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's okey if you remove this if statement. If someone uses a string they will get a 404 back.

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.

I like this feature. Good work!

@@ -57,4 +57,19 @@ public function markRead(DateTime $since = null)

$this->put('/notifications', $parameters);
}
/**
* [UNDOCUMENTED] Gets a single notification using his ID
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why "UNDOCUMENTED"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It isn't in this library documentation

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest to remove "[UNDOCUMENTED]" and add some documentation instead =)

*
* @link https://developer.github.com/v3/activity/notifications/#view-a-single-thread
*
* @param ID|integer $id
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be @param int $id

public function id($id)
{
if (!is_numeric($id)) {
// Error
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's okey if you remove this if statement. If someone uses a string they will get a 404 back.

@m1guelpf
Copy link
Contributor Author

@Nyholm Done

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. Good work.

👍

@m1guelpf
Copy link
Contributor Author

@Nyholm Merge?

@Nyholm
Copy link
Collaborator

Nyholm commented Dec 20, 2016

I do not have push permission to this repo. (I would be happy if I was granted that though)

We have to wait until @cursedcoder reviews this. Im sure he will not find any issues.

@cursedcoder
Copy link
Contributor

@Nyholm just sent you an invitation

@Nyholm Nyholm merged commit 893908e into KnpLabs:master Dec 20, 2016
@Nyholm
Copy link
Collaborator

Nyholm commented Dec 20, 2016

Thank you @cursedcoder

And thank you @m1guelpf for the PR.

@m1guelpf m1guelpf deleted the patch-1 branch December 20, 2016 16:02
This was referenced Dec 21, 2016
@m1guelpf m1guelpf mentioned this pull request Jan 11, 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