client

package
v0.0.0-...-69a499a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachToAccountInstagramPath

func AttachToAccountInstagramPath() string

AttachToAccountInstagramPath returns the URL path to the instagram service attach-to-account HTTP endpoint.

func BuildAttachToAccountPayload

func BuildAttachToAccountPayload(instagramAttachToAccountAuthorization string, instagramAttachToAccountXSession string, instagramAttachToAccountAPIKey string, instagramAttachToAccountRedirectURL string) (*instagram.AttachToAccountPayload, error)

BuildAttachToAccountPayload builds the payload for the instagram attach-to-account endpoint from CLI flags.

func BuildDetachFromAccountPayload

func BuildDetachFromAccountPayload(instagramDetachFromAccountAuthorization string, instagramDetachFromAccountXSession string, instagramDetachFromAccountAPIKey string) (*instagram.DetachFromAccountPayload, error)

BuildDetachFromAccountPayload builds the payload for the instagram detach-from-account endpoint from CLI flags.

func BuildReceivePayload

func BuildReceivePayload(instagramReceiveCode string, instagramReceiveState string, instagramReceiveAuthorization string, instagramReceiveXSession string, instagramReceiveRedirectURL string, instagramReceiveAPIKey string) (*instagram.ReceivePayload, error)

BuildReceivePayload builds the payload for the instagram receive endpoint from CLI flags.

func BuildRegisterURLPayload

func BuildRegisterURLPayload(instagramRegisterURLAPIKey string, instagramRegisterURLRedirectURL string) (*instagram.RegisterURLPayload, error)

BuildRegisterURLPayload builds the payload for the instagram register-url endpoint from CLI flags.

func DecodeAttachToAccountResponse

func DecodeAttachToAccountResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeAttachToAccountResponse returns a decoder for responses returned by the instagram attach-to-account endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeDetachFromAccountResponse

func DecodeDetachFromAccountResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeDetachFromAccountResponse returns a decoder for responses returned by the instagram detach-from-account endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeReceiveResponse

func DecodeReceiveResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeReceiveResponse returns a decoder for responses returned by the instagram receive endpoint. restoreBody controls whether the response body should be restored after having been read.

func DecodeRegisterURLResponse

func DecodeRegisterURLResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)

DecodeRegisterURLResponse returns a decoder for responses returned by the instagram register-url endpoint. restoreBody controls whether the response body should be restored after having been read.

func DetachFromAccountInstagramPath

func DetachFromAccountInstagramPath() string

DetachFromAccountInstagramPath returns the URL path to the instagram service detach-from-account HTTP endpoint.

func EncodeAttachToAccountRequest

func EncodeAttachToAccountRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeAttachToAccountRequest returns an encoder for requests sent to the instagram attach-to-account server.

func EncodeDetachFromAccountRequest

func EncodeDetachFromAccountRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeDetachFromAccountRequest returns an encoder for requests sent to the instagram detach-from-account server.

func EncodeReceiveRequest

func EncodeReceiveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeReceiveRequest returns an encoder for requests sent to the instagram receive server.

func EncodeRegisterURLRequest

func EncodeRegisterURLRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error

EncodeRegisterURLRequest returns an encoder for requests sent to the instagram register-url server.

func NewReceiveUserMediaOK

func NewReceiveUserMediaOK(body *ReceiveResponseBody, authorization string, xSession string) *instagramviews.UserMediaView

NewReceiveUserMediaOK builds a "instagram" service "receive" endpoint result from a HTTP "OK" response.

func ReceiveInstagramPath

func ReceiveInstagramPath() string

ReceiveInstagramPath returns the URL path to the instagram service receive HTTP endpoint.

func RegisterURLInstagramPath

func RegisterURLInstagramPath() string

RegisterURLInstagramPath returns the URL path to the instagram service register-url HTTP endpoint.

Types

type Client

type Client struct {
	// RegisterURL Doer is the HTTP client used to make requests to the
	// register-url endpoint.
	RegisterURLDoer goahttp.Doer

	// AttachToAccount Doer is the HTTP client used to make requests to the
	// attach-to-account endpoint.
	AttachToAccountDoer goahttp.Doer

	// DetachFromAccount Doer is the HTTP client used to make requests to the
	// detach-from-account endpoint.
	DetachFromAccountDoer goahttp.Doer

	// Receive Doer is the HTTP client used to make requests to the receive
	// endpoint.
	ReceiveDoer goahttp.Doer

	// CORS Doer is the HTTP client used to make requests to the  endpoint.
	CORSDoer goahttp.Doer

	// RestoreResponseBody controls whether the response bodies are reset after
	// decoding so they can be read again.
	RestoreResponseBody bool
	// contains filtered or unexported fields
}

