url

package
v0.0.0-...-a480b2e Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for url API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client

New creates a new url API client.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

func (*Client) UrlshortenerURLGet

func (a *Client) UrlshortenerURLGet(params *UrlshortenerURLGetParams, authInfo runtime.ClientAuthInfoWriter) (*UrlshortenerURLGetOK, error)

UrlshortenerURLGet Expands a short URL or gets creation time and analytics.

func (*Client) UrlshortenerURLInsert

func (a *Client) UrlshortenerURLInsert(params *UrlshortenerURLInsertParams, authInfo runtime.ClientAuthInfoWriter) (*UrlshortenerURLInsertOK, error)

UrlshortenerURLInsert Creates a new short URL.

func (*Client) UrlshortenerURLList

func (a *Client) UrlshortenerURLList(params *UrlshortenerURLListParams, authInfo runtime.ClientAuthInfoWriter) (*UrlshortenerURLListOK, error)

UrlshortenerURLList Retrieves a list of URLs shortened by a user.

type UrlshortenerURLGetOK

type UrlshortenerURLGetOK struct {
	Payload *models.URL
}

UrlshortenerURLGetOK handles this case with default header values.

Successful response

func NewUrlshortenerURLGetOK

func NewUrlshortenerURLGetOK() *UrlshortenerURLGetOK

NewUrlshortenerURLGetOK creates a UrlshortenerURLGetOK with default headers values

func (*UrlshortenerURLGetOK) Error

func (o *UrlshortenerURLGetOK) Error() string

type UrlshortenerURLGetParams

