blocks

package
v0.0.0-...-6bd88e3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: AGPL-3.0-or-later Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlocksGetBadRequest

type BlocksGetBadRequest struct {
}

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

bad request

func NewBlocksGetBadRequest

func NewBlocksGetBadRequest() *BlocksGetBadRequest

NewBlocksGetBadRequest creates a BlocksGetBadRequest with default headers values

func (*BlocksGetBadRequest) Code

func (o *BlocksGetBadRequest) Code() int

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

func (*BlocksGetBadRequest) Error

func (o *BlocksGetBadRequest) Error() string

func (*BlocksGetBadRequest) IsClientError

func (o *BlocksGetBadRequest) IsClientError() bool

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

func (*BlocksGetBadRequest) IsCode

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

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

func (*BlocksGetBadRequest) IsRedirect

func (o *BlocksGetBadRequest) IsRedirect() bool

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

func (*BlocksGetBadRequest) IsServerError

func (o *BlocksGetBadRequest) IsServerError() bool

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

func (*BlocksGetBadRequest) IsSuccess

func (o *BlocksGetBadRequest) IsSuccess() bool

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

func (*BlocksGetBadRequest) String

func (o *BlocksGetBadRequest) String() string

type BlocksGetInternalServerError

type BlocksGetInternalServerError struct {
}

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

internal server error

func NewBlocksGetInternalServerError

func NewBlocksGetInternalServerError() *BlocksGetInternalServerError

NewBlocksGetInternalServerError creates a BlocksGetInternalServerError with default headers values

func (*BlocksGetInternalServerError) Code

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

func (*BlocksGetInternalServerError) Error

func (*BlocksGetInternalServerError) IsClientError

func (o *BlocksGetInternalServerError) IsClientError() bool

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

func (*BlocksGetInternalServerError) IsCode

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

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

func (*BlocksGetInternalServerError) IsRedirect

func (o *BlocksGetInternalServerError) IsRedirect() bool

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

func (*BlocksGetInternalServerError) IsServerError

func (o *BlocksGetInternalServerError) IsServerError() bool

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

func (*BlocksGetInternalServerError) IsSuccess

func (o *BlocksGetInternalServerError) IsSuccess() bool

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

func (*BlocksGetInternalServerError) String

type BlocksGetNotAcceptable

type BlocksGetNotAcceptable struct {
}

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

not acceptable

func NewBlocksGetNotAcceptable

func NewBlocksGetNotAcceptable() *BlocksGetNotAcceptable

NewBlocksGetNotAcceptable creates a BlocksGetNotAcceptable with default headers values

func (*BlocksGetNotAcceptable) Code

func (o *BlocksGetNotAcceptable) Code() int

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

func (*BlocksGetNotAcceptable) Error

func (o *BlocksGetNotAcceptable) Error() string

func (*BlocksGetNotAcceptable) IsClientError

func (o *BlocksGetNotAcceptable) IsClientError() bool

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

func (*BlocksGetNotAcceptable) IsCode

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

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

func (*BlocksGetNotAcceptable) IsRedirect

func (o *BlocksGetNotAcceptable) IsRedirect() bool

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

func (*BlocksGetNotAcceptable) IsServerError

func (o *BlocksGetNotAcceptable) IsServerError() bool

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

func (*BlocksGetNotAcceptable) IsSuccess

func (o *BlocksGetNotAcceptable) IsSuccess() bool

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

func (*BlocksGetNotAcceptable) String

func (o *BlocksGetNotAcceptable) String() string

type BlocksGetNotFound

type BlocksGetNotFound struct {
}

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

not found

func NewBlocksGetNotFound

func NewBlocksGetNotFound() *BlocksGetNotFound

NewBlocksGetNotFound creates a BlocksGetNotFound with default headers values

func (*BlocksGetNotFound) Code

func (o *BlocksGetNotFound) Code() int

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

func (*BlocksGetNotFound) Error

func (o *BlocksGetNotFound) Error() string

func (*BlocksGetNotFound) IsClientError

func (o *BlocksGetNotFound) IsClientError() bool

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

func (*BlocksGetNotFound) IsCode

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

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

func (*BlocksGetNotFound) IsRedirect

func (o *BlocksGetNotFound) IsRedirect() bool

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

func (*BlocksGetNotFound) IsServerError

func (o *BlocksGetNotFound) IsServerError() bool

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

func (*BlocksGetNotFound) IsSuccess

func (o *BlocksGetNotFound) IsSuccess() bool

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

func (*BlocksGetNotFound) String

func (o *BlocksGetNotFound) String() string

type BlocksGetOK

type BlocksGetOK struct {

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

	Payload []*models.Account
}

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

BlocksGetOK blocks get o k

func NewBlocksGetOK

func NewBlocksGetOK() *BlocksGetOK

NewBlocksGetOK creates a BlocksGetOK with default headers values

func (*BlocksGetOK) Code

func (o *BlocksGetOK) Code() int

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

func (*BlocksGetOK) Error

func (o *BlocksGetOK) Error() string

func (*BlocksGetOK) GetPayload

func (o *BlocksGetOK) GetPayload() []*models.Account

func (*BlocksGetOK) IsClientError

func (o *BlocksGetOK) IsClientError() bool

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

func (*BlocksGetOK) IsCode

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

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

func (*BlocksGetOK) IsRedirect

func (o *BlocksGetOK) IsRedirect() bool

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

func (*BlocksGetOK) IsServerError

func (o *BlocksGetOK) IsServerError() bool

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

func (*BlocksGetOK) IsSuccess

func (o *BlocksGetOK) IsSuccess() bool

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

func (*BlocksGetOK) String

