Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fordnox/purevpn-php-api-client
API wrapper for PureVPN
https://github.com/fordnox/purevpn-php-api-client
Last synced: 20 days ago
JSON representation
API wrapper for PureVPN
- Host: GitHub
- URL: https://github.com/fordnox/purevpn-php-api-client
- Owner: fordnox
- Created: 2013-06-01T07:18:33.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-07T20:32:25.000Z (over 11 years ago)
- Last Synced: 2024-11-29T18:14:42.593Z (29 days ago)
- Language: PHP
- Size: 129 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://secure.travis-ci.org/fordnox/purevpn-php-api-client.png?branch=master)](http://travis-ci.org/fordnox/purevpn-php-api-client)
purevpn-php-api-client
======================API wrapper for PureVPN
### Installing via Composer
The recommended way to install library is through [Composer](http://getcomposer.org).
1. Add ``fordnox/purevpn-php-api-client`` as a dependency in your project's ``composer.json`` file:
{
"require": {
"fordnox/purevpn-php-api-client": "dev-master"
}
}2. Download and install Composer:
curl -s http://getcomposer.org/installer | php
3. Install your dependencies:
php composer.phar install
4. Require Composer's autoloader
Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:
require 'vendor/autoload.php';
You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at [getcomposer.org](http://getcomposer.org).
Example Code
======================$options = array(
'api_user' => 'username',
'api_password' => 'password',
);
$api = new Fordnox\Purevpn\Purevpn($options);
$account = new Fordnox\Purevpn\Account();
$account->setUsername('username');
$account = $api->getAccountStatus($account);
print $account->isEnabled();