No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.editorconfig
.gitignore
.styleci.yml
CHANGELOG.md
CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE.md
PULL_REQUEST_TEMPLATE.md
README.md
composer.json

README.md

lunanode-api-php

Latest Version on Packagist Software License Total Downloads

This is a simple wrapper for Lunanode Hostings api.

Install

Via Composer

$ composer require sdavis1902/lunanode-api-php

Usage

$api = new \sdavis1902\LunanodeApiPhp\Lunanode($api_id, $api_key);
$vms = $api->request('vm', 'list');

foreach( $vms as $vm ){
    $info = $api->request('vm', 'info', [
        'vm_id' => $vm->vm_id
    ]); 
}

Laravel 5

Add Service Provider and Alias ( not required for 5.5 )

'providers' => [
    ... 
    sdavis1902\LunanodeApiPhp\Laravel\LunanodeServiceProvider::class,
],
'aliases' => [
    ... 
    'Lunanode' => sdavis1902\LunanodeApiPhp\Laravel\Lunanode::class,
],

Add the following to your .env file

LND_API_ID=apiid
LND_API_KEY=apikey

Then call the same methods using the Facade

$vms = Lunanode::request('vm', 'list');

foreach( $vms as $vm ){
    $info = Lunanode::request('vm', 'info', [
        'vm_id' => $vm->vm_id
    ]);
}

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email s.davis1902@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.