@@ -30,6 +30,7 @@ type Gist struct {
3030 GitPushURL * string `json:"git_push_url,omitempty"`
3131 CreatedAt * time.Time `json:"created_at,omitempty"`
3232 UpdatedAt * time.Time `json:"updated_at,omitempty"`
33+ NodeID * string `json:"node_id,omitempty"`
3334}
3435
3536func (g Gist ) String () string {
@@ -60,6 +61,7 @@ type GistCommit struct {
6061 User * User `json:"user,omitempty"`
6162 ChangeStatus * CommitStats `json:"change_status,omitempty"`
6263 CommittedAt * Timestamp `json:"committed_at,omitempty"`
64+ NodeID * string `json:"node_id,omitempty"`
6365}
6466
6567func (gc GistCommit ) String () string {
@@ -73,6 +75,7 @@ type GistFork struct {
7375 ID * string `json:"id,omitempty"`
7476 CreatedAt * Timestamp `json:"created_at,omitempty"`
7577 UpdatedAt * Timestamp `json:"updated_at,omitempty"`
78+ NodeID * string `json:"node_id,omitempty"`
7679}
7780
7881func (gf GistFork ) String () string {
@@ -111,6 +114,9 @@ func (s *GistsService) List(ctx context.Context, user string, opt *GistListOptio
111114 return nil , nil , err
112115 }
113116
117+ // TODO: remove custom Accept header when this API fully launches.
118+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
119+
114120 var gists []* Gist
115121 resp , err := s .client .Do (ctx , req , & gists )
116122 if err != nil {
@@ -134,6 +140,9 @@ func (s *GistsService) ListAll(ctx context.Context, opt *GistListOptions) ([]*Gi
134140 return nil , nil , err
135141 }
136142
143+ // TODO: remove custom Accept header when this API fully launches.
144+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
145+
137146 var gists []* Gist
138147 resp , err := s .client .Do (ctx , req , & gists )
139148 if err != nil {
@@ -157,6 +166,9 @@ func (s *GistsService) ListStarred(ctx context.Context, opt *GistListOptions) ([
157166 return nil , nil , err
158167 }
159168
169+ // TODO: remove custom Accept header when this API fully launches.
170+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
171+
160172 var gists []* Gist
161173 resp , err := s .client .Do (ctx , req , & gists )
162174 if err != nil {
@@ -175,6 +187,10 @@ func (s *GistsService) Get(ctx context.Context, id string) (*Gist, *Response, er
175187 if err != nil {
176188 return nil , nil , err
177189 }
190+
191+ // TODO: remove custom Accept header when this API fully launches.
192+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
193+
178194 gist := new (Gist )
179195 resp , err := s .client .Do (ctx , req , gist )
180196 if err != nil {
@@ -193,6 +209,10 @@ func (s *GistsService) GetRevision(ctx context.Context, id, sha string) (*Gist,
193209 if err != nil {
194210 return nil , nil , err
195211 }
212+
213+ // TODO: remove custom Accept header when this API fully launches.
214+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
215+
196216 gist := new (Gist )
197217 resp , err := s .client .Do (ctx , req , gist )
198218 if err != nil {
@@ -211,6 +231,10 @@ func (s *GistsService) Create(ctx context.Context, gist *Gist) (*Gist, *Response
211231 if err != nil {
212232 return nil , nil , err
213233 }
234+
235+ // TODO: remove custom Accept header when this API fully launches.
236+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
237+
214238 g := new (Gist )
215239 resp , err := s .client .Do (ctx , req , g )
216240 if err != nil {
@@ -229,6 +253,10 @@ func (s *GistsService) Edit(ctx context.Context, id string, gist *Gist) (*Gist,
229253 if err != nil {
230254 return nil , nil , err
231255 }
256+
257+ // TODO: remove custom Accept header when this API fully launches.
258+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
259+
232260 g := new (Gist )
233261 resp , err := s .client .Do (ctx , req , g )
234262 if err != nil {
@@ -253,6 +281,9 @@ func (s *GistsService) ListCommits(ctx context.Context, id string, opt *ListOpti
253281 return nil , nil , err
254282 }
255283
284+ // TODO: remove custom Accept header when this API fully launches.
285+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
286+
256287 var gistCommits []* GistCommit
257288 resp , err := s .client .Do (ctx , req , & gistCommits )
258289 if err != nil {
@@ -322,6 +353,9 @@ func (s *GistsService) Fork(ctx context.Context, id string) (*Gist, *Response, e
322353 return nil , nil , err
323354 }
324355
356+ // TODO: remove custom Accept header when this API fully launches.
357+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
358+
325359 g := new (Gist )
326360 resp , err := s .client .Do (ctx , req , g )
327361 if err != nil {
@@ -341,6 +375,9 @@ func (s *GistsService) ListForks(ctx context.Context, id string) ([]*GistFork, *
341375 return nil , nil , err
342376 }
343377
378+ // TODO: remove custom Accept header when this API fully launches.
379+ req .Header .Set ("Accept" , mediaTypeGraphQLNodeIDPreview )
380+
344381 var gistForks []* GistFork
345382 resp , err := s .client .Do (ctx , req , & gistForks )
346383 if err != nil {
0 commit comments