Client lists the instagram service endpoint HTTP clients.

func NewClient

func NewClient(
	scheme string,
	host string,
	doer goahttp.Doer,
	enc func(*http.Request) goahttp.Encoder,
	dec func(*http.Response) goahttp.Decoder,
	restoreBody bool,
) *Client

NewClient instantiates HTTP clients for all the instagram service servers.

func (*Client) AttachToAccount

func (c *Client) AttachToAccount() goa.Endpoint

AttachToAccount returns an endpoint that makes HTTP requests to the instagram service attach-to-account server.

func (*Client) BuildAttachToAccountRequest

func (c *Client) BuildAttachToAccountRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildAttachToAccountRequest instantiates a HTTP request object with method and path set to call the "instagram" service "attach-to-account" endpoint

func (*Client) BuildDetachFromAccountRequest

func (c *Client) BuildDetachFromAccountRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildDetachFromAccountRequest instantiates a HTTP request object with method and path set to call the "instagram" service "detach-from-account" endpoint

func (*Client) BuildReceiveRequest

func (c *Client) BuildReceiveRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildReceiveRequest instantiates a HTTP request object with method and path set to call the "instagram" service "receive" endpoint

func (*Client) BuildRegisterURLRequest

func (c *Client) BuildRegisterURLRequest(ctx context.Context, v interface{}) (*http.Request, error)

BuildRegisterURLRequest instantiates a HTTP request object with method and path set to call the "instagram" service "register-url" endpoint

func (*Client) DetachFromAccount

func (c *Client) DetachFromAccount() goa.Endpoint

DetachFromAccount returns an endpoint that makes HTTP requests to the instagram service detach-from-account server.

func (*Client) Receive

func (c *Client) Receive() goa.Endpoint

Receive returns an endpoint that makes HTTP requests to the instagram service receive server.

func (*Client) RegisterURL

func (c *Client) RegisterURL() goa.Endpoint

RegisterURL returns an endpoint that makes HTTP requests to the instagram service register-url server.

type ReceiveResponseBody

type ReceiveResponseBody struct {
	// Unique unchanging user ID
	ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	// Given name for the user
	FirstName *string `form:"firstName,omitempty" json:"firstName,omitempty" xml:"firstName,omitempty"`
	// Family name for the user
	LastName *string `form:"lastName,omitempty" json:"lastName,omitempty" xml:"lastName,omitempty"`
	// Email attached to the account of the user
	Email *string `form:"email,omitempty" json:"email,omitempty" xml:"email,omitempty"`
	// Phone Number Of the user
	Phone *string `form:"phone,omitempty" json:"phone,omitempty" xml:"phone,omitempty"`
	// When the user attempts to change their email, this is what they will change
	// it to after they verify that it belongs to them
	ChangingEmail *string `form:"changingEmail,omitempty" json:"changingEmail,omitempty" xml:"changingEmail,omitempty"`
	// Whether the user has verified their email
	VerifiedEmail *bool `form:"verifiedEmail,omitempty" json:"verifiedEmail,omitempty" xml:"verifiedEmail,omitempty"`
	// Whether the user is an administrator on the site
	IsAdmin          *bool   `form:"isAdmin,omitempty" json:"isAdmin,omitempty" xml:"isAdmin,omitempty"`
	UpdatedAt        *string `form:"updatedAt,omitempty" json:"updatedAt,omitempty" xml:"updatedAt,omitempty"`
	IsActive         *bool   `form:"isActive,omitempty" json:"isActive,omitempty" xml:"isActive,omitempty"`
	CreatedAt        *string `form:"createdAt,omitempty" json:"createdAt,omitempty" xml:"createdAt,omitempty"`
	CountryPhoneCode *string `form:"countryPhoneCode,omitempty" json:"countryPhoneCode,omitempty" xml:"countryPhoneCode,omitempty"`
}

ReceiveResponseBody is the type of the "instagram" service "receive" endpoint HTTP response body.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL