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)
| 339 | // |
| 340 | //meta:operation GET /gists/{gist_id}/star |
| 341 | func (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 | // |