Download the PHP package gamingsolved/paperspace-api-client without Composer

On this page you can find all versions of the php package gamingsolved/paperspace-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package paperspace-api-client

PHP Client Library for the Paperspace API

Copyright (c) 2017 Manuel Kiessling under an MIT license.

Total Downloads Latest Stable Version Latest Unstable Version

About

This project maintains inofficial Open API Specification compatible specs of the Paperspace API, and uses these specs to auto-generate PHP clients based on Guzzle, which can be used to work with the API.

The resulting clients are provided as a Packagist library for the Composer ecosystem.

You can interactively explore the Swagger documentation of Paperspace API v0.1.3 here.

Installation

Simply run composer require gamingsolved/paperspace-api-client to install the latest version.

Usage

In your own code, you can use the API client as shown below. The example assumes you want to use version 0.1.3 of the Paperspace API.

At src-generated/0.1.3/docs/Api, you can find the full documentation for the 0.1.3 API client with more examples.

Matching project versions and Paperspace API versions

Use the following table as a reference to find out which version of this project supports what version of the Paperspace API:

Project version Paperspace API version Notes
>= 0.1.0 0.1.3 only supports machines/create,list,show,start,stop,restart,destroy and templates/list)

Changelog

All notable changes to this project will be documented in this section.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

0.1.3 - 2017-08-20

Fixed

0.1.2 - 2017-08-15

Added

Changed

Fixed

0.1.1 - 2017-08-14

Changed

0.1.0 - 2017-08-14

Changed

How to modify and extend the API specifications

The PHP API clients provided by this project are generated automatically as far as possible (see below). To do so, this project manages Open API Specification / Swagger based definitions of the Paperspace API in its different versions. As there is currently no (known) way to generated these definitions based on the Paperspace API Node.js client code directly, the Swagger definitions are created and updated manually.

To do so, the code documentation for each API call is used as a reference - for example, the create machine API call is defined in the official Node.js API client code at https://github.com/Paperspace/paperspace-node/blob/v0.1.3_work/lib/machines/create.js, and its codedoc block serves as the reference for the definitions in api-definitions/0.1.3/paperspace-api-swagger-definition.json.

The API specs are defined per-API-version, that is, a spec exists for each Paperspace API version (one folder per version below api-definitions).

In terms of style, naming, and structure, here are some guidelines for creating API definitions which stay true to the API while also resulting in a nicely usable PHP client:

How to auto-generate the API clients

The PHP API clients are generated using swagger-codegen v2.3.0.

A definition file api-definitions/<api-version>/paperspace-api-swagger-definition.json serves as the input specification, and generated sources are placed in src-generated/<api-version>.

In order to (re-)generate the code for all clients, proceed as follows:

cd
git clone https://github.com/swagger-api/swagger-codegen
cd swagger-codegen
git checkout 2.3.0
mvn clean package -DskipTests

cd <folder with this README.md file>
./bin/generate-clients.sh ~/swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar

Additional notes

This project is neither affiliated with nor endorsed by Paperspace, Co.


All versions of paperspace-api-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gamingsolved/paperspace-api-client contains the following files

Loading the files please wait ....