func (o *BlocksGetOK) String() string

type BlocksGetParams

type BlocksGetParams struct {

	/* Limit.

	   Number of blocked accounts to return.

	   Default: 40
	*/
	Limit *int64

	/* MaxID.

	   Return only blocked accounts *OLDER* than the given max ID. The blocked account with the specified ID will not be included in the response. NOTE: the ID is of the internal block, NOT any of the returned accounts.
	*/
	MaxID *string

	/* MinID.

	   Return only blocked accounts *IMMEDIATELY NEWER* than the given min ID. The blocked account with the specified ID will not be included in the response. NOTE: the ID is of the internal block, NOT any of the returned accounts.
	*/
	MinID *string

	/* SinceID.

	   Return only blocked accounts *NEWER* than the given since ID. The blocked account with the specified ID will not be included in the response. NOTE: the ID is of the internal block, NOT any of the returned accounts.
	*/
	SinceID *string

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

BlocksGetParams contains all the parameters to send to the API endpoint

for the blocks get operation.

Typically these are written to a http.Request.

func NewBlocksGetParams

func NewBlocksGetParams() *BlocksGetParams

NewBlocksGetParams creates a new BlocksGetParams 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 NewBlocksGetParamsWithContext

func NewBlocksGetParamsWithContext(ctx context.Context) *BlocksGetParams

NewBlocksGetParamsWithContext creates a new BlocksGetParams object with the ability to set a context for a request.

func NewBlocksGetParamsWithHTTPClient

func NewBlocksGetParamsWithHTTPClient(client *http.Client) *BlocksGetParams

NewBlocksGetParamsWithHTTPClient creates a new BlocksGetParams object with the ability to set a custom HTTPClient for a request.

func NewBlocksGetParamsWithTimeout

func NewBlocksGetParamsWithTimeout(timeout time.Duration) *BlocksGetParams

NewBlocksGetParamsWithTimeout creates a new BlocksGetParams object with the ability to set a timeout on a request.

func (*BlocksGetParams) SetContext

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

SetContext adds the context to the blocks get params

func (*BlocksGetParams) SetDefaults

func (o *BlocksGetParams) SetDefaults()

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

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

func (*BlocksGetParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the blocks get params

func (*BlocksGetParams) SetLimit

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

SetLimit adds the limit to the blocks get params

func (*BlocksGetParams) SetMaxID

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

SetMaxID adds the maxId to the blocks get params

func (*BlocksGetParams) SetMinID

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

SetMinID adds the minId to the blocks get params

func (*BlocksGetParams) SetSinceID

func (o *BlocksGetParams) SetSinceID(sinceID *string)

SetSinceID adds the sinceId to the blocks get params

func (*BlocksGetParams) SetTimeout

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

SetTimeout adds the timeout to the blocks get params

func (*BlocksGetParams) WithContext

func (o *BlocksGetParams) WithContext(ctx context.Context) *BlocksGetParams

WithContext adds the context to the blocks get params

func (*BlocksGetParams) WithDefaults

func (o *BlocksGetParams) WithDefaults() *BlocksGetParams

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

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

func (*BlocksGetParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the blocks get params

func (*BlocksGetParams) WithLimit

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

WithLimit adds the limit to the blocks get params

func (*BlocksGetParams) WithMaxID

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

WithMaxID adds the maxID to the blocks get params

func (*BlocksGetParams) WithMinID

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

WithMinID adds the minID to the blocks get params

func (*BlocksGetParams) WithSinceID

func (o *BlocksGetParams) WithSinceID(sinceID *string) *BlocksGetParams

WithSinceID adds the sinceID to the blocks get params

func (*BlocksGetParams) WithTimeout

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

WithTimeout adds the timeout to the blocks get params

func (*BlocksGetParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type BlocksGetReader

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

BlocksGetReader is a Reader for the BlocksGet structure.

func (*BlocksGetReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type BlocksGetUnauthorized

type BlocksGetUnauthorized struct {
}

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

unauthorized

func NewBlocksGetUnauthorized

func NewBlocksGetUnauthorized() *BlocksGetUnauthorized

NewBlocksGetUnauthorized creates a BlocksGetUnauthorized with default headers values

func (*BlocksGetUnauthorized) Code

func (o *BlocksGetUnauthorized) Code() int

Code gets the status code for the blocks get unauthorized response

func (*BlocksGetUnauthorized) Error

func (o *BlocksGetUnauthorized) Error() string

func (*BlocksGetUnauthorized) IsClientError

func (o *BlocksGetUnauthorized) IsClientError() bool

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

func (*BlocksGetUnauthorized) IsCode

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

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

func (*BlocksGetUnauthorized) IsRedirect

func (o *BlocksGetUnauthorized) IsRedirect() bool

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

func (*BlocksGetUnauthorized) IsServerError

func (o *BlocksGetUnauthorized) IsServerError() bool

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

func (*BlocksGetUnauthorized) IsSuccess

func (o *BlocksGetUnauthorized) IsSuccess() bool

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

func (*BlocksGetUnauthorized) String

func (o *BlocksGetUnauthorized) String() string

type Client

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

Client for blocks API

func (*Client) BlocksGet

func (a *Client) BlocksGet(params *BlocksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BlocksGetOK, error)
BlocksGet gets an array of accounts that requesting account has blocked

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

Example:

``` <https://example.org/api/v1/blocks?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/blocks?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 may be used to customize the behavior of Client methods.

type ClientService

type ClientService interface {
	BlocksGet(params *BlocksGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BlocksGetOK, 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 blocks API client.

func NewClientWithBasicAuth

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new blocks API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new blocks API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

Jump to

Keyboard shortcuts

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