Added add endpoint
This commit is contained in:
@@ -26,7 +26,22 @@ type TorrentInfo struct {
|
||||
Availability float64
|
||||
}
|
||||
|
||||
type TorrentFile struct {
|
||||
Filename string
|
||||
Data []byte
|
||||
}
|
||||
|
||||
type FindOptions struct {
|
||||
Hash string
|
||||
Name string
|
||||
Category string
|
||||
Tag string
|
||||
State string
|
||||
}
|
||||
|
||||
type TorrentClient interface {
|
||||
Login(username string, password string) (string, error)
|
||||
List() ([]TorrentInfo, error)
|
||||
Find(opts FindOptions) ([]TorrentInfo, error)
|
||||
Add(file TorrentFile) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user