Compare commits

..

7 commits

Author SHA1 Message Date
Simon Vieille 0bb857a288 Update 'README.md' 2017-06-28 23:02:23 +02:00
Simon Vieille b820ea0813 Update 'README.md'
This project is abandoned, T411 is down.
2017-06-28 23:01:52 +02:00
Simon Vieille f80ce1a915 Merge branch 'bugfix' of synyster0fa7x/t411-console into master 2017-06-08 21:34:00 +02:00
Anthony Tournier 942c1a880f Ignore vendor directory 2017-06-08 21:13:22 +02:00
Anthony Tournier cd4fdf7927 Update API URL 2017-06-08 21:13:11 +02:00
Simon Vieille ecb6b89518 Change api.t411.li to api.t411.ai 2017-03-25 22:14:50 +01:00
Simon Vieille f174796f74 API domain updated 2016-11-21 01:35:25 +01:00
5 changed files with 5 additions and 70 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ app/config.yml
composer.lock
tags
*.swp
vendor

View file

@ -1,3 +1,5 @@
**This project is abandoned. T411 is down since 2017-06-26.**
# t411-console
t411-console provides a console line tool for searching torrents on the tracker t411.me.

View file

@ -13,7 +13,7 @@ class Client
public function __construct()
{
$this->client = new GuzzleClient(['base_url' => 'https://api.t411.ch']);
$this->client = new GuzzleClient(['base_url' => 'https://api.t411.al']);
}
public function getAuthorization($username, $password)

View file

@ -8,9 +8,9 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Command\Command;
use Api\ConfigLoader;
use Symfony\Component\Console\Input\ArrayInput;
use Vohof\Transmission;
use Transmission\Client\GuzzleClient;
use Helper\Formater;
use Transmission\Transmission;
class TransmissionStatsCommand extends Command
{

View file

@ -1,68 +0,0 @@
<?php
namespace Transmission;
use Vohof\Transmission as BaseTransmission;
use Vohof\ClientAbstract;
/**
* Class doo
* @author Simon Vieille <simon@deblan.fr>
*/
class Transmission extends BaseTransmission
{
public function __construct(array $config, ClientAbstract $client = null)
{
parent::__construct($config, $client);
$this->config = $config;
foreach(array('host', 'endpoint') as $requirement)
{
if ( ! isset($config[$requirement]))
{
throw new \InvalidArgumentException("Missing argument: $requirement");
}
}
if (is_null($client))
{
$options = array();
if (isset($config['username']) and isset($config['password']))
{
$options = array(
'request.options' => array(
'auth' => array($config['username'], $config['password'])
)
);
}
$this->client = new GuzzleClient($config['host'], $options);
}
else
{
$this->client = $client;
}
$this->client->setEndpoint($config['endpoint']);
}
// public function add($url, $isEncoded = false, $options = array())
// {
// $options[$isEncoded ? 'metainfo' : 'filename'] = $url;
// return $this->client->request('torrent-add', $options);
// }
// public function foo()
// {
// $options = [
// 'fields' => static::$fields,
// 'ids' => ['all'],
// ];
//
// return $this->client->request('torrent-get', $options);
// }
}