-
-
Notifications
You must be signed in to change notification settings - Fork 599
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
Changes from 6 commits
f546d50
146316b
d1e6e3d
66f04ec
19661c5
322a53f
ef8794c
e7ca7b9
c648e9f
68d4a42
7288434
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,19 @@ public function markRead(DateTime $since = null) | |
|
||
$this->put('/notifications', $parameters); | ||
} | ||
/** | ||
* [UNDOCUMENTED] Gets a single notification using his ID | ||
* | ||
* @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 commentThe reason will be displayed to describe this comment to others. Learn more. Should be |
||
*/ | ||
public function id($id) | ||
{ | ||
if (!is_numeric($id)) { | ||
// Error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
} | ||
|
||
return $this->get('/notifications/threads/'.$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 =)