-
-
Notifications
You must be signed in to change notification settings - Fork 598
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
Conversation
public function id($id) | ||
{ | ||
if (!is_numeric($id)) { | ||
// Error |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why "UNDOCUMENTED"?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
@Nyholm Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Good work.
👍
@Nyholm Merge? |
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. |
@Nyholm just sent you an invitation |
Thank you @cursedcoder And thank you @m1guelpf for the PR. |
Fix #488
Add support for retrieving a single notification info using his ID.