anilibria

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

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

func NewApiClient

func NewApiClient(ctx *cli.Context, log *zerolog.Logger) (*ApiClient, error)

func (*ApiClient) DropActiveSession added in v0.0.4

func (m *ApiClient) DropActiveSession(sid string) (bool, error)

func (*ApiClient) DropActiveSessions added in v0.0.4

func (m *ApiClient) DropActiveSessions(sids ...string)

func (*ApiClient) GetActiveSessions added in v0.0.4

func (m *ApiClient) GetActiveSessions() (_ *map[string][]string, e error)

func (*ApiClient) GetApiAuthorization

func (m *ApiClient) GetApiAuthorization() (e error)

func (*ApiClient) GetLastChanges

func (m *ApiClient) GetLastChanges() (titles []*Title, e error)

func (*ApiClient) GetLastUpdates

func (m *ApiClient) GetLastUpdates() (titles []*Title, e error)

func (*ApiClient) GetTitleTorrentFile

func (m *ApiClient) GetTitleTorrentFile(tid string) (string, *[]byte, error)

func (*ApiClient) GetTitlesFromSchedule

func (m *ApiClient) GetTitlesFromSchedule() (titles []*Title, e error)

func (*ApiClient) GetTitlesSchedule

func (m *ApiClient) GetTitlesSchedule() (schedule []*TitleSchedule, e error)

func (*ApiClient) SearchTitlesByName

func (m *ApiClient) SearchTitlesByName(name string) (titles []*Title, e error)

type ApiRequestMethod

type ApiRequestMethod string

type MetadataFile added in v0.0.4

type MetadataFile struct {
	File   string
	Size   uint64
	Offset uint64
}

type SiteRequestMethod

type SiteRequestMethod string

type Title

type Title struct {
	Id         int
	Code       string
	Updated    uint64 // sometimes the anilibria project mark their update time as a NULL
	LastChange uint64 `json:"last_change"` // I dont know how to mark this fields as "if time.Parse fails - ignore"
	Names      *TitleNames
	Status     *TitleStatus
	Type       *TitleType
	Torrents   *TitleTorrents
}

type TitleNames

type TitleNames struct {
	Ru          string
	En          string
	Alternative string
}

type TitleSchedule

type TitleSchedule struct {
	Day  int
	List []*Title
}

type TitleStatus

type TitleStatus struct {
	String string
	Code   int
}

type TitleTorrent

type TitleTorrent struct {
	TorrentId         int `json:"torrent_id"`
	Series            *TorrentSeries
	Quality           *TorrentQuality
	Leechers          int
	Seeders           int
	Downloads         int
	TotalSize         int64 `json:"total_size"`
	Url               string
	UploadedTimestamp uint64 `json:"uploaded_timestamp"`
	Hash              string
	Metadata          *TorrentMetadata
	RawBase64File     interface{}
}

func (*TitleTorrent) GetName added in v0.0.4

func (m *TitleTorrent) GetName() string

func (*TitleTorrent) GetShortHash

func (m *TitleTorrent) GetShortHash() string

func (*TitleTorrent) GetTorrentFileName added in v0.0.4

func (m *TitleTorrent) GetTorrentFileName() string

type TitleTorrents

type TitleTorrents struct {
	Series *TorrentSeries
	List   []*TitleTorrent
}

type TitleType

type TitleType struct {
	FullString string `json:"full_string"`
	Code       int
	String     string
	Series     interface{}
	Length     int
}

type TorrentMetadata added in v0.0.4

type TorrentMetadata struct {
	Hash             string
	Name             string
	Announce         []string
	CreatedTimestamp uint64          `json:"created_timestamp"`
	FilesList        []*MetadataFile `json:"files_list"`
}

type TorrentQuality

type TorrentQuality struct {
	String     string
	Type       string
	Resolution string
	Encoder    string
	LqAudio    interface{} `json:"lq_audio"`
}

type TorrentSeries

type TorrentSeries struct {
	Firest int
	Last   int
	String string
}

Jump to

Keyboard shortcuts

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