func (c Client) CreateInvitation(ctx context.Context, req *CreateInvitationReq, opt ...requests.Option) (*CreateInvitationResponse, error) {
	return CreateInvitation(ctx, req, append(c, opt...)...)
}
/*
CreateInvitation performs requests for "orgs/create-invitation"

Create an organization invitation.

POST /orgs/{org}/invitations

https://developer.github.com/v3/orgs/members/#create-an-organization-invitation

Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
package orgs
import (
	"context"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
	"net/url"
	"strconv"
)
func BlockUser(ctx context.Context, req *BlockUserReq, opt ...requests.Option) (*BlockUserResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(BlockUserReq)
	}
	resp := &BlockUserResponse{}
	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) BlockUser(ctx context.Context, req *BlockUserReq, opt ...requests.Option) (*BlockUserResponse, error) {
	return BlockUser(ctx, req, append(c, opt...)...)
}
type BlockUserReq struct {
	_url     string
	Org      string
	Username string
}
func (r *BlockUserReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "PUT",
		Options:     opt,
		URLPath:     fmt.Sprintf("/orgs/%v/blocks/%v", r.Org, r.Username),
	})
}
func (r *BlockUserReq) Rel(link string, resp *BlockUserResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type BlockUserResponse struct {
	httpResponse *http.Response
}
func (r *BlockUserResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *BlockUserResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204})
	if err != nil {
		return err
	}
	return nil
}
func CheckBlockedUser(ctx context.Context, req *CheckBlockedUserReq, opt ...requests.Option) (*CheckBlockedUserResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CheckBlockedUserReq)
	}
	resp := &CheckBlockedUserResponse{}
	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) CheckBlockedUser(ctx context.Context, req *CheckBlockedUserReq, opt ...requests.Option) (*CheckBlockedUserResponse, error) {
	return CheckBlockedUser(ctx, req, append(c, opt...)...)
}
type CheckBlockedUserReq struct {
	_url     string
	Org      string
	Username string
}
func (r *CheckBlockedUserReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "GET",
		Options:     opt,
		URLPath:     fmt.Sprintf("/orgs/%v/blocks/%v", r.Org, r.Username),
	})
}
func (r *CheckBlockedUserReq) Rel(link string, resp *CheckBlockedUserResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CheckBlockedUserResponse struct {
	httpResponse *http.Response
	Data         bool
}
func (r *CheckBlockedUserResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CheckBlockedUserResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204, 404})
	if err != nil {
		return err
	}
	err = setBoolResult(resp, &r.Data)
	if err != nil {
		return err
	}
	return nil
}
func CheckMembershipForUser(ctx context.Context, req *CheckMembershipForUserReq, opt ...requests.Option) (*CheckMembershipForUserResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CheckMembershipForUserReq)
	}
	resp := &CheckMembershipForUserResponse{}
	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) CheckMembershipForUser(ctx context.Context, req *CheckMembershipForUserReq, opt ...requests.Option) (*CheckMembershipForUserResponse, error) {
	return CheckMembershipForUser(ctx, req, append(c, opt...)...)
}
type CheckMembershipForUserReq struct {
	_url     string
	Org      string
	Username string
}
func (r *CheckMembershipForUserReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "GET",
		Options:     opt,
		URLPath:     fmt.Sprintf("/orgs/%v/members/%v", r.Org, r.Username),
	})
}
func (r *CheckMembershipForUserReq) Rel(link string, resp *CheckMembershipForUserResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CheckMembershipForUserResponse struct {
	httpResponse *http.Response
}
func (r *CheckMembershipForUserResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CheckMembershipForUserResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204, 302})
	if err != nil {
		return err
	}
	return nil
}
func CheckPublicMembershipForUser(ctx context.Context, req *CheckPublicMembershipForUserReq, opt ...requests.Option) (*CheckPublicMembershipForUserResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CheckPublicMembershipForUserReq)
	}
	resp := &CheckPublicMembershipForUserResponse{}
	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) CheckPublicMembershipForUser(ctx context.Context, req *CheckPublicMembershipForUserReq, opt ...requests.Option) (*CheckPublicMembershipForUserResponse, error) {
	return CheckPublicMembershipForUser(ctx, req, append(c, opt...)...)
}
type CheckPublicMembershipForUserReq struct {
	_url     string
	Org      string
	Username string
}
func (r *CheckPublicMembershipForUserReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "GET",
		Options:     opt,
		URLPath:     fmt.Sprintf("/orgs/%v/public_members/%v", r.Org, r.Username),
	})
}
func (r *CheckPublicMembershipForUserReq) Rel(link string, resp *CheckPublicMembershipForUserResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CheckPublicMembershipForUserResponse struct {
	httpResponse *http.Response
	Data         bool
}
func (r *CheckPublicMembershipForUserResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CheckPublicMembershipForUserResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204, 404})
	if err != nil {
		return err
	}
	err = setBoolResult(resp, &r.Data)
	if err != nil {
		return err
	}
	return nil
}
func ConvertMemberToOutsideCollaborator(ctx context.Context, req *ConvertMemberToOutsideCollaboratorReq, opt ...requests.Option) (*ConvertMemberToOutsideCollaboratorResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(ConvertMemberToOutsideCollaboratorReq)
	}
	resp := &ConvertMemberToOutsideCollaboratorResponse{}
	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) ConvertMemberToOutsideCollaborator(ctx context.Context, req *ConvertMemberToOutsideCollaboratorReq, opt ...requests.Option) (*ConvertMemberToOutsideCollaboratorResponse, error) {
	return ConvertMemberToOutsideCollaborator(ctx, req, append(c, opt...)...)
}
type ConvertMemberToOutsideCollaboratorReq struct {
	_url     string
	Org      string
	Username string
}
func (r *ConvertMemberToOutsideCollaboratorReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "PUT",
		Options:     opt,
		URLPath:     fmt.Sprintf("/orgs/%v/outside_collaborators/%v", r.Org, r.Username),
	})
}
func (r *ConvertMemberToOutsideCollaboratorReq) Rel(link string, resp *ConvertMemberToOutsideCollaboratorResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type ConvertMemberToOutsideCollaboratorResponse struct {
	httpResponse *http.Response
}
func (r *ConvertMemberToOutsideCollaboratorResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *ConvertMemberToOutsideCollaboratorResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{202, 204})
	if err != nil {
		return err
	}
	return nil
}
func CreateInvitation(ctx context.Context, req *CreateInvitationReq, opt ...requests.Option) (*CreateInvitationResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateInvitationReq)
	}
	resp := &CreateInvitationResponse{}
	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
}