Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/juliendelplanque/t411

A wrapper for T411 web api written in Pharo.
https://github.com/juliendelplanque/t411

Last synced: 16 days ago
JSON representation

A wrapper for T411 web api written in Pharo.

Awesome Lists containing this project

README

        

# t411
A wrapper for T411 web api written in Pharo.

## Installation
~~~
Metacello new
baseline: 'T411';
repository: 'github://juliendelplanque/t411/repository';
load.
~~~

## Use this project as a dependency of your project
~~~
spec baseline: 'T411' with: [
spec repository: 'github://juliendelplanque/t411/repository' ].
~~~

## How to use it?
The first thing to do if you want to use T411's api is to get a token:
~~~
api := T4Api new.
token := api retrieveAndSetTokenForUser: 'yourUsername' password: 'yourPassword'.
~~~

Once it's done, you can browse the API and download torrents:
~~~
api search: ((T4SearchQuery queryString: 'stuff') limit: 5). "Return a list of 5 T4Torrents."
api me. "Return a T4User that is you!"
api details: 424242. "Get details on the torrent with id 424242."
~~~

~~~
"This will download the torrent with id 424242 and store it in /tmp directory."
api download: 424242 in: FileLocator temp named: 'TheBestTorrentFileName'.
~~~