mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-07 22:13:12 +00:00
Update vendored deps
This commit is contained in:
21
vendor/github.com/google/go-github/github/activity_notifications.go
generated
vendored
21
vendor/github.com/google/go-github/github/activity_notifications.go
generated
vendored
@@ -96,20 +96,17 @@ func (s *ActivityService) ListRepositoryNotifications(owner, repo string, opt *N
|
||||
}
|
||||
|
||||
type markReadOptions struct {
|
||||
LastReadAt time.Time `url:"last_read_at,omitempty"`
|
||||
LastReadAt time.Time `json:"last_read_at,omitempty"`
|
||||
}
|
||||
|
||||
// MarkNotificationsRead marks all notifications up to lastRead as read.
|
||||
//
|
||||
// GitHub API Docs: https://developer.github.com/v3/activity/notifications/#mark-as-read
|
||||
func (s *ActivityService) MarkNotificationsRead(lastRead time.Time) (*Response, error) {
|
||||
u := fmt.Sprintf("notifications")
|
||||
u, err := addOptions(u, markReadOptions{lastRead})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
opts := &markReadOptions{
|
||||
LastReadAt: lastRead,
|
||||
}
|
||||
|
||||
req, err := s.client.NewRequest("PUT", u, nil)
|
||||
req, err := s.client.NewRequest("PUT", "notifications", opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -122,13 +119,11 @@ func (s *ActivityService) MarkNotificationsRead(lastRead time.Time) (*Response,
|
||||
//
|
||||
// GitHub API Docs: https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository
|
||||
func (s *ActivityService) MarkRepositoryNotificationsRead(owner, repo string, lastRead time.Time) (*Response, error) {
|
||||
u := fmt.Sprintf("repos/%v/%v/notifications", owner, repo)
|
||||
u, err := addOptions(u, markReadOptions{lastRead})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
opts := &markReadOptions{
|
||||
LastReadAt: lastRead,
|
||||
}
|
||||
|
||||
req, err := s.client.NewRequest("PUT", u, nil)
|
||||
u := fmt.Sprintf("repos/%v/%v/notifications", owner, repo)
|
||||
req, err := s.client.NewRequest("PUT", u, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user