MCPcopy Create free account
hub / github.com/google/go-github / IsStarred

Method IsStarred

github/gists.go:341–351  ·  view source on GitHub ↗

IsStarred checks if a gist is starred by authenticated user. GitHub API docs: https://docs.github.com/rest/gists/gists?apiVersion=2022-11-28#check-if-a-gist-is-starred meta:operation GET /gists/{gist_id}/star

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

339//
340//meta:operation GET /gists/{gist_id}/star
341func (s *GistsService) IsStarred(ctx context.Context, id string) (bool, *Response, error) {
342 u := fmt.Sprintf("gists/%v/star", id)
343 req, err := s.client.NewRequest(ctx, "GET", u, nil)
344 if err != nil {
345 return false, nil, err
346 }
347
348 resp, err := s.client.Do(req, nil)
349 starred, err := parseBoolResponse(err)
350 return starred, resp, err
351}
352
353// Fork a gist.
354//

Calls 3

parseBoolResponseFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45