Documentation ¶
Index ¶
- func WithApiKey(apiKey string) func(*Client)
- func WithBaseUrl(baseUrl string) func(*Client)
- func WithMediaUrl(mediaUrl string) func(*Client)
- type Client
- func (c *Client) CreateComment(parentId int, text string) (int, error)
- func (c *Client) CreateInvoice(args *CreateInvoiceArgs) (*Invoice, error)
- func (c *Client) Dupes(url string) (*[]Dupe, error)
- func (c *Client) GetRssFeed() (*Rss, error)
- func (c *Client) HasDupes(url string) (bool, error)
- func (c *Client) Item(id int) (*Item, error)
- func (c *Client) Items(query *ItemsQuery) (*ItemsCursor, error)
- func (c *Client) Me() (*User, error)
- func (c *Client) Mentions() ([]Notification, error)
- func (c *Client) Notifications() (*NotificationsCursor, error)
- func (c *Client) PostDiscussion(title string, text string, sub string) (int, error)
- func (c *Client) PostLink(url string, title string, text string, sub string) (int, error)
- func (c *Client) Replies() ([]Notification, error)
- func (c *Client) UploadImage(img *image.RGBA) (string, error)
- type Comment
- type CreateInvoiceArgs
- type CreateInvoiceResponse
- type Dupe
- type DupesError
- type DupesResponse
- type GetSignedPOST
- type GetSignedPOSTResponse
- type GqlBody
- type GqlError
- type Invoice
- type Item
- type ItemPaidAction
- type ItemResponse
- type ItemsCursor
- type ItemsQuery
- type ItemsResponse
- type MeResponse
- type Notification
- type NotificationsCursor
- type NotificationsResponse
- type PaymentMethod
- type Rss
- type RssAuthor
- type RssChannel
- type RssDate
- type RssItem
- type UpsertCommentResponse
- type UpsertDiscussionResponse
- type UpsertLinkResponse
- type User
- type UserPrivates
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithApiKey ¶
func WithBaseUrl ¶
func WithMediaUrl ¶ added in v0.6.0
Types ¶
type Client ¶
func (*Client) CreateComment ¶
func (*Client) CreateInvoice ¶ added in v0.5.0
func (c *Client) CreateInvoice(args *CreateInvoiceArgs) (*Invoice, error)
func (*Client) GetRssFeed ¶
func (*Client) Items ¶
func (c *Client) Items(query *ItemsQuery) (*ItemsCursor, error)
func (*Client) Mentions ¶ added in v0.6.0
func (c *Client) Mentions() ([]Notification, error)
func (*Client) Notifications ¶ added in v0.6.0
func (c *Client) Notifications() (*NotificationsCursor, error)
func (*Client) PostDiscussion ¶
func (*Client) Replies ¶ added in v0.6.0
func (c *Client) Replies() ([]Notification, error)
type CreateInvoiceArgs ¶ added in v0.5.0
type CreateInvoiceResponse ¶ added in v0.5.0
type DupesError ¶
func (*DupesError) Error ¶
func (e *DupesError) Error() string
type DupesResponse ¶
type GetSignedPOST ¶ added in v0.6.0
type GetSignedPOSTResponse ¶ added in v0.6.0
type GetSignedPOSTResponse struct { Errors []GqlError `json:"errors"` Data struct { GetSignedPOST GetSignedPOST `json:"getSignedPOST"` } `json:"data"` }
type Invoice ¶ added in v0.5.0
type Invoice struct { Id int `json:"id,string"` Hash string `json:"hash"` Hmac string `json:"hmac"` Bolt11 string `json:"bolt11"` SatsRequested int `json:"satsRequested"` SatsReceived int `json:"satsReceived"` Cancelled bool `json:"cancelled"` ConfirmedAt time.Time `json:"createdAt"` ExpiresAt time.Time `json:"expiresAt"` Nostr map[string]interface{} `json:"nostr"` IsHeld bool `json:"isHeld"` Comment string `json:"comment"` Lud18Data map[string]interface{} `json:"lud18Data"` ConfirmedPreimage string `json:"confirmedPreimage"` ActionState string `json:"actionState"` ActionType string `json:"actionType"` }
type Item ¶
type Item struct { Id int `json:"id,string"` ParentId int `json:"parentId"` Title string `json:"title"` Url string `json:"url"` Text string `json:"text"` Sats int `json:"sats"` CreatedAt time.Time `json:"createdAt"` DeletedAt null.Time `json:"deletedAt"` Comments []Comment `json:"comments"` NComments int `json:"ncomments"` User User `json:"user"` }
type ItemPaidAction ¶ added in v0.5.1
type ItemPaidAction struct { Result Item `json:"result"` Invoice Invoice `json:"invoice"` PaymentMethod PaymentMethod `json:"paymentMethod"` }
type ItemResponse ¶ added in v0.5.0
type ItemsCursor ¶
type ItemsQuery ¶
type ItemsResponse ¶
type ItemsResponse struct { Errors []GqlError `json:"errors"` Data struct { Items ItemsCursor `json:"items"` } `json:"data"` }
type MeResponse ¶ added in v0.7.0
type Notification ¶ added in v0.6.0
type NotificationsCursor ¶ added in v0.6.0
type NotificationsCursor struct { LastChecked time.Time `json:"lastChecked"` Cursor string `json:"cursor"` Notifications []Notification `json:"notifications"` }
type NotificationsResponse ¶ added in v0.6.0
type NotificationsResponse struct { Errors []GqlError `json:"errors"` Data struct { Notifications NotificationsCursor `json:"notifications"` } `json:"data"` }
type PaymentMethod ¶ added in v0.5.1
type PaymentMethod string
const ( PaymentMethodFeeCredits PaymentMethod = "FEE_CREDIT" PaymentMethodOptimistic PaymentMethod = "OPTIMISTIC" PaymentMethodPessimistic PaymentMethod = "PESSIMISTIC" )
type Rss ¶
type Rss struct {
Channel RssChannel `xml:"channel"`
}
type RssChannel ¶
type RssDate ¶
func (*RssDate) UnmarshalXML ¶
type UpsertCommentResponse ¶ added in v0.5.2
type UpsertCommentResponse struct { Errors []GqlError `json:"errors"` Data struct { UpsertComment ItemPaidAction `json:"upsertComment"` } `json:"data"` }
type UpsertDiscussionResponse ¶
type UpsertDiscussionResponse struct { Errors []GqlError `json:"errors"` Data struct { UpsertDiscussion ItemPaidAction `json:"upsertDiscussion"` } `json:"data"` }
type UpsertLinkResponse ¶
type UpsertLinkResponse struct { Errors []GqlError `json:"errors"` Data struct { UpsertLink ItemPaidAction `json:"upsertLink"` } `json:"data"` }
type User ¶
type User struct { Id int `json:"id,string"` Name string `json:"name"` Privates UserPrivates `json:"privates"` }
type UserPrivates ¶ added in v0.7.0
type UserPrivates struct {
Sats int `json:"sats"`
}
Click to show internal directories.
Click to hide internal directories.