Download the PHP package juststeveking/sdk-tools without Composer

On this page you can find all versions of the php package juststeveking/sdk-tools. 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 sdk-tools

JustSteveKing SDK Tools

Latest Version Software License Run Tests PHP Version Total Downloads

A set of tools you can use to help make better SDKs.

Installation

Usage

There are many different components in this library, I will document these as best I can.

HTTP Components

Request class

Using the request class, you can pass in the method and URI to build a request object, and turn it into a PSR-7 Request.

Response class

Using the response class, you can turn a PSR response into a response class that has a slightly friendlier API to work with.

Payload class

Using the payload class, you can take a JSON string and build a HTTP Stream.

Query Parameter class

Using the Query Parameter class, you can programmatically build up your request parameters. You can pass either a string, int, or bool through to the value property.

Authorization class

Using the Authorization class, you can build the Authorization header you want or need to use. The second parameter, type, defaults to a Bearer token, however you can override this.

Token Header class

Using the Token Header class, you can build a custom token header you can use to attach to your request. The second parameter key defaults to X-API-TOKEN which you can override.

Http Transport class

Using the HTTP Transport class, you can discover the installed PSR-18 client and return the PSR-18 implementation.

SDK class

The SDK class is designed for you to extend for your own SDKs, it accepts one property in its constructor which will be a PSR-18 compliant HTTP client.

Building your own SDK

To build your own SDK using these tools, you can easily scaffold it out using the components provided. If you cannot quite scaffold it out, then please feel free to drop an Issue or PR so that I can build out better support for more use cases.

From here, you can start to add your SDK logic within the Acme class.

Resource class

You can use the Resource class to define the resources on your API, on your SDK.

Of course the above code is just an example of what you can do, you can abstract around this as much as you like.

Extending your SDK

You can use the Resource class to create your own resources, and start building implementations for your API:

Testing

To run the test:

Credits

LICENSE

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


All versions of sdk-tools with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
php-http/discovery Version ^1.15
psr/http-factory Version ^1.0
psr/http-message Version ^1.0 | ^2.0
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 juststeveking/sdk-tools contains the following files

Loading the files please wait ....