AddEmails adds email addresses of the authenticated user. GitHub API docs: https://docs.github.com/rest/users/emails?apiVersion=2022-11-28#add-an-email-address-for-the-authenticated-user meta:operation POST /user/emails
(ctx context.Context, emails []string)
| 47 | // |
| 48 | //meta:operation POST /user/emails |
| 49 | func (s *UsersService) AddEmails(ctx context.Context, emails []string) ([]*UserEmail, *Response, error) { |
| 50 | u := "user/emails" |
| 51 | req, err := s.client.NewRequest(ctx, "POST", u, emails) |
| 52 | if err != nil { |
| 53 | return nil, nil, err |
| 54 | } |
| 55 | |
| 56 | var e []*UserEmail |
| 57 | resp, err := s.client.Do(req, &e) |
| 58 | if err != nil { |
| 59 | return nil, resp, err |
| 60 | } |
| 61 | |
| 62 | return e, resp, nil |
| 63 | } |
| 64 | |
| 65 | // DeleteEmails deletes email addresses from authenticated user. |
| 66 | // |