suggestions

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 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 suggestions API

func (*Client) GetSuggestions

func (a *Client) GetSuggestions(params *GetSuggestionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSuggestionsOK, error)

GetSuggestions accounts that are promoted by staff or that the user has had past positive interactions with but is not yet following

THIS ENDPOINT IS CURRENTLY NOT FULLY IMPLEMENTED: it will always return an empty array.

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 {
	GetSuggestions(params *GetSuggestionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetSuggestionsOK, 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 suggestions API client.

func NewClientWithBasicAuth

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

New creates a new suggestions 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 suggestions 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.

type GetSuggestionsForbidden

type GetSuggestionsForbidden struct {
}

GetSuggestionsForbidden describes a response with status code 403, with default header values.

forbidden

func NewGetSuggestionsForbidden

func NewGetSuggestionsForbidden() *GetSuggestionsForbidden

NewGetSuggestionsForbidden creates a GetSuggestionsForbidden with default headers values

func (*GetSuggestionsForbidden) Code

func (o *GetSuggestionsForbidden) Code() int

Code gets the status code for the get suggestions forbidden response

func (*GetSuggestionsForbidden) Error

func (o *GetSuggestionsForbidden) Error() string

func (*GetSuggestionsForbidden) IsClientError

func (o *GetSuggestionsForbidden) IsClientError() bool

IsClientError returns true when this get suggestions forbidden response has a 4xx status code

func (*GetSuggestionsForbidden) IsCode

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

IsCode returns true when this get suggestions forbidden response a status code equal to that given

func (*GetSuggestionsForbidden) IsRedirect

func (o *GetSuggestionsForbidden) IsRedirect() bool

IsRedirect returns true when this get suggestions forbidden response has a 3xx status code

func (*GetSuggestionsForbidden) IsServerError

func (o *GetSuggestionsForbidden) IsServerError() bool

IsServerError returns true when this get suggestions forbidden response has a 5xx status code

func (*GetSuggestionsForbidden) IsSuccess

func (o *GetSuggestionsForbidden) IsSuccess() bool

IsSuccess returns true when this get suggestions forbidden response has a 2xx status code

func (*GetSuggestionsForbidden) String

func (o *GetSuggestionsForbidden) String() string

type GetSuggestionsNotAcceptable

type GetSuggestionsNotAcceptable struct {
}

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

not acceptable

func NewGetSuggestionsNotAcceptable

func NewGetSuggestionsNotAcceptable() *GetSuggestionsNotAcceptable

NewGetSuggestionsNotAcceptable creates a GetSuggestionsNotAcceptable with default headers values

func (*GetSuggestionsNotAcceptable) Code

func (o *GetSuggestionsNotAcceptable) Code() int

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

func (*GetSuggestionsNotAcceptable) Error

func (*GetSuggestionsNotAcceptable) IsClientError

func (o *GetSuggestionsNotAcceptable) IsClientError() bool

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

func (*GetSuggestionsNotAcceptable) IsCode

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

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

func (*GetSuggestionsNotAcceptable) IsRedirect

func (o *GetSuggestionsNotAcceptable) IsRedirect() bool

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

func (*GetSuggestionsNotAcceptable) IsServerError

func (o *GetSuggestionsNotAcceptable) IsServerError() bool

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

func (*GetSuggestionsNotAcceptable) IsSuccess

func (o *GetSuggestionsNotAcceptable) IsSuccess() bool

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

func (*GetSuggestionsNotAcceptable) String

func (o *GetSuggestionsNotAcceptable) String() string

type GetSuggestionsOK

type GetSuggestionsOK struct {
	Payload []any
}

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

GetSuggestionsOK get suggestions o k

func NewGetSuggestionsOK

func NewGetSuggestionsOK() *GetSuggestionsOK

NewGetSuggestionsOK creates a GetSuggestionsOK with default headers values

func (*GetSuggestionsOK) Code

func (o *GetSuggestionsOK) Code() int

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

func (*GetSuggestionsOK) Error

func (o *GetSuggestionsOK) Error() string

func (*GetSuggestionsOK) GetPayload

func (o *GetSuggestionsOK) GetPayload() []any

func (*GetSuggestionsOK) IsClientError

func (o *GetSuggestionsOK) IsClientError() bool

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

func (*GetSuggestionsOK) IsCode

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

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

func (*GetSuggestionsOK) IsRedirect

func (o *GetSuggestionsOK) IsRedirect() bool

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

func (*GetSuggestionsOK) IsServerError

func (o *GetSuggestionsOK) IsServerError() bool

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

func (*GetSuggestionsOK) IsSuccess

func (o *GetSuggestionsOK) IsSuccess() bool

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

func (*GetSuggestionsOK) String

func (o *GetSuggestionsOK) String() string

type GetSuggestionsParams

type GetSuggestionsParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetSuggestionsParams contains all the parameters to send to the API endpoint

for the get suggestions operation.

Typically these are written to a http.Request.

func NewGetSuggestionsParams

func NewGetSuggestionsParams() *GetSuggestionsParams

NewGetSuggestionsParams creates a new GetSuggestionsParams 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 NewGetSuggestionsParamsWithContext

func NewGetSuggestionsParamsWithContext(ctx context.Context) *GetSuggestionsParams

NewGetSuggestionsParamsWithContext creates a new GetSuggestionsParams object with the ability to set a context for a request.

func NewGetSuggestionsParamsWithHTTPClient

func NewGetSuggestionsParamsWithHTTPClient(client *http.Client) *GetSuggestionsParams

NewGetSuggestionsParamsWithHTTPClient creates a new GetSuggestionsParams object with the ability to set a custom HTTPClient for a request.

func NewGetSuggestionsParamsWithTimeout

func NewGetSuggestionsParamsWithTimeout(timeout time.Duration) *GetSuggestionsParams

NewGetSuggestionsParamsWithTimeout creates a new GetSuggestionsParams object with the ability to set a timeout on a request.

func (*GetSuggestionsParams) SetContext

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

SetContext adds the context to the get suggestions params

func (*GetSuggestionsParams) SetDefaults

func (o *GetSuggestionsParams) SetDefaults()

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

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

func (*GetSuggestionsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get suggestions params

func (*GetSuggestionsParams) SetTimeout

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

SetTimeout adds the timeout to the get suggestions params

func (*GetSuggestionsParams) WithContext

WithContext adds the context to the get suggestions params

func (*GetSuggestionsParams) WithDefaults

func (o *GetSuggestionsParams) WithDefaults() *GetSuggestionsParams

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

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

func (*GetSuggestionsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get suggestions params

func (*GetSuggestionsParams) WithTimeout

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

WithTimeout adds the timeout to the get suggestions params

func (*GetSuggestionsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetSuggestionsReader

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

GetSuggestionsReader is a Reader for the GetSuggestions structure.

func (*GetSuggestionsReader) ReadResponse

func (o *GetSuggestionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error)

ReadResponse reads a server response into the received o.

type GetSuggestionsUnauthorized

type GetSuggestionsUnauthorized struct {
}

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

unauthorized

func NewGetSuggestionsUnauthorized

func NewGetSuggestionsUnauthorized() *GetSuggestionsUnauthorized

NewGetSuggestionsUnauthorized creates a GetSuggestionsUnauthorized with default headers values

func (*GetSuggestionsUnauthorized) Code

func (o *GetSuggestionsUnauthorized) Code() int

Code gets the status code for the get suggestions unauthorized response

func (*GetSuggestionsUnauthorized) Error

func (*GetSuggestionsUnauthorized) IsClientError

func (o *GetSuggestionsUnauthorized) IsClientError() bool

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

func (*GetSuggestionsUnauthorized) IsCode

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

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

func (*GetSuggestionsUnauthorized) IsRedirect

func (o *GetSuggestionsUnauthorized) IsRedirect() bool

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

func (*GetSuggestionsUnauthorized) IsServerError

func (o *GetSuggestionsUnauthorized) IsServerError() bool

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

func (*GetSuggestionsUnauthorized) IsSuccess

func (o *GetSuggestionsUnauthorized) IsSuccess() bool

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

func (*GetSuggestionsUnauthorized) String

func (o *GetSuggestionsUnauthorized) String() string

Jump to

Keyboard shortcuts

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