type UrlshortenerURLGetParams struct {

	/*Alt
	  Data format for the response.

	*/
	Alt *string
	/*Fields
	  Selector specifying which fields to include in a partial response.

	*/
	Fields *string
	/*Key
	  API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

	*/
	Key *string
	/*OauthToken
	  OAuth 2.0 token for the current user.

	*/
	OauthToken *string
	/*PrettyPrint
	  Returns response with indentations and line breaks.

	*/
	PrettyPrint *bool
	/*Projection
	  Additional information to return.

	*/
	Projection *string
	/*QuotaUser
	  Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

	*/
	QuotaUser *string
	/*ShortURL
	  The short URL, including the protocol.

	*/
	ShortURL string
	/*UserIP
	  IP address of the site where the request originates. Use this if you want to enforce per-user limits.

	*/
	UserIP *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

UrlshortenerURLGetParams contains all the parameters to send to the API endpoint for the urlshortener url get operation typically these are written to a http.Request

func NewUrlshortenerURLGetParams

func NewUrlshortenerURLGetParams() *UrlshortenerURLGetParams

NewUrlshortenerURLGetParams creates a new UrlshortenerURLGetParams object with the default values initialized.

func NewUrlshortenerURLGetParamsWithContext

func NewUrlshortenerURLGetParamsWithContext(ctx context.Context) *UrlshortenerURLGetParams

NewUrlshortenerURLGetParamsWithContext creates a new UrlshortenerURLGetParams object with the default values initialized, and the ability to set a context for a request

func NewUrlshortenerURLGetParamsWithTimeout

func NewUrlshortenerURLGetParamsWithTimeout(timeout time.Duration) *UrlshortenerURLGetParams

NewUrlshortenerURLGetParamsWithTimeout creates a new UrlshortenerURLGetParams object with the default values initialized, and the ability to set a timeout on a request

func (*UrlshortenerURLGetParams) SetAlt

func (o *UrlshortenerURLGetParams) SetAlt(alt *string)

SetAlt adds the alt to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetContext

func (o *UrlshortenerURLGetParams) SetContext(ctx context.Context)

SetContext adds the context to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetFields

func (o *UrlshortenerURLGetParams) SetFields(fields *string)

SetFields adds the fields to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetKey

func (o *UrlshortenerURLGetParams) SetKey(key *string)

SetKey adds the key to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetOauthToken

func (o *UrlshortenerURLGetParams) SetOauthToken(oauthToken *string)

SetOauthToken adds the oauthToken to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetPrettyPrint

func (o *UrlshortenerURLGetParams) SetPrettyPrint(prettyPrint *bool)

SetPrettyPrint adds the prettyPrint to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetProjection

func (o *UrlshortenerURLGetParams) SetProjection(projection *string)

SetProjection adds the projection to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetQuotaUser

func (o *UrlshortenerURLGetParams) SetQuotaUser(quotaUser *string)

SetQuotaUser adds the quotaUser to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetShortURL

func (o *UrlshortenerURLGetParams) SetShortURL(shortURL string)

SetShortURL adds the shortUrl to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetTimeout

func (o *UrlshortenerURLGetParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the urlshortener url get params

func (*UrlshortenerURLGetParams) SetUserIP

func (o *UrlshortenerURLGetParams) SetUserIP(userIP *string)

SetUserIP adds the userIp to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithAlt

WithAlt adds the alt to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithContext

WithContext adds the context to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithFields

WithFields adds the fields to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithKey

WithKey adds the key to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithOauthToken

func (o *UrlshortenerURLGetParams) WithOauthToken(oauthToken *string) *UrlshortenerURLGetParams

WithOauthToken adds the oauthToken to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithPrettyPrint

func (o *UrlshortenerURLGetParams) WithPrettyPrint(prettyPrint *bool) *UrlshortenerURLGetParams

WithPrettyPrint adds the prettyPrint to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithProjection

func (o *UrlshortenerURLGetParams) WithProjection(projection *string) *UrlshortenerURLGetParams

WithProjection adds the projection to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithQuotaUser

func (o *UrlshortenerURLGetParams) WithQuotaUser(quotaUser *string) *UrlshortenerURLGetParams

WithQuotaUser adds the quotaUser to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithShortURL

func (o *UrlshortenerURLGetParams) WithShortURL(shortURL string) *UrlshortenerURLGetParams

WithShortURL adds the shortURL to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithTimeout

WithTimeout adds the timeout to the urlshortener url get params

func (*UrlshortenerURLGetParams) WithUserIP

WithUserIP adds the userIP to the urlshortener url get params

func (*UrlshortenerURLGetParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type UrlshortenerURLGetReader

type UrlshortenerURLGetReader struct {
	// contains filtered or unexported fields
}

UrlshortenerURLGetReader is a Reader for the UrlshortenerURLGet structure.

func (*UrlshortenerURLGetReader) ReadResponse

func (o *UrlshortenerURLGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type UrlshortenerURLInsertOK

type UrlshortenerURLInsertOK struct {
	Payload *models.URL
}

UrlshortenerURLInsertOK handles this case with default header values.

Successful response

func NewUrlshortenerURLInsertOK

func NewUrlshortenerURLInsertOK() *UrlshortenerURLInsertOK

NewUrlshortenerURLInsertOK creates a UrlshortenerURLInsertOK with default headers values

func (*UrlshortenerURLInsertOK) Error

func (o *UrlshortenerURLInsertOK) Error() string

type UrlshortenerURLInsertParams

type UrlshortenerURLInsertParams struct {

	/*Alt
	  Data format for the response.

	*/
	Alt *string
	/*Body*/
	Body *models.URL
	/*Fields
	  Selector specifying which fields to include in a partial response.

	*/
	Fields *string
	/*Key
	  API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

	*/
	Key *string
	/*OauthToken
	  OAuth 2.0 token for the current user.

	*/
	OauthToken *string
	/*PrettyPrint
	  Returns response with indentations and line breaks.

	*/
	PrettyPrint *bool
	/*QuotaUser
	  Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

	*/
	QuotaUser *string
	/*UserIP
	  IP address of the site where the request originates. Use this if you want to enforce per-user limits.

	*/
	UserIP *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

UrlshortenerURLInsertParams contains all the parameters to send to the API endpoint for the urlshortener url insert operation typically these are written to a http.Request

func NewUrlshortenerURLInsertParams

func NewUrlshortenerURLInsertParams() *UrlshortenerURLInsertParams

NewUrlshortenerURLInsertParams creates a new UrlshortenerURLInsertParams object with the default values initialized.

func NewUrlshortenerURLInsertParamsWithContext

func NewUrlshortenerURLInsertParamsWithContext(ctx context.Context) *UrlshortenerURLInsertParams

NewUrlshortenerURLInsertParamsWithContext creates a new UrlshortenerURLInsertParams object with the default values initialized, and the ability to set a context for a request

func NewUrlshortenerURLInsertParamsWithTimeout

func NewUrlshortenerURLInsertParamsWithTimeout(timeout time.Duration) *UrlshortenerURLInsertParams

NewUrlshortenerURLInsertParamsWithTimeout creates a new UrlshortenerURLInsertParams object with the default values initialized, and the ability to set a timeout on a request

func (*UrlshortenerURLInsertParams) SetAlt

func (o *UrlshortenerURLInsertParams) SetAlt(alt *string)

SetAlt adds the alt to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetBody

func (o *UrlshortenerURLInsertParams) SetBody(body *models.URL)

SetBody adds the body to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetContext

func (o *UrlshortenerURLInsertParams) SetContext(ctx context.Context)

SetContext adds the context to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetFields

func (o *UrlshortenerURLInsertParams) SetFields(fields *string)

SetFields adds the fields to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetKey

func (o *UrlshortenerURLInsertParams) SetKey(key *string)

SetKey adds the key to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetOauthToken

func (o *UrlshortenerURLInsertParams) SetOauthToken(oauthToken *string)

SetOauthToken adds the oauthToken to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetPrettyPrint

func (o *UrlshortenerURLInsertParams) SetPrettyPrint(prettyPrint *bool)

SetPrettyPrint adds the prettyPrint to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetQuotaUser

func (o *UrlshortenerURLInsertParams) SetQuotaUser(quotaUser *string)

SetQuotaUser adds the quotaUser to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetTimeout

func (o *UrlshortenerURLInsertParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) SetUserIP

func (o *UrlshortenerURLInsertParams) SetUserIP(userIP *string)

SetUserIP adds the userIp to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithAlt

WithAlt adds the alt to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithBody

WithBody adds the body to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithContext

WithContext adds the context to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithFields

WithFields adds the fields to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithKey

WithKey adds the key to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithOauthToken

func (o *UrlshortenerURLInsertParams) WithOauthToken(oauthToken *string) *UrlshortenerURLInsertParams

WithOauthToken adds the oauthToken to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithPrettyPrint

func (o *UrlshortenerURLInsertParams) WithPrettyPrint(prettyPrint *bool) *UrlshortenerURLInsertParams

WithPrettyPrint adds the prettyPrint to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithQuotaUser

func (o *UrlshortenerURLInsertParams) WithQuotaUser(quotaUser *string) *UrlshortenerURLInsertParams

WithQuotaUser adds the quotaUser to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithTimeout

WithTimeout adds the timeout to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WithUserIP

WithUserIP adds the userIP to the urlshortener url insert params

func (*UrlshortenerURLInsertParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type UrlshortenerURLInsertReader

type UrlshortenerURLInsertReader struct {
	// contains filtered or unexported fields
}

UrlshortenerURLInsertReader is a Reader for the UrlshortenerURLInsert structure.

func (*UrlshortenerURLInsertReader) ReadResponse

func (o *UrlshortenerURLInsertReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type UrlshortenerURLListOK

type UrlshortenerURLListOK struct {
	Payload *models.URLHistory
}

UrlshortenerURLListOK handles this case with default header values.

Successful response

func NewUrlshortenerURLListOK

func NewUrlshortenerURLListOK() *UrlshortenerURLListOK

NewUrlshortenerURLListOK creates a UrlshortenerURLListOK with default headers values

func (*UrlshortenerURLListOK) Error

func (o *UrlshortenerURLListOK) Error() string

type UrlshortenerURLListParams

type UrlshortenerURLListParams struct {

	/*Alt
	  Data format for the response.

	*/
	Alt *string
	/*Fields
	  Selector specifying which fields to include in a partial response.

	*/
	Fields *string
	/*Key
	  API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

	*/
	Key *string
	/*OauthToken
	  OAuth 2.0 token for the current user.

	*/
	OauthToken *string
	/*PrettyPrint
	  Returns response with indentations and line breaks.

	*/
	PrettyPrint *bool
	/*Projection
	  Additional information to return.

	*/
	Projection *string
	/*QuotaUser
	  Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

	*/
	QuotaUser *string
	/*StartToken
	  Token for requesting successive pages of results.

	*/
	StartToken *string
	/*UserIP
	  IP address of the site where the request originates. Use this if you want to enforce per-user limits.

	*/
	UserIP *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

UrlshortenerURLListParams contains all the parameters to send to the API endpoint for the urlshortener url list operation typically these are written to a http.Request

func NewUrlshortenerURLListParams

func NewUrlshortenerURLListParams() *UrlshortenerURLListParams

NewUrlshortenerURLListParams creates a new UrlshortenerURLListParams object with the default values initialized.

func NewUrlshortenerURLListParamsWithContext

func NewUrlshortenerURLListParamsWithContext(ctx context.Context) *UrlshortenerURLListParams

NewUrlshortenerURLListParamsWithContext creates a new UrlshortenerURLListParams object with the default values initialized, and the ability to set a context for a request

func NewUrlshortenerURLListParamsWithTimeout

func NewUrlshortenerURLListParamsWithTimeout(timeout time.Duration) *UrlshortenerURLListParams

NewUrlshortenerURLListParamsWithTimeout creates a new UrlshortenerURLListParams object with the default values initialized, and the ability to set a timeout on a request

func (*UrlshortenerURLListParams) SetAlt

func (o *UrlshortenerURLListParams) SetAlt(alt *string)

SetAlt adds the alt to the urlshortener url list params

func (*UrlshortenerURLListParams) SetContext

func (o *UrlshortenerURLListParams) SetContext(ctx context.Context)

SetContext adds the context to the urlshortener url list params

func (*UrlshortenerURLListParams) SetFields

func (o *UrlshortenerURLListParams) SetFields(fields *string)

SetFields adds the fields to the urlshortener url list params

func (*UrlshortenerURLListParams) SetKey

func (o *UrlshortenerURLListParams) SetKey(key *string)

SetKey adds the key to the urlshortener url list params

func (*UrlshortenerURLListParams) SetOauthToken

func (o *UrlshortenerURLListParams) SetOauthToken(oauthToken *string)

SetOauthToken adds the oauthToken to the urlshortener url list params

func (*UrlshortenerURLListParams) SetPrettyPrint

func (o *UrlshortenerURLListParams) SetPrettyPrint(prettyPrint *bool)

SetPrettyPrint adds the prettyPrint to the urlshortener url list params

func (*UrlshortenerURLListParams) SetProjection

func (o *UrlshortenerURLListParams) SetProjection(projection *string)

SetProjection adds the projection to the urlshortener url list params

func (*UrlshortenerURLListParams) SetQuotaUser

func (o *UrlshortenerURLListParams) SetQuotaUser(quotaUser *string)

SetQuotaUser adds the quotaUser to the urlshortener url list params

func (*UrlshortenerURLListParams) SetStartToken

func (o *UrlshortenerURLListParams) SetStartToken(startToken *string)

SetStartToken adds the startToken to the urlshortener url list params

func (*UrlshortenerURLListParams) SetTimeout

func (o *UrlshortenerURLListParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the urlshortener url list params

func (*UrlshortenerURLListParams) SetUserIP

func (o *UrlshortenerURLListParams) SetUserIP(userIP *string)

SetUserIP adds the userIp to the urlshortener url list params

func (*UrlshortenerURLListParams) WithAlt

WithAlt adds the alt to the urlshortener url list params

func (*UrlshortenerURLListParams) WithContext

WithContext adds the context to the urlshortener url list params

func (*UrlshortenerURLListParams) WithFields

WithFields adds the fields to the urlshortener url list params

func (*UrlshortenerURLListParams) WithKey

WithKey adds the key to the urlshortener url list params

func (*UrlshortenerURLListParams) WithOauthToken

func (o *UrlshortenerURLListParams) WithOauthToken(oauthToken *string) *UrlshortenerURLListParams

WithOauthToken adds the oauthToken to the urlshortener url list params

func (*UrlshortenerURLListParams) WithPrettyPrint

func (o *UrlshortenerURLListParams) WithPrettyPrint(prettyPrint *bool) *UrlshortenerURLListParams

WithPrettyPrint adds the prettyPrint to the urlshortener url list params

func (*UrlshortenerURLListParams) WithProjection

func (o *UrlshortenerURLListParams) WithProjection(projection *string) *UrlshortenerURLListParams

WithProjection adds the projection to the urlshortener url list params

func (*UrlshortenerURLListParams) WithQuotaUser

func (o *UrlshortenerURLListParams) WithQuotaUser(quotaUser *string) *UrlshortenerURLListParams

WithQuotaUser adds the quotaUser to the urlshortener url list params

func (*UrlshortenerURLListParams) WithStartToken

func (o *UrlshortenerURLListParams) WithStartToken(startToken *string) *UrlshortenerURLListParams

WithStartToken adds the startToken to the urlshortener url list params

func (*UrlshortenerURLListParams) WithTimeout

WithTimeout adds the timeout to the urlshortener url list params

func (*UrlshortenerURLListParams) WithUserIP

WithUserIP adds the userIP to the urlshortener url list params

func (*UrlshortenerURLListParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type UrlshortenerURLListReader

type UrlshortenerURLListReader struct {
	// contains filtered or unexported fields
}

UrlshortenerURLListReader is a Reader for the UrlshortenerURLList structure.

func (*UrlshortenerURLListReader) ReadResponse

func (o *UrlshortenerURLListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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