Documentation
¶
Overview ¶
Package recallyclient is the generated + hand-rolled HTTP client for the recally REST API. The generated client lives in client_gen.go; this file adds small ergonomics on top: bearer auth, JSON decoding, and a constructor that reads ANNA_TOKEN/ANNA_SERVER_URL from the environment.
Package recallyclient provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- Constants
- func DecodeJSON(resp *http.Response, out any) error
- func NewCreateFeedRequest(server string, body CreateFeedJSONRequestBody) (*http.Request, error)
- func NewCreateFeedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteArticleRequest(server string, id string) (*http.Request, error)
- func NewDeleteFeedRequest(server string, id string) (*http.Request, error)
- func NewGetArticleRequest(server string, id string, params *GetArticleParams) (*http.Request, error)
- func NewGetDigestRequest(server string) (*http.Request, error)
- func NewGetFeedRequest(server string, id string) (*http.Request, error)
- func NewListArticlesRequest(server string, params *ListArticlesParams) (*http.Request, error)
- func NewListFeedEntriesRequest(server string, feedId string, params *ListFeedEntriesParams) (*http.Request, error)
- func NewListFeedsRequest(server string, params *ListFeedsParams) (*http.Request, error)
- func NewPollFeedRequest(server string, id string, params *PollFeedParams) (*http.Request, error)
- func NewSaveArticleRequest(server string, body SaveArticleJSONRequestBody) (*http.Request, error)
- func NewSaveArticleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateArticleRequest(server string, id string, body UpdateArticleJSONRequestBody) (*http.Request, error)
- func NewUpdateArticleRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateFeedEntryRequest(server string, feedId string, id string, body UpdateFeedEntryJSONRequestBody) (*http.Request, error)
- func NewUpdateFeedEntryRequestWithBody(server string, feedId string, id string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateFeedRequest(server string, id string, body UpdateFeedJSONRequestBody) (*http.Request, error)
- func NewUpdateFeedRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- func Ptr[T any](v T) *T
- type Article
- type ArticleList
- type ArticleStatus
- type BadRequest
- type Client
- func (c *Client) CreateFeed(ctx context.Context, body CreateFeedJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateFeedWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteArticle(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteFeed(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetArticle(ctx context.Context, id string, params *GetArticleParams, ...) (*http.Response, error)
- func (c *Client) GetDigest(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetFeed(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListArticles(ctx context.Context, params *ListArticlesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListFeedEntries(ctx context.Context, feedId string, params *ListFeedEntriesParams, ...) (*http.Response, error)
- func (c *Client) ListFeeds(ctx context.Context, params *ListFeedsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PollFeed(ctx context.Context, id string, params *PollFeedParams, ...) (*http.Response, error)
- func (c *Client) SaveArticle(ctx context.Context, body SaveArticleJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SaveArticleWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateArticle(ctx context.Context, id string, body UpdateArticleJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateArticleWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateFeed(ctx context.Context, id string, body UpdateFeedJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateFeedEntry(ctx context.Context, feedId string, id string, ...) (*http.Response, error)
- func (c *Client) UpdateFeedEntryWithBody(ctx context.Context, feedId string, id string, contentType string, ...) (*http.Response, error)
- func (c *Client) UpdateFeedWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateFeedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateFeedResponse, error)
- func (c *ClientWithResponses) CreateFeedWithResponse(ctx context.Context, body CreateFeedJSONRequestBody, ...) (*CreateFeedResponse, error)
- func (c *ClientWithResponses) DeleteArticleWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteArticleResponse, error)
- func (c *ClientWithResponses) DeleteFeedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteFeedResponse, error)
- func (c *ClientWithResponses) GetArticleWithResponse(ctx context.Context, id string, params *GetArticleParams, ...) (*GetArticleResponse, error)
- func (c *ClientWithResponses) GetDigestWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDigestResponse, error)
- func (c *ClientWithResponses) GetFeedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetFeedResponse, error)
- func (c *ClientWithResponses) ListArticlesWithResponse(ctx context.Context, params *ListArticlesParams, reqEditors ...RequestEditorFn) (*ListArticlesResponse, error)
- func (c *ClientWithResponses) ListFeedEntriesWithResponse(ctx context.Context, feedId string, params *ListFeedEntriesParams, ...) (*ListFeedEntriesResponse, error)
- func (c *ClientWithResponses) ListFeedsWithResponse(ctx context.Context, params *ListFeedsParams, reqEditors ...RequestEditorFn) (*ListFeedsResponse, error)
- func (c *ClientWithResponses) PollFeedWithResponse(ctx context.Context, id string, params *PollFeedParams, ...) (*PollFeedResponse, error)
- func (c *ClientWithResponses) SaveArticleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SaveArticleResponse, error)
- func (c *ClientWithResponses) SaveArticleWithResponse(ctx context.Context, body SaveArticleJSONRequestBody, ...) (*SaveArticleResponse, error)
- func (c *ClientWithResponses) UpdateArticleWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*UpdateArticleResponse, error)
- func (c *ClientWithResponses) UpdateArticleWithResponse(ctx context.Context, id string, body UpdateArticleJSONRequestBody, ...) (*UpdateArticleResponse, error)
- func (c *ClientWithResponses) UpdateFeedEntryWithBodyWithResponse(ctx context.Context, feedId string, id string, contentType string, ...) (*UpdateFeedEntryResponse, error)
- func (c *ClientWithResponses) UpdateFeedEntryWithResponse(ctx context.Context, feedId string, id string, ...) (*UpdateFeedEntryResponse, error)
- func (c *ClientWithResponses) UpdateFeedWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*UpdateFeedResponse, error)
- func (c *ClientWithResponses) UpdateFeedWithResponse(ctx context.Context, id string, body UpdateFeedJSONRequestBody, ...) (*UpdateFeedResponse, error)
- type ClientWithResponsesInterface
- type CreateFeedJSONRequestBody
- type CreateFeedRequest
- type CreateFeedResponse
- type DeleteArticleResponse
- type DeleteFeedResponse
- type Digest
- type Error
- type Feed
- type FeedEntry
- type FeedEntryList
- type FeedEntryStatus
- type FeedList
- type FeedPollResult
- type GetArticleParams
- type GetArticleResponse
- type GetDigestResponse
- type GetFeedResponse
- type HttpRequestDoer
- type ListArticlesParams
- type ListArticlesResponse
- type ListFeedEntriesParams
- type ListFeedEntriesResponse
- type ListFeedsParams
- type ListFeedsResponse
- type NotFound
- type PollFeedParams
- type PollFeedResponse
- type RequestEditorFn
- type SaveArticleJSONRequestBody
- type SaveArticleRequest
- type SaveArticleResponse
- type SourceType
- type TagCount
- type Unauthorized
- type UpdateArticleJSONRequestBody
- type UpdateArticleRequest
- type UpdateArticleResponse
- type UpdateFeedEntryJSONRequestBody
- type UpdateFeedEntryRequest
- type UpdateFeedEntryResponse
- type UpdateFeedJSONRequestBody
- type UpdateFeedRequest
- type UpdateFeedResponse
Constants ¶
const (
BearerAuthScopes bearerAuthContextKey = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func DecodeJSON ¶
DecodeJSON reads the response body, decodes JSON into out, and converts non-2xx responses into an error carrying the API error message.
func NewCreateFeedRequest ¶
func NewCreateFeedRequest(server string, body CreateFeedJSONRequestBody) (*http.Request, error)
NewCreateFeedRequest calls the generic CreateFeed builder with application/json body
func NewCreateFeedRequestWithBody ¶
func NewCreateFeedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateFeedRequestWithBody generates requests for CreateFeed with any type of body
func NewDeleteArticleRequest ¶
NewDeleteArticleRequest generates requests for DeleteArticle
func NewDeleteFeedRequest ¶
NewDeleteFeedRequest generates requests for DeleteFeed
func NewGetArticleRequest ¶
func NewGetArticleRequest(server string, id string, params *GetArticleParams) (*http.Request, error)
NewGetArticleRequest generates requests for GetArticle
func NewGetDigestRequest ¶
NewGetDigestRequest generates requests for GetDigest
func NewGetFeedRequest ¶
NewGetFeedRequest generates requests for GetFeed
func NewListArticlesRequest ¶
func NewListArticlesRequest(server string, params *ListArticlesParams) (*http.Request, error)
NewListArticlesRequest generates requests for ListArticles
func NewListFeedEntriesRequest ¶
func NewListFeedEntriesRequest(server string, feedId string, params *ListFeedEntriesParams) (*http.Request, error)
NewListFeedEntriesRequest generates requests for ListFeedEntries
func NewListFeedsRequest ¶
func NewListFeedsRequest(server string, params *ListFeedsParams) (*http.Request, error)
NewListFeedsRequest generates requests for ListFeeds
func NewPollFeedRequest ¶
NewPollFeedRequest generates requests for PollFeed
func NewSaveArticleRequest ¶
func NewSaveArticleRequest(server string, body SaveArticleJSONRequestBody) (*http.Request, error)
NewSaveArticleRequest calls the generic SaveArticle builder with application/json body
func NewSaveArticleRequestWithBody ¶
func NewSaveArticleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSaveArticleRequestWithBody generates requests for SaveArticle with any type of body
func NewUpdateArticleRequest ¶
func NewUpdateArticleRequest(server string, id string, body UpdateArticleJSONRequestBody) (*http.Request, error)
NewUpdateArticleRequest calls the generic UpdateArticle builder with application/json body
func NewUpdateArticleRequestWithBody ¶
func NewUpdateArticleRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateArticleRequestWithBody generates requests for UpdateArticle with any type of body
func NewUpdateFeedEntryRequest ¶
func NewUpdateFeedEntryRequest(server string, feedId string, id string, body UpdateFeedEntryJSONRequestBody) (*http.Request, error)
NewUpdateFeedEntryRequest calls the generic UpdateFeedEntry builder with application/json body
func NewUpdateFeedEntryRequestWithBody ¶
func NewUpdateFeedEntryRequestWithBody(server string, feedId string, id string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateFeedEntryRequestWithBody generates requests for UpdateFeedEntry with any type of body
func NewUpdateFeedRequest ¶
func NewUpdateFeedRequest(server string, id string, body UpdateFeedJSONRequestBody) (*http.Request, error)
NewUpdateFeedRequest calls the generic UpdateFeed builder with application/json body
Types ¶
type Article ¶
type Article struct {
AgentId *string `json:"agent_id,omitempty"`
Author *string `json:"author,omitempty"`
CanonicalUrl string `json:"canonical_url"`
// Content Article body in markdown. Returned only when ?include=content is set.
Content *string `json:"content,omitempty"`
CreatedAt time.Time `json:"created_at"`
FilePath string `json:"file_path"`
Id string `json:"id"`
Metadata *map[string]string `json:"metadata,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
ReadAt *time.Time `json:"read_at,omitempty"`
SavedAt time.Time `json:"saved_at"`
SourceType SourceType `json:"source_type"`
Starred bool `json:"starred"`
Status ArticleStatus `json:"status"`
Summary *string `json:"summary,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
Article defines model for Article.
type ArticleList ¶
type ArticleList struct {
Items []Article `json:"items"`
}
ArticleList defines model for ArticleList.
type ArticleStatus ¶
type ArticleStatus string
ArticleStatus defines model for ArticleStatus.
const ( Archived ArticleStatus = "archived" Read ArticleStatus = "read" Unread ArticleStatus = "unread" )
Defines values for ArticleStatus.
func (ArticleStatus) Valid ¶
func (e ArticleStatus) Valid() bool
Valid indicates whether the value is a known member of the ArticleStatus enum.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func NewFromEnv ¶
func NewFromEnv(extra ...ClientOption) (*Client, error)
NewFromEnv builds a Client pointed at config.ServerURL() and authenticated with ANNA_TOKEN. Returns an error if ANNA_TOKEN is unset.
func (*Client) CreateFeed ¶
func (c *Client) CreateFeed(ctx context.Context, body CreateFeedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateFeedWithBody ¶
func (*Client) DeleteArticle ¶
func (*Client) DeleteFeed ¶
func (*Client) GetArticle ¶
func (c *Client) GetArticle(ctx context.Context, id string, params *GetArticleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListArticles ¶
func (c *Client) ListArticles(ctx context.Context, params *ListArticlesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListFeedEntries ¶
func (c *Client) ListFeedEntries(ctx context.Context, feedId string, params *ListFeedEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListFeeds ¶
func (c *Client) ListFeeds(ctx context.Context, params *ListFeedsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PollFeed ¶
func (c *Client) PollFeed(ctx context.Context, id string, params *PollFeedParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SaveArticle ¶
func (c *Client) SaveArticle(ctx context.Context, body SaveArticleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SaveArticleWithBody ¶
func (*Client) UpdateArticle ¶
func (c *Client) UpdateArticle(ctx context.Context, id string, body UpdateArticleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateArticleWithBody ¶
func (*Client) UpdateFeed ¶
func (c *Client) UpdateFeed(ctx context.Context, id string, body UpdateFeedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateFeedEntry ¶
func (c *Client) UpdateFeedEntry(ctx context.Context, feedId string, id string, body UpdateFeedEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateFeedEntryWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// ListArticles request
ListArticles(ctx context.Context, params *ListArticlesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// SaveArticleWithBody request with any body
SaveArticleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
SaveArticle(ctx context.Context, body SaveArticleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteArticle request
DeleteArticle(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetArticle request
GetArticle(ctx context.Context, id string, params *GetArticleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateArticleWithBody request with any body
UpdateArticleWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateArticle(ctx context.Context, id string, body UpdateArticleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetDigest request
GetDigest(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListFeeds request
ListFeeds(ctx context.Context, params *ListFeedsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateFeedWithBody request with any body
CreateFeedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateFeed(ctx context.Context, body CreateFeedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListFeedEntries request
ListFeedEntries(ctx context.Context, feedId string, params *ListFeedEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateFeedEntryWithBody request with any body
UpdateFeedEntryWithBody(ctx context.Context, feedId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateFeedEntry(ctx context.Context, feedId string, id string, body UpdateFeedEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteFeed request
DeleteFeed(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetFeed request
GetFeed(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateFeedWithBody request with any body
UpdateFeedWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateFeed(ctx context.Context, id string, body UpdateFeedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PollFeed request
PollFeed(ctx context.Context, id string, params *PollFeedParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateFeedWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateFeedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFeedResponse, error)
CreateFeedWithBodyWithResponse request with arbitrary body returning *CreateFeedResponse
func (*ClientWithResponses) CreateFeedWithResponse ¶
func (c *ClientWithResponses) CreateFeedWithResponse(ctx context.Context, body CreateFeedJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFeedResponse, error)
func (*ClientWithResponses) DeleteArticleWithResponse ¶
func (c *ClientWithResponses) DeleteArticleWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteArticleResponse, error)
DeleteArticleWithResponse request returning *DeleteArticleResponse
func (*ClientWithResponses) DeleteFeedWithResponse ¶
func (c *ClientWithResponses) DeleteFeedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteFeedResponse, error)
DeleteFeedWithResponse request returning *DeleteFeedResponse
func (*ClientWithResponses) GetArticleWithResponse ¶
func (c *ClientWithResponses) GetArticleWithResponse(ctx context.Context, id string, params *GetArticleParams, reqEditors ...RequestEditorFn) (*GetArticleResponse, error)
GetArticleWithResponse request returning *GetArticleResponse
func (*ClientWithResponses) GetDigestWithResponse ¶
func (c *ClientWithResponses) GetDigestWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDigestResponse, error)
GetDigestWithResponse request returning *GetDigestResponse
func (*ClientWithResponses) GetFeedWithResponse ¶
func (c *ClientWithResponses) GetFeedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetFeedResponse, error)
GetFeedWithResponse request returning *GetFeedResponse
func (*ClientWithResponses) ListArticlesWithResponse ¶
func (c *ClientWithResponses) ListArticlesWithResponse(ctx context.Context, params *ListArticlesParams, reqEditors ...RequestEditorFn) (*ListArticlesResponse, error)
ListArticlesWithResponse request returning *ListArticlesResponse
func (*ClientWithResponses) ListFeedEntriesWithResponse ¶
func (c *ClientWithResponses) ListFeedEntriesWithResponse(ctx context.Context, feedId string, params *ListFeedEntriesParams, reqEditors ...RequestEditorFn) (*ListFeedEntriesResponse, error)
ListFeedEntriesWithResponse request returning *ListFeedEntriesResponse
func (*ClientWithResponses) ListFeedsWithResponse ¶
func (c *ClientWithResponses) ListFeedsWithResponse(ctx context.Context, params *ListFeedsParams, reqEditors ...RequestEditorFn) (*ListFeedsResponse, error)
ListFeedsWithResponse request returning *ListFeedsResponse
func (*ClientWithResponses) PollFeedWithResponse ¶
func (c *ClientWithResponses) PollFeedWithResponse(ctx context.Context, id string, params *PollFeedParams, reqEditors ...RequestEditorFn) (*PollFeedResponse, error)
PollFeedWithResponse request returning *PollFeedResponse
func (*ClientWithResponses) SaveArticleWithBodyWithResponse ¶
func (c *ClientWithResponses) SaveArticleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveArticleResponse, error)
SaveArticleWithBodyWithResponse request with arbitrary body returning *SaveArticleResponse
func (*ClientWithResponses) SaveArticleWithResponse ¶
func (c *ClientWithResponses) SaveArticleWithResponse(ctx context.Context, body SaveArticleJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveArticleResponse, error)
func (*ClientWithResponses) UpdateArticleWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateArticleWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateArticleResponse, error)
UpdateArticleWithBodyWithResponse request with arbitrary body returning *UpdateArticleResponse
func (*ClientWithResponses) UpdateArticleWithResponse ¶
func (c *ClientWithResponses) UpdateArticleWithResponse(ctx context.Context, id string, body UpdateArticleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateArticleResponse, error)
func (*ClientWithResponses) UpdateFeedEntryWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateFeedEntryWithBodyWithResponse(ctx context.Context, feedId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFeedEntryResponse, error)
UpdateFeedEntryWithBodyWithResponse request with arbitrary body returning *UpdateFeedEntryResponse
func (*ClientWithResponses) UpdateFeedEntryWithResponse ¶
func (c *ClientWithResponses) UpdateFeedEntryWithResponse(ctx context.Context, feedId string, id string, body UpdateFeedEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFeedEntryResponse, error)
func (*ClientWithResponses) UpdateFeedWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateFeedWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFeedResponse, error)
UpdateFeedWithBodyWithResponse request with arbitrary body returning *UpdateFeedResponse
func (*ClientWithResponses) UpdateFeedWithResponse ¶
func (c *ClientWithResponses) UpdateFeedWithResponse(ctx context.Context, id string, body UpdateFeedJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFeedResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListArticlesWithResponse request
ListArticlesWithResponse(ctx context.Context, params *ListArticlesParams, reqEditors ...RequestEditorFn) (*ListArticlesResponse, error)
// SaveArticleWithBodyWithResponse request with any body
SaveArticleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveArticleResponse, error)
SaveArticleWithResponse(ctx context.Context, body SaveArticleJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveArticleResponse, error)
// DeleteArticleWithResponse request
DeleteArticleWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteArticleResponse, error)
// GetArticleWithResponse request
GetArticleWithResponse(ctx context.Context, id string, params *GetArticleParams, reqEditors ...RequestEditorFn) (*GetArticleResponse, error)
// UpdateArticleWithBodyWithResponse request with any body
UpdateArticleWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateArticleResponse, error)
UpdateArticleWithResponse(ctx context.Context, id string, body UpdateArticleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateArticleResponse, error)
// GetDigestWithResponse request
GetDigestWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDigestResponse, error)
// ListFeedsWithResponse request
ListFeedsWithResponse(ctx context.Context, params *ListFeedsParams, reqEditors ...RequestEditorFn) (*ListFeedsResponse, error)
// CreateFeedWithBodyWithResponse request with any body
CreateFeedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFeedResponse, error)
CreateFeedWithResponse(ctx context.Context, body CreateFeedJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFeedResponse, error)
// ListFeedEntriesWithResponse request
ListFeedEntriesWithResponse(ctx context.Context, feedId string, params *ListFeedEntriesParams, reqEditors ...RequestEditorFn) (*ListFeedEntriesResponse, error)
// UpdateFeedEntryWithBodyWithResponse request with any body
UpdateFeedEntryWithBodyWithResponse(ctx context.Context, feedId string, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFeedEntryResponse, error)
UpdateFeedEntryWithResponse(ctx context.Context, feedId string, id string, body UpdateFeedEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFeedEntryResponse, error)
// DeleteFeedWithResponse request
DeleteFeedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteFeedResponse, error)
// GetFeedWithResponse request
GetFeedWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetFeedResponse, error)
// UpdateFeedWithBodyWithResponse request with any body
UpdateFeedWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFeedResponse, error)
UpdateFeedWithResponse(ctx context.Context, id string, body UpdateFeedJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFeedResponse, error)
// PollFeedWithResponse request
PollFeedWithResponse(ctx context.Context, id string, params *PollFeedParams, reqEditors ...RequestEditorFn) (*PollFeedResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateFeedJSONRequestBody ¶
type CreateFeedJSONRequestBody = CreateFeedRequest
CreateFeedJSONRequestBody defines body for CreateFeed for application/json ContentType.
type CreateFeedRequest ¶
type CreateFeedRequest struct {
AgentId *string `json:"agent_id,omitempty"`
// Title Optional override; server fetches feed metadata if omitted
Title *string `json:"title,omitempty"`
Url string `json:"url"`
}
CreateFeedRequest defines model for CreateFeedRequest.
type CreateFeedResponse ¶
type CreateFeedResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Feed
JSON400 *BadRequest
JSON401 *Unauthorized
JSON409 *Error
}
func ParseCreateFeedResponse ¶
func ParseCreateFeedResponse(rsp *http.Response) (*CreateFeedResponse, error)
ParseCreateFeedResponse parses an HTTP response from a CreateFeedWithResponse call
func (CreateFeedResponse) ContentType ¶
func (r CreateFeedResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateFeedResponse) Status ¶
func (r CreateFeedResponse) Status() string
Status returns HTTPResponse.Status
func (CreateFeedResponse) StatusCode ¶
func (r CreateFeedResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteArticleResponse ¶
type DeleteArticleResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseDeleteArticleResponse ¶
func ParseDeleteArticleResponse(rsp *http.Response) (*DeleteArticleResponse, error)
ParseDeleteArticleResponse parses an HTTP response from a DeleteArticleWithResponse call
func (DeleteArticleResponse) ContentType ¶
func (r DeleteArticleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteArticleResponse) Status ¶
func (r DeleteArticleResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteArticleResponse) StatusCode ¶
func (r DeleteArticleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteFeedResponse ¶
type DeleteFeedResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseDeleteFeedResponse ¶
func ParseDeleteFeedResponse(rsp *http.Response) (*DeleteFeedResponse, error)
ParseDeleteFeedResponse parses an HTTP response from a DeleteFeedWithResponse call
func (DeleteFeedResponse) ContentType ¶
func (r DeleteFeedResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteFeedResponse) Status ¶
func (r DeleteFeedResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteFeedResponse) StatusCode ¶
func (r DeleteFeedResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Digest ¶
type Digest struct {
ArchivedCount int64 `json:"archived_count"`
Date time.Time `json:"date"`
ReadCount int64 `json:"read_count"`
SavedYesterday []Article `json:"saved_yesterday"`
SavedYesterdayCount int `json:"saved_yesterday_count"`
StarredCount int64 `json:"starred_count"`
TopTags []TagCount `json:"top_tags"`
TotalArticles int64 `json:"total_articles"`
UnreadCount int64 `json:"unread_count"`
WorthRevisiting []Article `json:"worth_revisiting"`
WorthRevisitingCount int `json:"worth_revisiting_count"`
}
Digest defines model for Digest.
type Feed ¶
type Feed struct {
AgentId *string `json:"agent_id,omitempty"`
CheckInterval string `json:"check_interval"`
CreatedAt time.Time `json:"created_at"`
Description *string `json:"description,omitempty"`
Enabled bool `json:"enabled"`
Id string `json:"id"`
LastCheckedAt *time.Time `json:"last_checked_at,omitempty"`
LastEtag *string `json:"last_etag,omitempty"`
LastModified *string `json:"last_modified,omitempty"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
Url string `json:"url"`
}
Feed defines model for Feed.
type FeedEntry ¶
type FeedEntry struct {
ArticleId *string `json:"article_id,omitempty"`
Attempts int `json:"attempts"`
DiscoveredAt time.Time `json:"discovered_at"`
ErrorMsg *string `json:"error_msg,omitempty"`
FeedId string `json:"feed_id"`
Guid string `json:"guid"`
Id string `json:"id"`
ProcessedAt *time.Time `json:"processed_at,omitempty"`
Status FeedEntryStatus `json:"status"`
Title string `json:"title"`
Url string `json:"url"`
}
FeedEntry defines model for FeedEntry.
type FeedEntryList ¶
type FeedEntryList struct {
Items []FeedEntry `json:"items"`
}
FeedEntryList defines model for FeedEntryList.
type FeedEntryStatus ¶
type FeedEntryStatus string
FeedEntryStatus defines model for FeedEntryStatus.
const ( FeedEntryStatusError FeedEntryStatus = "error" FeedEntryStatusPending FeedEntryStatus = "pending" FeedEntryStatusSaved FeedEntryStatus = "saved" FeedEntryStatusSkipped FeedEntryStatus = "skipped" )
Defines values for FeedEntryStatus.
func (FeedEntryStatus) Valid ¶
func (e FeedEntryStatus) Valid() bool
Valid indicates whether the value is a known member of the FeedEntryStatus enum.
type FeedList ¶
type FeedList struct {
Items []Feed `json:"items"`
}
FeedList defines model for FeedList.
type FeedPollResult ¶
type FeedPollResult struct {
// Error Set if the upstream RSS fetch failed but the feed exists
Error *string `json:"error,omitempty"`
Feed Feed `json:"feed"`
NewEntries []FeedEntry `json:"new_entries"`
}
FeedPollResult defines model for FeedPollResult.
type GetArticleParams ¶
type GetArticleParams struct {
// Include Comma-separated extras (only `content` supported)
Include *string `form:"include,omitempty" json:"include,omitempty"`
}
GetArticleParams defines parameters for GetArticle.
type GetArticleResponse ¶
type GetArticleResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Article
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseGetArticleResponse ¶
func ParseGetArticleResponse(rsp *http.Response) (*GetArticleResponse, error)
ParseGetArticleResponse parses an HTTP response from a GetArticleWithResponse call
func (GetArticleResponse) ContentType ¶
func (r GetArticleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetArticleResponse) Status ¶
func (r GetArticleResponse) Status() string
Status returns HTTPResponse.Status
func (GetArticleResponse) StatusCode ¶
func (r GetArticleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetDigestResponse ¶
type GetDigestResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Digest
JSON401 *Unauthorized
}
func ParseGetDigestResponse ¶
func ParseGetDigestResponse(rsp *http.Response) (*GetDigestResponse, error)
ParseGetDigestResponse parses an HTTP response from a GetDigestWithResponse call
func (GetDigestResponse) ContentType ¶
func (r GetDigestResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetDigestResponse) Status ¶
func (r GetDigestResponse) Status() string
Status returns HTTPResponse.Status
func (GetDigestResponse) StatusCode ¶
func (r GetDigestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetFeedResponse ¶
type GetFeedResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Feed
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseGetFeedResponse ¶
func ParseGetFeedResponse(rsp *http.Response) (*GetFeedResponse, error)
ParseGetFeedResponse parses an HTTP response from a GetFeedWithResponse call
func (GetFeedResponse) ContentType ¶
func (r GetFeedResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetFeedResponse) Status ¶
func (r GetFeedResponse) Status() string
Status returns HTTPResponse.Status
func (GetFeedResponse) StatusCode ¶
func (r GetFeedResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListArticlesParams ¶
type ListArticlesParams struct {
// Q Free-text search across title, summary, tags, author
Q *string `form:"q,omitempty" json:"q,omitempty"`
Status *ArticleStatus `form:"status,omitempty" json:"status,omitempty"`
SourceType *SourceType `form:"source_type,omitempty" json:"source_type,omitempty"`
Starred *bool `form:"starred,omitempty" json:"starred,omitempty"`
// CanonicalUrl Lookup by exact canonical URL
CanonicalUrl *string `form:"canonical_url,omitempty" json:"canonical_url,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListArticlesParams defines parameters for ListArticles.
type ListArticlesResponse ¶
type ListArticlesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ArticleList
JSON401 *Unauthorized
}
func ParseListArticlesResponse ¶
func ParseListArticlesResponse(rsp *http.Response) (*ListArticlesResponse, error)
ParseListArticlesResponse parses an HTTP response from a ListArticlesWithResponse call
func (ListArticlesResponse) ContentType ¶
func (r ListArticlesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListArticlesResponse) Status ¶
func (r ListArticlesResponse) Status() string
Status returns HTTPResponse.Status
func (ListArticlesResponse) StatusCode ¶
func (r ListArticlesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListFeedEntriesParams ¶
type ListFeedEntriesParams struct {
// Status Filter by entry status. Currently only 'pending' is supported; other values return 400.
Status *FeedEntryStatus `form:"status,omitempty" json:"status,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListFeedEntriesParams defines parameters for ListFeedEntries.
type ListFeedEntriesResponse ¶
type ListFeedEntriesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *FeedEntryList
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseListFeedEntriesResponse ¶
func ParseListFeedEntriesResponse(rsp *http.Response) (*ListFeedEntriesResponse, error)
ParseListFeedEntriesResponse parses an HTTP response from a ListFeedEntriesWithResponse call
func (ListFeedEntriesResponse) ContentType ¶
func (r ListFeedEntriesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListFeedEntriesResponse) Status ¶
func (r ListFeedEntriesResponse) Status() string
Status returns HTTPResponse.Status
func (ListFeedEntriesResponse) StatusCode ¶
func (r ListFeedEntriesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListFeedsParams ¶
type ListFeedsParams struct {
// Url Lookup by exact feed URL
Url *string `form:"url,omitempty" json:"url,omitempty"`
}
ListFeedsParams defines parameters for ListFeeds.
type ListFeedsResponse ¶
type ListFeedsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *FeedList
JSON401 *Unauthorized
}
func ParseListFeedsResponse ¶
func ParseListFeedsResponse(rsp *http.Response) (*ListFeedsResponse, error)
ParseListFeedsResponse parses an HTTP response from a ListFeedsWithResponse call
func (ListFeedsResponse) ContentType ¶
func (r ListFeedsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListFeedsResponse) Status ¶
func (r ListFeedsResponse) Status() string
Status returns HTTPResponse.Status
func (ListFeedsResponse) StatusCode ¶
func (r ListFeedsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PollFeedParams ¶
type PollFeedParams struct {
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
PollFeedParams defines parameters for PollFeed.
type PollFeedResponse ¶
type PollFeedResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *FeedPollResult
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParsePollFeedResponse ¶
func ParsePollFeedResponse(rsp *http.Response) (*PollFeedResponse, error)
ParsePollFeedResponse parses an HTTP response from a PollFeedWithResponse call
func (PollFeedResponse) ContentType ¶
func (r PollFeedResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PollFeedResponse) Status ¶
func (r PollFeedResponse) Status() string
Status returns HTTPResponse.Status
func (PollFeedResponse) StatusCode ¶
func (r PollFeedResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
func BearerAuth ¶
func BearerAuth(token string) RequestEditorFn
BearerAuth returns a RequestEditorFn that adds an Authorization: Bearer header to every request.
type SaveArticleJSONRequestBody ¶
type SaveArticleJSONRequestBody = SaveArticleRequest
SaveArticleJSONRequestBody defines body for SaveArticle for application/json ContentType.
type SaveArticleRequest ¶
type SaveArticleRequest struct {
AgentId *string `json:"agent_id,omitempty"`
Author *string `json:"author,omitempty"`
CanonicalUrl *string `json:"canonical_url,omitempty"`
// Content Markdown body. If empty and the article exists, only metadata is updated; if empty and the article is new, the request fails 400.
Content *string `json:"content,omitempty"`
Metadata *map[string]string `json:"metadata,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
SourceType *SourceType `json:"source_type,omitempty"`
Summary *string `json:"summary,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title *string `json:"title,omitempty"`
Url string `json:"url"`
}
SaveArticleRequest defines model for SaveArticleRequest.
type SaveArticleResponse ¶
type SaveArticleResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Article
JSON201 *Article
JSON400 *BadRequest
JSON401 *Unauthorized
}
func ParseSaveArticleResponse ¶
func ParseSaveArticleResponse(rsp *http.Response) (*SaveArticleResponse, error)
ParseSaveArticleResponse parses an HTTP response from a SaveArticleWithResponse call
func (SaveArticleResponse) ContentType ¶
func (r SaveArticleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (SaveArticleResponse) Status ¶
func (r SaveArticleResponse) Status() string
Status returns HTTPResponse.Status
func (SaveArticleResponse) StatusCode ¶
func (r SaveArticleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SourceType ¶
type SourceType string
SourceType defines model for SourceType.
const ( Github SourceType = "github" Pdf SourceType = "pdf" Rss SourceType = "rss" Twitter SourceType = "twitter" Web SourceType = "web" Youtube SourceType = "youtube" )
Defines values for SourceType.
func (SourceType) Valid ¶
func (e SourceType) Valid() bool
Valid indicates whether the value is a known member of the SourceType enum.
type UpdateArticleJSONRequestBody ¶
type UpdateArticleJSONRequestBody = UpdateArticleRequest
UpdateArticleJSONRequestBody defines body for UpdateArticle for application/json ContentType.
type UpdateArticleRequest ¶
type UpdateArticleRequest struct {
Author *string `json:"author,omitempty"`
// Content If set, rewrites the markdown file body.
Content *string `json:"content,omitempty"`
FilePath *string `json:"file_path,omitempty"`
Metadata *map[string]string `json:"metadata,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
Starred *bool `json:"starred,omitempty"`
Status *ArticleStatus `json:"status,omitempty"`
Summary *string `json:"summary,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title *string `json:"title,omitempty"`
}
UpdateArticleRequest Only provided fields are updated.
type UpdateArticleResponse ¶
type UpdateArticleResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Article
JSON400 *BadRequest
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseUpdateArticleResponse ¶
func ParseUpdateArticleResponse(rsp *http.Response) (*UpdateArticleResponse, error)
ParseUpdateArticleResponse parses an HTTP response from a UpdateArticleWithResponse call
func (UpdateArticleResponse) ContentType ¶
func (r UpdateArticleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateArticleResponse) Status ¶
func (r UpdateArticleResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateArticleResponse) StatusCode ¶
func (r UpdateArticleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateFeedEntryJSONRequestBody ¶
type UpdateFeedEntryJSONRequestBody = UpdateFeedEntryRequest
UpdateFeedEntryJSONRequestBody defines body for UpdateFeedEntry for application/json ContentType.
type UpdateFeedEntryRequest ¶
type UpdateFeedEntryRequest struct {
ArticleId *string `json:"article_id,omitempty"`
ErrorMsg *string `json:"error_msg,omitempty"`
Status FeedEntryStatus `json:"status"`
}
UpdateFeedEntryRequest defines model for UpdateFeedEntryRequest.
type UpdateFeedEntryResponse ¶
type UpdateFeedEntryResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *FeedEntry
JSON400 *BadRequest
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseUpdateFeedEntryResponse ¶
func ParseUpdateFeedEntryResponse(rsp *http.Response) (*UpdateFeedEntryResponse, error)
ParseUpdateFeedEntryResponse parses an HTTP response from a UpdateFeedEntryWithResponse call
func (UpdateFeedEntryResponse) ContentType ¶
func (r UpdateFeedEntryResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateFeedEntryResponse) Status ¶
func (r UpdateFeedEntryResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateFeedEntryResponse) StatusCode ¶
func (r UpdateFeedEntryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateFeedJSONRequestBody ¶
type UpdateFeedJSONRequestBody = UpdateFeedRequest
UpdateFeedJSONRequestBody defines body for UpdateFeed for application/json ContentType.
type UpdateFeedRequest ¶
type UpdateFeedRequest struct {
CheckInterval *string `json:"check_interval,omitempty"`
Description *string `json:"description,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Title *string `json:"title,omitempty"`
}
UpdateFeedRequest defines model for UpdateFeedRequest.
type UpdateFeedResponse ¶
type UpdateFeedResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Feed
JSON401 *Unauthorized
JSON404 *NotFound
}
func ParseUpdateFeedResponse ¶
func ParseUpdateFeedResponse(rsp *http.Response) (*UpdateFeedResponse, error)
ParseUpdateFeedResponse parses an HTTP response from a UpdateFeedWithResponse call
func (UpdateFeedResponse) ContentType ¶
func (r UpdateFeedResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateFeedResponse) Status ¶
func (r UpdateFeedResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateFeedResponse) StatusCode ¶
func (r UpdateFeedResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode