Documentation
¶
Index ¶
- type Card
- type ChipResponse
- type Client
- func (c *Client) Chip(ctx context.Context) (*ChipResponse, error)
- func (c *Client) ChipClone(ctx context.Context, code string) (*CloneResponse, error)
- func (c *Client) ChipSync(ctx context.Context) (*SyncResponse, error)
- func (c *Client) CreateHold(ctx context.Context, cardId, mediaId string) error
- func (c *Client) CreateLoan(ctx context.Context, cardId, mediaId, format string) error
- func (c *Client) DeleteHold(ctx context.Context, cardId, mediaId string) error
- func (c *Client) DeleteLoan(ctx context.Context, cardId, mediaId string) error
- func (c *Client) GetLibrariesByWebsiteId(ctx context.Context, websiteIds []int) (*LibrariesResponse, error)
- func (c *Client) GetMedia(ctx context.Context, library, titleId string) (*GetMediaResponse, error)
- func (c *Client) OpenLoan(ctx context.Context, cardId, mediaId, mediaTypeId string) (*OpenLoanResponse, error)
- func (c *Client) SearchMedia(ctx context.Context, library, query string, format MediaFormat) (*SearchMediaResponse, error)
- type CloneRequest
- type CloneResponse
- type CreateHoldRequest
- type CreateLoanRequest
- type Downloader
- type GetMediaResponse
- type Hold
- type LibrariesResponse
- type Loan
- type MediaFormat
- type MediaType
- type OpenLoanResponse
- type Openbook
- type Roster
- type SearchMediaResponse
- type SyncResponse
- type TocItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChipResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateHold ¶ added in v0.3.0
func (*Client) CreateLoan ¶
func (*Client) DeleteHold ¶ added in v0.3.0
func (*Client) DeleteLoan ¶
func (*Client) GetLibrariesByWebsiteId ¶
func (*Client) SearchMedia ¶ added in v0.3.1
func (c *Client) SearchMedia(ctx context.Context, library, query string, format MediaFormat) (*SearchMediaResponse, error)
type CloneRequest ¶
type CloneRequest struct {
Code string `json:"code"`
}
type CloneResponse ¶
type CreateHoldRequest ¶ added in v0.3.0
type CreateHoldRequest struct{}
type CreateLoanRequest ¶
type Downloader ¶ added in v0.3.0
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶ added in v0.3.0
func NewDownloader() *Downloader
func (*Downloader) Download ¶ added in v0.3.0
func (d *Downloader) Download(ctx context.Context, loan *OpenLoanResponse, destFolder string) error
type GetMediaResponse ¶ added in v0.3.1
type GetMediaResponse struct {
Id string `json:"id"`
Title string `json:"title"`
Type MediaType `json:"type"`
EstimatedWaitDays int `json:"estimatedWaitDays"`
FirstCreatorName string `json:"firstCreatorName"`
IsAvailable bool `json:"isAvailable"`
PublishDate time.Time `json:"publishDate"`
Languages []struct {
Name string `json:"name"`
Id string `json:"id"`
} `json:"languages"`
}
type LibrariesResponse ¶
type MediaFormat ¶
type MediaFormat int
const ( MediaFormatAny MediaFormat = iota MediaFormatAudiobook MediaFormatEbook )
type OpenLoanResponse ¶ added in v0.2.0
type Openbook ¶ added in v0.2.0
type Openbook struct {
Title struct {
Main string `json:"main"`
} `json:"title"`
Creator []struct {
Name string `json:"name"`
} `json:"creator"`
Language string `json:"language"`
Landmarks []struct {
Type string `json:"type"`
Path string `json:"path"`
Title string `json:"title"`
} `json:"landmarks"`
Toc []TocItem `json:"toc"`
} `json:"nav"`
RenditionFormat string `json:"rendition-format"`
Spine []struct {
MediaType string `json:"media-type"`
Id string `json:"id"`
AudioDuration float64 `json:"audio-duration"`
OdreadOriginalPath string `json:"-odread-original-path"`
} `json:"spine"`
OdreadFurbishUri string `json:"-odread-furbish-uri"`
}
func ReadOpenbook ¶ added in v0.2.0
type SearchMediaResponse ¶ added in v0.3.1
type SearchMediaResponse struct {
Items []GetMediaResponse `json:"items"`
}
type SyncResponse ¶
Click to show internal directories.
Click to hide internal directories.