Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Categories = categories{}
Categories - object to emulate enum class
var (
ErrorEmptyPage = errors.New("empty page")
)
Functions ¶
func DefaultClientWithAuth ¶ added in v0.1.0
func DefaultClientWithAuth(cred Credentials) (*http.Client, error)
DefaultClientWithAuth - http.Client with auth to AnimeLayer
Types ¶
type ClientWrapper ¶ added in v0.1.0
type ClientWrapper struct {
// contains filtered or unexported fields
}
ClientWrapper - Default wrapper over http.Client
func NewClientWrapper ¶ added in v0.1.0
func NewClientWrapper(client *http.Client) *ClientWrapper
NewClientWrapper - Create default wrapper over http.Client
type Credentials ¶
Credentials - Animelayer data for loging request
type Item ¶ added in v0.1.0
type Item struct { Identifier string Title string IsCompleted bool Metrics ItemMetrics Updated ItemUpdate RefImagePreview string RefImageCover string Notes string }
Item - main item of package
func (*Item) GetTorrentURL ¶ added in v0.1.0
GetTorrentURL - direct download link
type ItemMetrics ¶ added in v0.0.6
type ItemMetrics struct { Uploads string Downloads string FilesSize string Author string VisitorCounter string ApprovedCounter string DebugReadFromElementClass string `json:"ReadFromHtmlKey"` }
ItemMetrics - data from metrics block
type ItemProvider ¶ added in v0.1.0
type ItemProvider interface { GetItemByIdentifier(ctx context.Context, identifier string) (*Item, error) GetItemsFromCategoryPages(ctx context.Context, category Category, iPage int) ([]Item, error) }
ItemProvider - interface of main package object
func New ¶
func New(client DocGetter, ServiceOptionsApplier ...ServiceOptionsApplier) ItemProvider
New - create main package object
type ItemUpdate ¶ added in v0.0.6
type ItemUpdate struct { UpdatedDate *time.Time CreatedDate *time.Time SeedLastPresenceDate *time.Time DebugReadFromElementClass string `json:"ReadFromHtmlKey"` }
ItemUpdate - data from update dates block
type ServiceOptionsApplier ¶ added in v0.0.6
type ServiceOptionsApplier func(s *service)
ServiceOptionsApplier - type of options applier
func WithNoteClassOverride ¶ added in v0.0.6
func WithNoteClassOverride(noteElem, noteClass string) ServiceOptionsApplier
WithNoteClassOverride - Provide customize for notes elements, wrap plaint text into noteElem if need to specify class of elem add 'noteClass' as well else left empty