Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

No description, website, or topics provided.

Resources

License

Packages

No packages published

Languages