favourites

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: AGPL-3.0 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 favourites API

func (*Client) FavouritesGet

func (a *Client) FavouritesGet(params *FavouritesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FavouritesGetOK, error)
FavouritesGet gets an array of statuses that the requesting account has favourited

The next and previous queries can be parsed from the returned Link header.

Example:

``` <https://example.org/api/v1/favourites?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/favourites?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev" ````

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	FavouritesGet(params *FavouritesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*FavouritesGetOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

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

New creates a new favourites API client.

type FavouritesGetBadRequest

type FavouritesGetBadRequest struct {
}

FavouritesGetBadRequest describes a response with status code 400, with default header values.

bad request

func NewFavouritesGetBadRequest

func NewFavouritesGetBadRequest() *FavouritesGetBadRequest

NewFavouritesGetBadRequest creates a FavouritesGetBadRequest with default headers values

func (*FavouritesGetBadRequest) Code

func (o *FavouritesGetBadRequest) Code() int

Code gets the status code for the favourites get bad request response

func (*FavouritesGetBadRequest) Error

func (o *FavouritesGetBadRequest) Error() string

func (*FavouritesGetBadRequest) IsClientError

func (o *FavouritesGetBadRequest) IsClientError() bool

IsClientError returns true when this favourites get bad request response has a 4xx status code

func (*FavouritesGetBadRequest) IsCode

func (o *FavouritesGetBadRequest) IsCode(code int) bool

IsCode returns true when this favourites get bad request response a status code equal to that given

func (*FavouritesGetBadRequest) IsRedirect

func (o *FavouritesGetBadRequest) IsRedirect() bool

IsRedirect returns true when this favourites get bad request response has a 3xx status code

func (*FavouritesGetBadRequest) IsServerError

func (o *FavouritesGetBadRequest) IsServerError() bool

IsServerError returns true when this favourites get bad request response has a 5xx status code

func (*FavouritesGetBadRequest) IsSuccess

func (o *FavouritesGetBadRequest) IsSuccess() bool

IsSuccess returns true when this favourites get bad request response has a 2xx status code

func (*FavouritesGetBadRequest) String

func (o *FavouritesGetBadRequest) String() string

type FavouritesGetInternalServerError

type FavouritesGetInternalServerError struct {
}

FavouritesGetInternalServerError describes a response with status code 500, with default header values.

internal server error

func NewFavouritesGetInternalServerError

func NewFavouritesGetInternalServerError() *FavouritesGetInternalServerError

NewFavouritesGetInternalServerError creates a FavouritesGetInternalServerError with default headers values

func (*FavouritesGetInternalServerError) Code

Code gets the status code for the favourites get internal server error response

func (*FavouritesGetInternalServerError) Error

func (*FavouritesGetInternalServerError) IsClientError

func (o *FavouritesGetInternalServerError) IsClientError() bool

IsClientError returns true when this favourites get internal server error response has a 4xx status code

func (*FavouritesGetInternalServerError) IsCode

func (o *FavouritesGetInternalServerError) IsCode(code int) bool

IsCode returns true when this favourites get internal server error response a status code equal to that given

func (*FavouritesGetInternalServerError) IsRedirect

func (o *FavouritesGetInternalServerError) IsRedirect() bool

IsRedirect returns true when this favourites get internal server error response has a 3xx status code

func (*FavouritesGetInternalServerError) IsServerError

func (o *FavouritesGetInternalServerError) IsServerError() bool

IsServerError returns true when this favourites get internal server error response has a 5xx status code

func (*FavouritesGetInternalServerError) IsSuccess

func (o *FavouritesGetInternalServerError) IsSuccess() bool

IsSuccess returns true when this favourites get internal server error response has a 2xx status code

func (*FavouritesGetInternalServerError) String

type FavouritesGetNotAcceptable

type FavouritesGetNotAcceptable struct {
}

FavouritesGetNotAcceptable describes a response with status code 406, with default header values.

not acceptable

func NewFavouritesGetNotAcceptable

func NewFavouritesGetNotAcceptable() *FavouritesGetNotAcceptable

NewFavouritesGetNotAcceptable creates a FavouritesGetNotAcceptable with default headers values

func (*FavouritesGetNotAcceptable) Code

func (o *FavouritesGetNotAcceptable) Code() int

Code gets the status code for the favourites get not acceptable response

func (*FavouritesGetNotAcceptable) Error

func (*FavouritesGetNotAcceptable) IsClientError

func (o *FavouritesGetNotAcceptable) IsClientError() bool

IsClientError returns true when this favourites get not acceptable response has a 4xx status code

func (*FavouritesGetNotAcceptable) IsCode

func (o *FavouritesGetNotAcceptable) IsCode(code int) bool

IsCode returns true when this favourites get not acceptable response a status code equal to that given

func (*FavouritesGetNotAcceptable) IsRedirect

func (o *FavouritesGetNotAcceptable) IsRedirect() bool

IsRedirect returns true when this favourites get not acceptable response has a 3xx status code

func (*FavouritesGetNotAcceptable) IsServerError

func (o *FavouritesGetNotAcceptable) IsServerError() bool

IsServerError returns true when this favourites get not acceptable response has a 5xx status code

func (*FavouritesGetNotAcceptable) IsSuccess

func (o *FavouritesGetNotAcceptable) IsSuccess() bool

IsSuccess returns true when this favourites get not acceptable response has a 2xx status code

func (*FavouritesGetNotAcceptable) String

func (o *FavouritesGetNotAcceptable) String() string

type FavouritesGetNotFound

type FavouritesGetNotFound struct {
}

FavouritesGetNotFound describes a response with status code 404, with default header values.

not found

func NewFavouritesGetNotFound

func NewFavouritesGetNotFound() *FavouritesGetNotFound

NewFavouritesGetNotFound creates a FavouritesGetNotFound with default headers values

func (*FavouritesGetNotFound) Code

func (o *FavouritesGetNotFound) Code() int

Code gets the status code for the favourites get not found response

func (*FavouritesGetNotFound) Error

func (o *FavouritesGetNotFound) Error() string

func (*FavouritesGetNotFound) IsClientError

func (o *FavouritesGetNotFound) IsClientError() bool

IsClientError returns true when this favourites get not found response has a 4xx status code

func (*FavouritesGetNotFound) IsCode

func (o *FavouritesGetNotFound) IsCode(code int) bool

IsCode returns true when this favourites get not found response a status code equal to that given

func (*FavouritesGetNotFound) IsRedirect

func (o *FavouritesGetNotFound) IsRedirect() bool

IsRedirect returns true when this favourites get not found response has a 3xx status code

func (*FavouritesGetNotFound) IsServerError

func (o *FavouritesGetNotFound) IsServerError() bool

IsServerError returns true when this favourites get not found response has a 5xx status code

func (*FavouritesGetNotFound) IsSuccess

func (o *FavouritesGetNotFound) IsSuccess() bool

IsSuccess returns true when this favourites get not found response has a 2xx status code

func (*FavouritesGetNotFound) String

func (o *FavouritesGetNotFound) String() string

type FavouritesGetOK

type FavouritesGetOK struct {

	/* Links to the next and previous queries.
	 */
	Link string

	Payload []*models.Status
}

FavouritesGetOK describes a response with status code 200, with default header values.

FavouritesGetOK favourites get o k

func NewFavouritesGetOK

func NewFavouritesGetOK() *FavouritesGetOK

NewFavouritesGetOK creates a FavouritesGetOK with default headers values

func (*FavouritesGetOK) Code

func (o *FavouritesGetOK) Code() int

Code gets the status code for the favourites get o k response

func (*FavouritesGetOK) Error

func (o *FavouritesGetOK) Error() string

func (*FavouritesGetOK) GetPayload

func (o *FavouritesGetOK) GetPayload() []*models.Status

func (*FavouritesGetOK) IsClientError

func (o *FavouritesGetOK) IsClientError() bool

IsClientError returns true when this favourites get o k response has a 4xx status code

func (*FavouritesGetOK) IsCode

func (o *FavouritesGetOK) IsCode(code int) bool

IsCode returns true when this favourites get o k response a status code equal to that given

func (*FavouritesGetOK) IsRedirect

func (o *FavouritesGetOK) IsRedirect() bool

IsRedirect returns true when this favourites get o k response has a 3xx status code

func (*FavouritesGetOK) IsServerError

func (o *FavouritesGetOK) IsServerError() bool

IsServerError returns true when this favourites get o k response has a 5xx status code

func (*FavouritesGetOK) IsSuccess

func (o *FavouritesGetOK) IsSuccess() bool

IsSuccess returns true when this favourites get o k response has a 2xx status code

func (*FavouritesGetOK) String

func (o *FavouritesGetOK) String() string

type FavouritesGetParams

type FavouritesGetParams struct {

	/* Limit.

	   Number of statuses to return.

	   Default: 20
	*/
	Limit *int64

	/* MaxID.

	   Return only favourited statuses *OLDER* than the given favourite ID. The status with the corresponding fave ID will not be included in the response.
	*/
	MaxID *string

	/* MinID.

	   Return only favourited statuses *NEWER* than the given favourite ID. The status with the corresponding fave ID will not be included in the response.
	*/
	MinID *string

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

FavouritesGetParams contains all the parameters to send to the API endpoint

for the favourites get operation.

Typically these are written to a http.Request.

func NewFavouritesGetParams

func NewFavouritesGetParams() *FavouritesGetParams

NewFavouritesGetParams creates a new FavouritesGetParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewFavouritesGetParamsWithContext

func NewFavouritesGetParamsWithContext(ctx context.Context) *FavouritesGetParams

NewFavouritesGetParamsWithContext creates a new FavouritesGetParams object with the ability to set a context for a request.

func NewFavouritesGetParamsWithHTTPClient

func NewFavouritesGetParamsWithHTTPClient(client *http.Client) *FavouritesGetParams

NewFavouritesGetParamsWithHTTPClient creates a new FavouritesGetParams object with the ability to set a custom HTTPClient for a request.

func NewFavouritesGetParamsWithTimeout

func NewFavouritesGetParamsWithTimeout(timeout time.Duration) *FavouritesGetParams

NewFavouritesGetParamsWithTimeout creates a new FavouritesGetParams object with the ability to set a timeout on a request.

func (*FavouritesGetParams) SetContext

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

SetContext adds the context to the favourites get params

func (*FavouritesGetParams) SetDefaults

func (o *FavouritesGetParams) SetDefaults()

SetDefaults hydrates default values in the favourites get params (not the query body).

All values with no default are reset to their zero value.

func (*FavouritesGetParams) SetHTTPClient

func (o *FavouritesGetParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the favourites get params

func (*FavouritesGetParams) SetLimit

func (o *FavouritesGetParams) SetLimit(limit *int64)

SetLimit adds the limit to the favourites get params

func (*FavouritesGetParams) SetMaxID

func (o *FavouritesGetParams) SetMaxID(maxID *string)

SetMaxID adds the maxId to the favourites get params

func (*FavouritesGetParams) SetMinID

func (o *FavouritesGetParams) SetMinID(minID *string)

SetMinID adds the minId to the favourites get params

func (*FavouritesGetParams) SetTimeout

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

SetTimeout adds the timeout to the favourites get params

func (*FavouritesGetParams) WithContext

WithContext adds the context to the favourites get params

func (*FavouritesGetParams) WithDefaults

func (o *FavouritesGetParams) WithDefaults() *FavouritesGetParams

WithDefaults hydrates default values in the favourites get params (not the query body).

All values with no default are reset to their zero value.

func (*FavouritesGetParams) WithHTTPClient

func (o *FavouritesGetParams) WithHTTPClient(client *http.Client) *FavouritesGetParams

WithHTTPClient adds the HTTPClient to the favourites get params

func (*FavouritesGetParams) WithLimit

func (o *FavouritesGetParams) WithLimit(limit *int64) *FavouritesGetParams

WithLimit adds the limit to the favourites get params

func (*FavouritesGetParams) WithMaxID

func (o *FavouritesGetParams) WithMaxID(maxID *string) *FavouritesGetParams

WithMaxID adds the maxID to the favourites get params

func (*FavouritesGetParams) WithMinID

func (o *FavouritesGetParams) WithMinID(minID *string) *FavouritesGetParams

WithMinID adds the minID to the favourites get params

func (*FavouritesGetParams) WithTimeout

func (o *FavouritesGetParams) WithTimeout(timeout time.Duration) *FavouritesGetParams

WithTimeout adds the timeout to the favourites get params

func (*FavouritesGetParams) WriteToRequest

func (o *FavouritesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type FavouritesGetReader

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

FavouritesGetReader is a Reader for the FavouritesGet structure.

func (*FavouritesGetReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type FavouritesGetUnauthorized

type FavouritesGetUnauthorized struct {
}

FavouritesGetUnauthorized describes a response with status code 401, with default header values.

unauthorized

func NewFavouritesGetUnauthorized

func NewFavouritesGetUnauthorized() *FavouritesGetUnauthorized

NewFavouritesGetUnauthorized creates a FavouritesGetUnauthorized with default headers values

func (*FavouritesGetUnauthorized) Code

func (o *FavouritesGetUnauthorized) Code() int

Code gets the status code for the favourites get unauthorized response

func (*FavouritesGetUnauthorized) Error

func (o *FavouritesGetUnauthorized) Error() string

func (*FavouritesGetUnauthorized) IsClientError

func (o *FavouritesGetUnauthorized) IsClientError() bool

IsClientError returns true when this favourites get unauthorized response has a 4xx status code

func (*FavouritesGetUnauthorized) IsCode

func (o *FavouritesGetUnauthorized) IsCode(code int) bool

IsCode returns true when this favourites get unauthorized response a status code equal to that given

func (*FavouritesGetUnauthorized) IsRedirect

func (o *FavouritesGetUnauthorized) IsRedirect() bool

IsRedirect returns true when this favourites get unauthorized response has a 3xx status code

func (*FavouritesGetUnauthorized) IsServerError

func (o *FavouritesGetUnauthorized) IsServerError() bool

IsServerError returns true when this favourites get unauthorized response has a 5xx status code

func (*FavouritesGetUnauthorized) IsSuccess

func (o *FavouritesGetUnauthorized) IsSuccess() bool

IsSuccess returns true when this favourites get unauthorized response has a 2xx status code

func (*FavouritesGetUnauthorized) String

func (o *FavouritesGetUnauthorized) String() string

Jump to

Keyboard shortcuts

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