https://github.com/nicoswd/put.io-api-v2
PHP OAuth API wrapper for put.io (putio)
https://github.com/nicoswd/put.io-api-v2
Last synced: 10 months ago
JSON representation
PHP OAuth API wrapper for put.io (putio)
- Host: GitHub
- URL: https://github.com/nicoswd/put.io-api-v2
- Owner: nicoSWD
- License: mit
- Created: 2012-08-31T17:02:52.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2016-04-01T16:51:14.000Z (over 10 years ago)
- Last Synced: 2025-08-03T20:55:37.528Z (11 months ago)
- Language: PHP
- Homepage:
- Size: 481 KB
- Stars: 15
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Put.io OAuth API Wrapper for PHP 5.4
[](https://packagist.org/packages/nicoswd/putio)
[](https://scrutinizer-ci.com/g/nicoSWD/put.io-api-v2/build-status/master) [](https://scrutinizer-ci.com/g/nicoSWD/put.io-api-v2/?branch=master)
[](https://scrutinizer-ci.com/g/nicoSWD/put.io-api-v2/?branch=master)
[](https://put.io/)
This is a powerful PHP library for [put.io](https://put.io/)'s [OAuth2 API](https://api.put.io/v2/docs/).
It supports all features that put.io's API provides natively, including file uploads, downloads, transfers, friends, etc... No dependencies required.
Take a look at the [Wiki](https://github.com/nicoSWD/put.io-api-v2/wiki/) and [put.io's API documentation](https://api.put.io/v2/docs/) to get started.
Find me on Twitter: @[nicoSWD](https://twitter.com/nicoSWD)
**Take a look at the experimental [branch for PHP 7](https://github.com/nicoSWD/put.io-api-v2/tree/php7) with strict type hints and return types**
## Install
Via Composer
``` bash
$ composer require "nicoswd/putio": "0.3.*"
```
Via git
``` bash
$ git clone git@github.com:nicoSWD/put.io-api-v2.git
```
## Usage
```php
$putio = new PutIO\API($accessToken);
// Retrieve a an array of files on your account.
$files = $putio->files->listall();
// Upload a file.
$file = 'path/to/file.jpg';
$putio->files->upload($file);
// Download a file.
$fileID = 1234;
$saveAs = 'my-file.jpg';
$putio->files->download($fileID, $saveAs);
// Search for files you have access to.
$query = 'my file';
$files = $putio->files->search($query);
// Add a new transfer (file or torrent)
$url = 'http://torrent.site.com/legal_video.torrent';
$putio->transfers->add($url);
// Get status of a transfer
$transferID = 1234;
$info = $putio->transfers->info($transferID);
// And a lot more...
```
## Security
If you discover any security related issues, please email security@nic0.me instead of using the issue tracker.
## Testing
``` bash
$ phpunit
```
## Contributing
Pull requests are very welcome! If they include tests, even better. This project follows PSR-2 coding standards, please make sure your pull requestst do too.
## License
[](https://packagist.org/packages/nicoswd/putio)