Documentation
¶
Index ¶
- Constants
- Variables
- func Db() *gorm.DB
- func GenerateIyuu2LocalSiteMap(iyuuSites []Site, localSites []*config.SiteConfigStruct) map[int64]string
- func IyuuApiBind(token string, site string, sid int64, uid int64, passkey string) (any, error)
- func IyuuApiHash(token string, infoHashes []string, sid_sha1 string) (map[string][]IyuuTorrentInfoHash, error)
- func IyuuApiReportExisting(token string, sites []*IyuuApiSite) (string, error)
- func IyuuApiUsersProfile(token string) (data map[string]any, err error)
- type IyuuApiHashResponse
- type IyuuApiRecommendSite
- type IyuuApiReportExistingRequest
- type IyuuApiReportExistingResponse
- type IyuuApiResponse
- type IyuuApiSite
- type IyuuApiSitesResponse
- type IyuuGetRecommendSitesResponse
- type IyuuTorrentInfoHash
- type Meta
- type Site
- type Torrent
Constants ¶
View Source
const IYUU_VERSION = "8.2.0"
View Source
const MAX_INTOHASH_NUMBER = 300 // 单次提交种子info_hash最多300个
Variables ¶
View Source
var Command = &cobra.Command{
Use: "iyuu",
Short: "Cross seed automation tool using IYUU (https://github.com/ledccn/IYUUAutoReseed) API.",
Long: `Cross seed automation tool using IYUU (https://github.com/ledccn/IYUUAutoReseed) API.`,
}
Functions ¶
func GenerateIyuu2LocalSiteMap ¶
func GenerateIyuu2LocalSiteMap(iyuuSites []Site, localSites []*config.SiteConfigStruct) map[int64]string
return iyuuSid => localSiteName map
func IyuuApiBind ¶
func IyuuApiHash ¶
func IyuuApiReportExisting ¶ added in v0.1.10
func IyuuApiReportExisting(token string, sites []*IyuuApiSite) (string, error)
func IyuuApiUsersProfile ¶ added in v0.1.10
Get iyuu user profile. New profile api is undocumented (yet) in https://doc.iyuu.cn/. See: https://github.com/ledccn/iyuuplus-dev/commit/2bf34e2ab3824caf0939eb8081c8a9d3e97736b0 .
Types ¶
type IyuuApiHashResponse ¶
type IyuuApiHashResponse struct { Code int64 `json:"code"` Msg string `json:"msg"` Data map[string]*struct { Torrent []IyuuTorrentInfoHash `json:"torrent"` } `json:"data"` }
type IyuuApiRecommendSite ¶
type IyuuApiRecommendSite struct { Id int64 `json:"id"` Site string `json:"site"` Nickname string `json:"nickname"` Bind_check string `json:"bind_check"` }
func IyuuApiGetRecommendSites ¶
func IyuuApiGetRecommendSites() ([]IyuuApiRecommendSite, error)
type IyuuApiReportExistingRequest ¶ added in v0.1.10
type IyuuApiReportExistingRequest struct {
SidList []int64 `json:"sid_list"`
}
type IyuuApiReportExistingResponse ¶ added in v0.1.10
type IyuuApiResponse ¶
type IyuuApiSite ¶
type IyuuApiSite struct { Id int64 `json:"id"` Site string `json:"site"` Base_url string `json:"base_url"` Nickname string `json:"nickname"` // "朋友" / "馒头" Download_page string `json:"download_page"` // torrent download url. params: {passkey}, {authkey}, {} (id) Is_https int64 `json:"is_https"` // 2 / 1 / 0 }
func IyuuApiSites ¶
func IyuuApiSites(token string) ([]*IyuuApiSite, error)
func (*IyuuApiSite) GetUrl ¶
func (site *IyuuApiSite) GetUrl() string
func (IyuuApiSite) ToSite ¶
func (iyuuApiSite IyuuApiSite) ToSite() Site
type IyuuApiSitesResponse ¶
type IyuuApiSitesResponse struct { Code int64 `json:"code"` Msg string `json:"msg"` Data struct { Sites []*IyuuApiSite `json:"sites"` } `json:"data"` }
type IyuuGetRecommendSitesResponse ¶
type IyuuGetRecommendSitesResponse struct { Code int64 `json:"code"` Msg string `json:"msg"` Data struct { List []IyuuApiRecommendSite `json:"list"` } `json:"data"` }
type IyuuTorrentInfoHash ¶
type Site ¶
type Site struct { Sid int64 `gorm:"primaryKey"` Name string `gorm:"index"` Nickname string Url string // site homepage url. e.g. https://hdvideo.one/ DownloadPage string // (relative) torrent download url. e.g. "download.php?id={}&passkey={passkey}" }
gorm "sites" table
func (*Site) MatchFilter ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.