diff --git a/github/authorizations.go b/github/authorizations.go index 35ce9a9..d5a5e63 100644 --- a/github/authorizations.go +++ b/github/authorizations.go @@ -346,9 +346,6 @@ func (s *AuthorizationsService) ListGrants() ([]*Grant, *Response, error) { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeOAuthGrantAuthorizationsPreview) - grants := []*Grant{} resp, err := s.client.Do(req, &grants) if err != nil { @@ -368,9 +365,6 @@ func (s *AuthorizationsService) GetGrant(id int) (*Grant, *Response, error) { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeOAuthGrantAuthorizationsPreview) - grant := new(Grant) resp, err := s.client.Do(req, grant) if err != nil { @@ -392,9 +386,6 @@ func (s *AuthorizationsService) DeleteGrant(id int) (*Response, error) { return nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeOAuthGrantAuthorizationsPreview) - return s.client.Do(req, nil) } diff --git a/github/authorizations_test.go b/github/authorizations_test.go index 90a5324..621cf78 100644 --- a/github/authorizations_test.go +++ b/github/authorizations_test.go @@ -256,7 +256,6 @@ func TestListGrants(t *testing.T) { mux.HandleFunc("/applications/grants", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeOAuthGrantAuthorizationsPreview) fmt.Fprint(w, `[{"id": 1}]`) }) @@ -277,7 +276,6 @@ func TestGetGrant(t *testing.T) { mux.HandleFunc("/applications/grants/1", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeOAuthGrantAuthorizationsPreview) fmt.Fprint(w, `{"id": 1}`) }) @@ -298,7 +296,6 @@ func TestDeleteGrant(t *testing.T) { mux.HandleFunc("/applications/grants/1", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeOAuthGrantAuthorizationsPreview) }) _, err := client.Authorizations.DeleteGrant(1) diff --git a/github/github.go b/github/github.go index 465574b..c52642d 100644 --- a/github/github.go +++ b/github/github.go @@ -79,9 +79,6 @@ const ( // https://developer.github.com/changes/2016-06-14-repository-invitations/ mediaTypeRepositoryInvitationsPreview = "application/vnd.github.swamp-thing-preview+json" - // https://developer.github.com/changes/2016-04-21-oauth-authorizations-grants-api-preview/ - mediaTypeOAuthGrantAuthorizationsPreview = "application/vnd.github.damage-preview+json" - // https://developer.github.com/changes/2016-07-06-github-pages-preiew-api/ mediaTypePagesPreview = "application/vnd.github.mister-fantastic-preview+json"