Browse Source

deployments: remove cannonball Accept header

Deployments API is now official.

https://developer.github.com/changes/2014-11-25-the-deployments-api-is-official/

Fixes #189.
Parker Moore 11 years ago
committed by Will Norris
parent
commit
0aa6dda877
2 changed files with 0 additions and 15 deletions
  1. +0
    -3
      github/github.go
  2. +0
    -12
      github/repos_deployments.go

+ 0
- 3
github/github.go View File

@ -39,9 +39,6 @@ const (
// https://developer.github.com/changes/2014-08-05-team-memberships-api/
mediaTypeMembershipPreview = "application/vnd.github.the-wasp-preview+json"
// https://developer.github.com/changes/2014-01-09-preview-the-new-deployments-api/
mediaTypeDeploymentPreview = "application/vnd.github.cannonball-preview+json"
)
// A Client manages communication with the GitHub API.


+ 0
- 12
github/repos_deployments.go View File

@ -69,9 +69,6 @@ func (s *RepositoriesService) ListDeployments(owner, repo string, opt *Deploymen
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches
req.Header.Set("Accept", mediaTypeDeploymentPreview)
deployments := new([]Deployment)
resp, err := s.client.Do(req, deployments)
if err != nil {
@ -92,9 +89,6 @@ func (s *RepositoriesService) CreateDeployment(owner, repo string, request *Depl
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches
req.Header.Set("Accept", mediaTypeDeploymentPreview)
d := new(Deployment)
resp, err := s.client.Do(req, d)
if err != nil {
@ -138,9 +132,6 @@ func (s *RepositoriesService) ListDeploymentStatuses(owner, repo string, deploym
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches
req.Header.Set("Accept", mediaTypeDeploymentPreview)
statuses := new([]DeploymentStatus)
resp, err := s.client.Do(req, statuses)
if err != nil {
@ -161,9 +152,6 @@ func (s *RepositoriesService) CreateDeploymentStatus(owner, repo string, deploym
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches
req.Header.Set("Accept", mediaTypeDeploymentPreview)
d := new(DeploymentStatus)
resp, err := s.client.Do(req, d)
if err != nil {


Loading…
Cancel
Save