Skip to content

ByteInternet/hypernode-api-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hypernode API PHP Client

Please note: this project is still in its early stages and the API may be subject to change.

Installation

composer require hypernode/api-client

The API client is HTTP client agnostic, which means that it's compatible with any HTTP client implementing PSR-18 interface.

Popular HTTP client implementations are: Guzzle and Symfony HTTP Client.

A full list of implementations, can be found here.

Usage

Acquiring an API token

An API token can be requested at [email protected].

Using the client

use Hypernode\Api\HypernodeClientFactory;

require_once 'vendor/autoload.php';

$client = HypernodeClientFactory::create(getenv('HYPERNODE_API_TOKEN'));

// For the Hypernode `johndoe` PHP version to 8.1 and Node.js version to 18
$job = $client->settings->setBatch('johndoe', [
    'php_version' => '8.1',
    'nodejs_version' => '18'
]);

// If something has changed, wait for the changes to be applied.
while ($job && !$job->completed()) {
    sleep(2);
    $job->refresh();
}

Supported features

Here's a list of Hypernode API features implemented in the client.

  • Updating one or multiple Hypernode settings at once.
  • Querying/polling the logbook for the status of a job.
  • Creating and cancelling Brancher Hypernode instances.

About

PHP Client for the Hypernode API

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages