func Block(ctx context.Context, req *BlockReq, opt ...requests.Option) (*BlockResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(BlockReq)
	}
	resp := &BlockResponse{}
	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
}
/*
Block performs requests for "users/block"

Block a user.

PUT /user/blocks/{username}

https://developer.github.com/v3/users/blocking/#block-a-user
package users
import (
	"context"
	"encoding/json"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
	"net/url"
	"strconv"
)
func AddEmailForAuthenticated(ctx context.Context, req *AddEmailForAuthenticatedReq, opt ...requests.Option) (*AddEmailForAuthenticatedResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(AddEmailForAuthenticatedReq)
	}
	resp := &AddEmailForAuthenticatedResponse{}
	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) AddEmailForAuthenticated(ctx context.Context, req *AddEmailForAuthenticatedReq, opt ...requests.Option) (*AddEmailForAuthenticatedResponse, error) {
	return AddEmailForAuthenticated(ctx, req, append(c, opt...)...)
}
type AddEmailForAuthenticatedReq struct {
	_url        string
	RequestBody AddEmailForAuthenticatedReqBody
}
func (r *AddEmailForAuthenticatedReq) 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("/user/emails"),
	})
}
func (r *AddEmailForAuthenticatedReq) Rel(link string, resp *AddEmailForAuthenticatedResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type AddEmailForAuthenticatedReqBody struct {
	Emails []string `json:"emails"`
}
type AddEmailForAuthenticatedResponse struct {
	httpResponse *http.Response
	Data         []components.Email
}
func (r *AddEmailForAuthenticatedResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *AddEmailForAuthenticatedResponse) 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
}