Skip to content

nasonfish/TortoiseLabs-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

TortoiseLabs-php

TortoiseLabs-php is a small and simple library for accessing TortoiseLabs' API. TortoiseLabs-php is made with only one file, and should be easy to use for controlling your account through the API.

How do I use it?

Simply copy the TortoiseLabs.php file somewhere and include/require it.

include 'tortoiselabs-php/TortoiseLabs.php'

Then, to use the API:

$tl = new TortoiseLabs('your_username', 'MyAwesomeAPIKeyIGotFromMyProfileonManage.Tortois.es');

And use your TortoiseLabs object to call functions!

This API has four separate classes that sit in TortoiseLabs.php, each allowing access to a different part of the API.

  • $tl->vps
  • $tl->support
  • $tl->invoice
  • $tl->dns

Inside these classes, you can call functions listed in the API, and we'll return the array listed in the API.

Examples

// Print data about all your vps', set the nickname of your first VPS to 'Personal_VPS'
$tl = new TortoiseLabs('nasonfish', '12345');
var_dump($data = $tl->vps->list_all()); // All my information about my VPS'
$id = $data['vpslist'][0]['id'];
$tl->vps->setNickname($id, 'Personal_VPS');
// Enable Monitoring on all your servers
$tl = new TortoiseLabs('nasonfish', '12345');
$list = $tl->vps->list_my();
foreach($list as $id => $name){
    $tl->vps->monitoring_enable($id)
}

About

A small library for accessing the TortoiseLabs API via PHP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages