function __construct(Config $config, LoggerInterface $logger, Storage $tokens = null, Storage $cache = null) {
$this->logger = $logger;
$this->config = $config;
- $this->client = new Client;
+ $this->client = new Client("curl", "github");
+ $this->client->configure($config->http->configure->toArray());
$this->client->attach(new ClientObserver($logger));
$this->tokens = $tokens ?: new Storage\Session;
$this->cache = $cache;
$call = new API\Releases\CreateRelease($this, compact("repo", "tag"));
return $call($callback);
}
-
+
+ function publishRelease($repo, $id, $tag, callable $callback) {
+ $call = new API\Releases\PublishRelease($this, compact("repo", "id", "tag"));
+ return $call($callback);
+ }
+
function createReleaseAsset($url, $asset, $type, callable $callback) {
$call = new API\Releases\CreateReleaseAsset($this, compact("url", "asset", "type"));
return $call($callback);