kickass

package module
v0.0.0-...-cae9fee Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2015 License: MIT Imports: 7 Imported by: 0

README

go-kickass

GoDoc

go-kickass is a Go library for accessing Kickass Torrents.

Status

The library currently only provides search functionality. More features will be implemented as soon as I find use for them.

Contributing

Contributing is always welcome and appreciated! Pull requests and issues will be processed as fast as possible!

License

Copyright (c) 2015 George-Cristian Jiglau

This project is licensed under the MIT license. See the LICENSE file for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

Types

type Client

type Client struct {

	// Base URL for kickass requests. Defaults to https://kickass.to/,
	// but can be set to the sandbox url. BaseURL should always end with a
	// trailing slash.
	BaseURL *url.URL

	// User agent used when communicating with the kickass.to.
	UserAgent string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client *http.Client) *Client

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body io.Reader) (*http.Request, error)

func (*Client) Search

func (c *Client) Search(query string, opt *SearchOptions) (*SearchResults, error)

type Error

type Error int

func (Error) Error

func (e Error) Error() string

type SearchOptions

type SearchOptions struct {
	Page     int
	Category string

	Sort      string
	Ascending bool
}

type SearchResults

type SearchResults struct {
	Torrents []Torrent

	Pages      int
	Categories map[string]int
}

type Torrent

type Torrent struct {
	Name     string
	Category string
	Uploader string
	Verified bool
	Magnet   string
	Torrent  string

	Size    int
	Files   int
	Age     string
	Seeds   int
	Leeches int
}

Jump to

Keyboard shortcuts

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