func (r *CreateCommentReq) Rel(link string, resp *CreateCommentResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
/*
Rel updates this request to point to a relative link from resp. Returns false if
the link does not exist. Handy for paging.
package gists
import (
	"context"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
	"net/url"
	"strconv"
)
func CheckIsStarred(ctx context.Context, req *CheckIsStarredReq, opt ...requests.Option) (*CheckIsStarredResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CheckIsStarredReq)
	}
	resp := &CheckIsStarredResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) CheckIsStarred(ctx context.Context, req *CheckIsStarredReq, opt ...requests.Option) (*CheckIsStarredResponse, error) {
	return CheckIsStarred(ctx, req, append(c, opt...)...)
}
type CheckIsStarredReq struct {
	_url string
	GistId string
}
func (r *CheckIsStarredReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "GET",
		Options:     opt,
		URLPath:     fmt.Sprintf("/gists/%v/star", r.GistId),
	})
}
func (r *CheckIsStarredReq) Rel(link string, resp *CheckIsStarredResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CheckIsStarredResponse struct {
	httpResponse *http.Response
}
func (r *CheckIsStarredResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CheckIsStarredResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204, 304})
	if err != nil {
		return err
	}
	return nil
}
func Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateReq)
	}
	resp := &CreateResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error) {
	return Create(ctx, req, append(c, opt...)...)
}
type CreateReq struct {
	_url        string
	RequestBody CreateReqBody
}
func (r *CreateReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals: map[string]*string{
			"accept":       strPtr("application/json"),
			"content-type": strPtr("application/json"),
		},
		Method:  "POST",
		Options: opt,
		URLPath: fmt.Sprintf("/gists"),
	})
}
func (r *CreateReq) Rel(link string, resp *CreateResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateReqBodyFiles struct {
	Content *string `json:"content"`
}
type CreateReqBody struct {
	Description *string `json:"description,omitempty"`
	Files map[string]CreateReqBodyFiles `json:"files"`
	Public *bool `json:"public,omitempty"`
}
type CreateResponse struct {
	httpResponse *http.Response
	Data         components.GistFull
}
func (r *CreateResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{201, 304})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{201}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func CreateComment(ctx context.Context, req *CreateCommentReq, opt ...requests.Option) (*CreateCommentResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateCommentReq)
	}
	resp := &CreateCommentResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) CreateComment(ctx context.Context, req *CreateCommentReq, opt ...requests.Option) (*CreateCommentResponse, error) {
	return CreateComment(ctx, req, append(c, opt...)...)
}
type CreateCommentReq struct {
	_url string
	GistId      string
	RequestBody CreateCommentReqBody
}
func (r *CreateCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals: map[string]*string{
			"accept":       strPtr("application/json"),
			"content-type": strPtr("application/json"),
		},
		Method:  "POST",
		Options: opt,
		URLPath: fmt.Sprintf("/gists/%v/comments", r.GistId),
	})
}