client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Overview

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch added in v0.4.3

type Batch struct {
	Type   string   `bson:"type" json:"type"`
	Titles []string `bson:"titles" json:"titles"`
}

type BatchResult added in v0.4.3

type BatchResult struct {
	Title string              `bson:"title" json:"title"`
	Info  *parser.TorrentInfo `bson:"info" json:"info"`
}

type Client

type Client struct {
	// RemoteHost is the URL of the remote server that this Client should
	// access.
	RemoteHost string
	// Debug enables debug on Resty client
	Debug bool
	// Resty
	Resty *resty.Client

	// Services corresponding to the different endpoints (groups/routes)
	Indexers *IndexersService
	Parser   *ParserService
	Popular  *PopularService
	Releases *ReleasesService
	Sources  *SourcesService
}

Client is used to access Pace services.

func New

func New(remoteHost string) *Client

New makes a new Client.

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

Set the debug flag

type Indexer

type Indexer struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Name        string    `bson:"name" json:"name"`
	URL         string    `bson:"url" json:"url"`
	Active      bool      `bson:"active" json:"active"`
	Categories  []int     `bson:"categories" json:"categories"`
	ProcessedAt time.Time `bson:"processed_at" json:"processed_at"`
}

type IndexersCreateRequest

type IndexersCreateRequest struct {
	Subject *Indexer `json:"subject"`
}

type IndexersCreateResponse

type IndexersCreateResponse struct {
	*Response
	Result *Indexer `json:"result"`
}

type IndexersDeleteRequest

type IndexersDeleteRequest struct {
	ID string `json:"id"`
}

type IndexersDeleteResponse

type IndexersDeleteResponse struct {
	*Response
	Result *Indexer `json:"result"`
}

type IndexersIndexRequest

type IndexersIndexRequest struct {
	Page  int `json:"page"`
	Limit int `json:"limit"`
}

type IndexersIndexResponse

type IndexersIndexResponse struct {
	*Response
	Result []*Indexer `json:"result"`
	Total  int64      `json:"total"`
}

type IndexersRefreshRequest added in v0.4.1

type IndexersRefreshRequest struct {
	ID string `json:"id"`
}

type IndexersService

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

func NewIndexersService

func NewIndexersService(client *Client) *IndexersService

NewIndexers makes a new client for accessing Indexers services.

func (*IndexersService) Create

func (*IndexersService) Delete

func (*IndexersService) Index

func (*IndexersService) Refresh added in v0.4.1

func (*IndexersService) Settings

func (*IndexersService) Show

func (*IndexersService) Update

type IndexersSettingsRequest

type IndexersSettingsRequest struct {
	ID      string   `json:"id"`
	Setting *Setting `json:"setting"`
}

type IndexersSettingsResponse

type IndexersSettingsResponse struct {
	*Response
	Result *Indexer `json:"result"`
}

type IndexersShowRequest

type IndexersShowRequest struct {
	ID string `json:"id"`
}

type IndexersShowResponse

type IndexersShowResponse struct {
	*Response
	Result *Indexer `json:"result"`
}

type IndexersUpdateRequest

type IndexersUpdateRequest struct {
	ID      string   `json:"id"`
	Subject *Indexer `json:"subject"`
}

type IndexersUpdateResponse

type IndexersUpdateResponse struct {
	*Response
	Result *Indexer `json:"result"`
}

type ParserBatchRequest added in v0.4.3

type ParserBatchRequest struct {
	Batch *Batch `json:"batch"`
}

type ParserBatchResponse added in v0.4.3

type ParserBatchResponse struct {
	*Response
	Result []*BatchResult `json:"result"`
}

type ParserParseRequest added in v0.4.1

type ParserParseRequest struct {
	Title string `json:"title"`
	Type  string `json:"type"`
}

type ParserParseResponse added in v0.4.2

type ParserParseResponse struct {
	*Response
	Result *parser.TorrentInfo `json:"result"`
}

type ParserService added in v0.4.1

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

func NewParserService added in v0.4.1

func NewParserService(client *Client) *ParserService

NewParser makes a new client for accessing Parser services.

func (*ParserService) Batch added in v0.4.3

func (*ParserService) Parse added in v0.4.1

func (*ParserService) Title added in v0.4.1

type ParserTitleRequest added in v0.4.1

type ParserTitleRequest struct {
	Title string `json:"title"`
	Type  string `json:"type"`
}

type ParserTitleResponse added in v0.4.2

type ParserTitleResponse struct {
	*Response
	Result *parser.TorrentInfo `json:"result"`
}
type Popular struct {
	Title string `bson:"_id" json:"title"`
	Year  int    `bson:"year" json:"year"`
	Type  string `bson:"type" json:"type"`
	Count int    `bson:"count" json:"count"`
}

type PopularIndexRequest

type PopularIndexRequest struct {
	Interval string `json:"interval"`
}

type PopularIndexResponse

type PopularIndexResponse struct {
	*Response
	Result *PopularResponse `json:"result"`
	Total  int64            `json:"total"`
}

type PopularMovie added in v0.4.1

type PopularMovie struct {
	ID       *PopularMovieId `bson:"_id" json:"id"`
	Count    int             `bson:"count" json:"count"`
	Verified int             `bson:"verified" json:"verified"`
}

type PopularMovieId added in v0.4.1

type PopularMovieId struct {
	Title string `bson:"title" json:"title"`
	Year  int    `bson:"year" json:"year"`
}

type PopularMoviesResponse added in v0.4.3

type PopularMoviesResponse struct {
	*Response
	Result []*PopularMovie `json:"result"`
}

type PopularResponse

type PopularResponse struct {
	Tv     []*Popular `bson:"tv" json:"tv"`
	Anime  []*Popular `bson:"anime" json:"anime"`
	Movies []*Popular `bson:"movies" json:"movies"`
}

type PopularService

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

func NewPopularService

func NewPopularService(client *Client) *PopularService

NewPopular makes a new client for accessing Popular services.

func (*PopularService) Index

func (*PopularService) Movies added in v0.4.3

type Release

type Release struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Type        string              `bson:"type" json:"type"`
	Source      string              `bson:"source" json:"source"`
	Title       string              `bson:"title" json:"title"`
	Year        int                 `bson:"year" json:"year"`
	Description string              `bson:"description" json:"description"`
	Size        int64               `bson:"size" json:"size"`
	View        string              `bson:"view" json:"view"`
	Download    string              `bson:"download" json:"download"`
	Infohash    string              `bson:"infohash" json:"infohash"`
	Season      int                 `bson:"season" json:"season"`
	Episode     int                 `bson:"episode" json:"episode"`
	Volume      int                 `bson:"volume" json:"volume"`
	Group       string              `bson:"group" json:"group"`
	Website     string              `bson:"website" json:"website"`
	Verified    bool                `bson:"verified" json:"verified"`
	Widescreen  bool                `bson:"widescreen" json:"widescreen"`
	Unrated     bool                `bson:"unrated" json:"unrated"`
	Uncensored  bool                `bson:"uncensored" json:"uncensored"`
	Bluray      bool                `bson:"bluray" json:"bluray"`
	ThreeD      bool                `bson:"threeD" json:"threeD"`
	Resolution  string              `bson:"resolution" json:"resolution"`
	Encodings   []string            `bson:"encodings" json:"encodings"`
	Quality     string              `bson:"quality" json:"quality"`
	Raw         *newznab.NZB        `bson:"raw" json:"raw"`
	Info        *parser.TorrentInfo `bson:"info" json:"info"`
	Downloader  string              `bson:"downloader" json:"downloader"`
	Checksum    string              `bson:"checksum" json:"checksum"`
	PublishedAt time.Time           `bson:"published_at" json:"published_at"`
}

type ReleasesCreateRequest

type ReleasesCreateRequest struct {
	Subject *Release `json:"subject"`
}

type ReleasesCreateResponse

type ReleasesCreateResponse struct {
	*Response
	Result *Release `json:"result"`
}

type ReleasesDeleteRequest

type ReleasesDeleteRequest struct {
	ID string `json:"id"`
}

type ReleasesDeleteResponse

