Skip to content
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

Support notifications api #913

Closed
GUIpsp opened this issue Sep 6, 2014 · 29 comments
Closed

Support notifications api #913

GUIpsp opened this issue Sep 6, 2014 · 29 comments

Comments

@GUIpsp
Copy link

GUIpsp commented Sep 6, 2014


- ~~`913-dc43cb7f`/#920~~ - `920-82c5cb6b`/#952 (by Piotr Prądzyński) - `913-3f99f964`/#1045 (by ) - `913-32975020`/#1046 (by ) - `913-504d1bd2`/#1044 (by ) - `913-9c17e827`/#1041 (by ) - `913-743027ac`/#1043 (by )
@yegor256
Copy link
Member

yegor256 commented Sep 6, 2014

That's indeed a good suggestion, thanks

@GUIpsp
Copy link
Author

GUIpsp commented Sep 6, 2014

Yeah, I couldn't find a single java wrapper that had the notifications API

@yegor256
Copy link
Member

yegor256 commented Sep 6, 2014

We'll implement it soon. In the mean time, you can see how rultor is using jcabi-github and notification API: https://github.com/yegor256/rultor/blob/master/src/main/java/com/rultor/agents/github/StartsTalks.java#L85-L121

@dmarkov
Copy link

dmarkov commented Sep 7, 2014

I'll find a developer for the task soon...

@dmarkov
Copy link

dmarkov commented Sep 12, 2014

@lthuangiang it's in your hands now, please proceed

lthuangiang added a commit to lthuangiang/jcabi-github that referenced this issue Sep 18, 2014
@lthuangiang
Copy link
Contributor

@GUIpsp PR was merged. Please help close this issue. Thanks

@GUIpsp
Copy link
Author

GUIpsp commented Sep 19, 2014

Erm... Shouldn't atleast a single API method be implemented before closing this?

@lthuangiang
Copy link
Contributor

@GUIpsp We're following Puzzle Driven Development (PDD) method which is a method used to break down this issue into smaller ones and enable implementation in parallel. After you close this issue, we will open new issues (see puzzle at https://github.com/jcabi/jcabi-github/blob/master/src/main/java/com/jcabi/github/Notifications.java#L41) and work on them.

@yegor256
Copy link
Member

@lthuangiang I think tat @GUIpsp is right. At least some functionality should be implemented in order to close this issue

@lthuangiang
Copy link
Contributor

@yegor256 Will we wait for @todo #913 implemented before closing this issue? or I will implement it too?

@yegor256
Copy link
Member

I think you should add some working functionality in this ticket, and we close it. Even in PDD, something should be implemented in order to call the task done. You may leave certain open ends, but a core feature should work.

@dmarkov
Copy link

dmarkov commented Nov 9, 2014

puzzles in progress: 913-dc43cb7f/#920

@dmarkov
Copy link

dmarkov commented Dec 26, 2014

@lthuangiang the task is overdue, and I have to re-assign it to someone else. Please, stop working with it immediately. In general, we're against overdue tasks, check this page

@dmarkov
Copy link

dmarkov commented Dec 30, 2014

@nathansgreen please go ahead with this task, it's yours

@nathansgreen
Copy link

@dmarkov I'm not seeing my login as a label on this issue. I totally missed this. Please assign to someone else.

@dmarkov
Copy link

dmarkov commented Jan 12, 2015

@dmarkov I'm not seeing my login as a label on this issue. I totally missed this. Please assign to someone else.

@nathansgreen someone else will help in this task, no problem at all

@dmarkov
Copy link

dmarkov commented Jan 12, 2015

@nathansgreen you're working with this issue for 13 days already... -30 added to your rating, at the moment it is: +70

@dmarkov
Copy link

dmarkov commented Jan 14, 2015

@dpisarenko it's your task, go ahead

@mentiflectax
Copy link
Contributor

If I understand correctly, we have following API calls (source: https://developer.github.com/v3/activity/notifications/ ):

  1. List your notifications - com.jcabi.github.User#notifications
  2. List your notifications in a repository - com.jcabi.github.Notifications#iterate
  3. Mark as read - com.jcabi.github.User#markAsRead
  4. Mark notifications as read in a repository - com.jcabi.github.Notifications#markAsRead
  5. View a single thread - com.jcabi.github.Notifications#thread
  6. Mark a thread as read - com.jcabi.github.GitHubThread#markAsRead
  7. Get a Thread Subscription - com.jcabi.github.GitHubThread#getSubscription
  8. Set a Thread Subscription - com.jcabi.github.GitHubThread#setSubscription
  9. Delete a Thread Subscription - com.jcabi.github.GitHubThread#deleteSubscription

Next to each call you can find the location in the code, where I would put them.

@yegor256 @GUIpsp Please look at this list, the PR #985 and tell me, whether you agree with that design. Thanks!

@GUIpsp
Copy link
Author

GUIpsp commented Jan 18, 2015

I think that 7-8 should use an enum rather than an interface.

Other than that looks OK.

@mentiflectax
Copy link
Contributor

@GUIpsp Interface ThreadSubscription is supposed to contain data in response of Get a Thread Subscription ( https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription ) and Set a Thread Subscription ( https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription ), namely:

{
  "subscribed": true,
  "ignored": false,
  "reason": null,
  "created_at": "2012-10-06T21:34:12Z",
  "url": "https://api.github.com/notifications/threads/1/subscription",
  "thread_url": "https://api.github.com/notifications/threads/1"
}

I don't see a way to put these data into an enum.

@GUIpsp
Copy link
Author

GUIpsp commented Jan 20, 2015

Ah, I see. I assumed it was only for the subscribed/ignored part. should I close this issue?

@mentiflectax
Copy link
Contributor

@GUIpsp No, we arent't done with the code review yet.

@mentiflectax
Copy link
Contributor

@GUIpsp The PR has been merged. Unless there is reason no to do so, please close the issue.

@dmarkov
Copy link

dmarkov commented Jan 30, 2015

@dpisarenko this task is in your hands for 15 days already; -30 added to your rating, current score is: +656

@mentiflectax
Copy link
Contributor

@GUIpsp The PR has been merged. Unless there is reason no to do so, please close the issue.

@GUIpsp GUIpsp closed this as completed Jan 31, 2015
@0pdd
Copy link

0pdd commented Apr 4, 2018

@GUIpsp 9 puzzles #unknown, #unknown, #unknown, #unknown, #unknown, #unknown, #unknown, #unknown, #unknown are still not solved; solved: #920.

@0pdd
Copy link

0pdd commented Apr 25, 2018

@GUIpsp 8 puzzles #unknown, #unknown, #unknown, #unknown, #unknown, #unknown, #unknown, #unknown are still not solved; solved: #920.

@0pdd
Copy link

0pdd commented Jul 5, 2022

@GUIpsp 3 puzzles #unknown, #unknown, #unknown are still not solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants