2017 © Pedro Peláez
 

library openload

OpenLoad Service Client Library

image

ideneal/openload

OpenLoad Service Client Library

  • Wednesday, July 25, 2018
  • by Ideneal
  • Repository
  • 9 Watchers
  • 31 Stars
  • 898 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 14 Forks
  • 0 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

OpenLoad

Packagist GitHub license Travis branch Codacy branch, (*1)

It's just a php client of the OpenLoad.co service., (*2)

Install

composer require ideneal/openload:~1.1

Usage

All api features are been implemented., (*3)

Get account info

You can retrieve your account info by using getAccountInfo method., (*4)

<?php

include_once './vendor/autoload.php';

use Ideneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$accountInfo = $openload->getAccountInfo();
echo $accountInfo->getEmail(); //account@email.com

Get a ticket to download a file

In order to retrieve a ticket to download a file you have to use the getTicket method and pass it the remote file you want to get the ticket. The remote file has to be a FileInfo object or the file id., (*5)

<?php

include_once './vendor/autoload.php';

use Ideneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$fileInfo = $openload->getFileInfo('72fA-_Lq8Ak');
$ticket   = $openload->getTicket($fileInfo);

// ...
// After read the captcha response from $ticket->getCaptcha()->getUrl()

$downloadLink = $openload->getDownloadLink($ticket, $captchaResponse);

Upload a file

You can upload a file by using uploadFile method., (*6)

<?php

include_once './vendor/autoload.php';

use Ideneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$openload->uploadFile('/home/user/Pictures/image.jpg');

Search files with a specific name

You can use searchFiles method to search a file by its name. The first parameter is the file name, the second is a folder id (default null) and the third parameter defines whether the search has to be recursive or not (default false), (*7)

<?php

include_once './vendor/autoload.php';

use Ideneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$files = $openLoad->searchFiles('video.mp4', null, true);

Search folders with a specific name

You can use searchFolders method to search a folder by its name. The first parameter is the folder name, the second is a folder id (default null) and the third parameter defines whether the search has to be recursive or not (default false), (*8)

<?php

include_once './vendor/autoload.php';

use Ideneal\OpenLoad\OpenLoadClient;

$openload = new OpenLoadClient('apiLogin', 'apiKey');

$folders = $openLoad->searchFolders('movies', null, true);

It's also possible find more about what you can to do at OpenLoad Api., (*9)

Author

Daniele Pedone, (*10)

License

MIT, (*11)

The Versions

25/07 2018

dev-master

9999999-dev

OpenLoad Service Client Library

  Sources   Download

MIT

The Requires

 

The Development Requires

30/11 2017

v1.1.1

1.1.1.0

OpenLoad Service Client Library

  Sources   Download

MIT

The Requires

 

The Development Requires

26/08 2017

v1.1.0

1.1.0.0

OpenLoad Service Client Library

  Sources   Download

MIT

The Requires

 

The Development Requires

16/04 2016

v1.0.0

1.0.0.0

OpenLoad Service Client Library

  Sources   Download

MIT

The Requires

 

The Development Requires