type ReleasesDeleteResponse struct {
	*Response
	Result *Release `json:"result"`
}

type ReleasesIndexRequest

type ReleasesIndexRequest struct {
	Page  int `json:"page"`
	Limit int `json:"limit"`
}

type ReleasesIndexResponse

type ReleasesIndexResponse struct {
	*Response
	Result []*Release `json:"result"`
	Total  int64      `json:"total"`
}

type ReleasesSearchRequest

type ReleasesSearchRequest struct {
	Page       int    `json:"page"`
	Limit      int    `json:"limit"`
	Source     string `json:"source"`
	Kind       string `json:"kind"`
	Resolution string `json:"resolution"`
	Group      string `json:"group"`
	Website    string `json:"website"`
}

type ReleasesSearchResponse

type ReleasesSearchResponse struct {
	*Response
	Result []*Release `json:"result"`
}

type ReleasesService

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

func NewReleasesService

func NewReleasesService(client *Client) *ReleasesService

NewReleases makes a new client for accessing Releases services.

func (*ReleasesService) Create

func (*ReleasesService) Delete

func (*ReleasesService) Index

func (*ReleasesService) Search

func (*ReleasesService) Settings

func (*ReleasesService) Show

func (*ReleasesService) Update

type ReleasesSettingsRequest

type ReleasesSettingsRequest struct {
	ID      string   `json:"id"`
	Setting *Setting `json:"setting"`
}

type ReleasesSettingsResponse

type ReleasesSettingsResponse struct {
	*Response
	Result *Release `json:"result"`
}

type ReleasesShowRequest

type ReleasesShowRequest struct {
	ID string `json:"id"`
}

type ReleasesShowResponse

type ReleasesShowResponse struct {
	*Response
	Result *Release `json:"result"`
}

type ReleasesUpdateRequest

type ReleasesUpdateRequest struct {
	ID      string   `json:"id"`
	Subject *Release `json:"subject"`
}

type ReleasesUpdateResponse

type ReleasesUpdateResponse struct {
	*Response
	Result *Release `json:"result"`
}

type Response

type Response struct {
	Error   bool   `json:"error"`
	Message string `json:"message"`
}

type Setting

type Setting struct {
	Name  string `json:"name"`
	Value bool   `json:"value"`
}

type SettingsBatch

type SettingsBatch struct {
	IDs   []string `json:"ids"`
	Name  string   `json:"name"`
	Value bool     `json:"value"`
}

type SourcesIndexRequest

type SourcesIndexRequest struct {
	Page  int `json:"page"`
	Limit int `json:"limit"`
}

type SourcesIndexResponse

type SourcesIndexResponse struct {
	*Response
	Result []*reader.Source `json:"result"`
	Total  int64            `json:"total"`
}

type SourcesParseRequest

type SourcesParseRequest struct {
	ID         string `json:"id"`
	Categories string `json:"categories"`
}

type SourcesParseResponse

type SourcesParseResponse struct {
	*Response
	Result []*Release `json:"result"`
}

type SourcesReadRequest

type SourcesReadRequest struct {
	ID         string `json:"id"`
	Categories string `json:"categories"`
}

type SourcesReadResponse

type SourcesReadResponse struct {
	*Response
	Result []*newznab.NZB `json:"result"`
}

type SourcesSearchRequest

type SourcesSearchRequest struct {
	ID string `json:"id"`
	Q  string `json:"q"`
	T  string `json:"t"`
}

type SourcesSearchResponse

type SourcesSearchResponse struct {
	*Response
	Result []*newznab.NZB `json:"result"`
}

type SourcesService

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

func NewSourcesService

func NewSourcesService(client *Client) *SourcesService

NewSources makes a new client for accessing Sources services.

func (*SourcesService) Index

func (*SourcesService) Parse

func (*SourcesService) Read

func (*SourcesService) Search

func (*SourcesService) Show

type SourcesShowRequest

type SourcesShowRequest struct {
	ID string `json:"id"`
}

type SourcesShowResponse

type SourcesShowResponse struct {
	*Response
	Result reader.Source `json:"result"`
}

Jump to

Keyboard shortcuts

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