]> source.dussan.org Git - gitea.git/commit
[API] Add notification endpoint (#9488)
author6543 <6543@obermui.de>
Thu, 9 Jan 2020 11:56:32 +0000 (12:56 +0100)
committerzeripath <art27@cantab.net>
Thu, 9 Jan 2020 11:56:32 +0000 (11:56 +0000)
commit6baa5d7588bcf0e1fee8f4e4d77381b39b973363
treec7fe9835cc8ead37a1a8d90555b3caeab11f027b
parentee9ce0cfa9c003b359d2d3fba9346fd0929e88f4
[API] Add notification endpoint (#9488)

* [API] Add notification endpoints

 * add func GetNotifications(opts FindNotificationOptions)
 * add func (n *Notification) APIFormat()
 * add func (nl NotificationList) APIFormat()
 * add func (n *Notification) APIURL()
 * add func (nl NotificationList) APIFormat()
 * add LoadAttributes functions (loadRepo, loadIssue, loadComment, loadUser)
 * add func (c *Comment) APIURL()
 * add func (issue *Issue) GetLastComment()
 * add endpoint GET /notifications
 * add endpoint PUT /notifications
 * add endpoint GET /repos/{owner}/{repo}/notifications
 * add endpoint PUT /repos/{owner}/{repo}/notifications
 * add endpoint GET /notifications/threads/{id}
 * add endpoint PATCH /notifications/threads/{id}

* Add TEST

* code format

* code format
15 files changed:
integrations/api_notification_test.go [new file with mode: 0644]
models/fixtures/notification.yml
models/issue.go
models/issue_comment.go
models/notification.go
models/notification_test.go
modules/structs/notifications.go [new file with mode: 0644]
routers/api/v1/admin/user.go
routers/api/v1/api.go
routers/api/v1/notify/repo.go [new file with mode: 0644]
routers/api/v1/notify/threads.go [new file with mode: 0644]
routers/api/v1/notify/user.go [new file with mode: 0644]
routers/api/v1/repo/pull.go
routers/api/v1/swagger/notify.go [new file with mode: 0644]
templates/swagger/v1_json.tmpl