Download the PHP package plhw/hf-api-client without Composer

On this page you can find all versions of the php package plhw/hf-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 hf-api-client

PLHW Api Client

PLHW API Client provides means to authenticate clients against our OAuth2 server and issue authorized requests to our api endpoints.

Installation

Example API calls

Once you have succesfully installed the application, some example scripts are located at. To use them first copy an configuration file to your app root.

Open .hf-api-client-secrets.php and configure it with credentials you got from us.

Finally the example scripts are configured to use data/cache as directory for its cached accss tokens. This directory must exist (only for the examples).

Now you can run the example scripts;

Usage

To implement usage in your application you can have a look at the example scripts.

The above is all that is nessesary to configure, though I recommend you tweak the caching meganism. Currently we use the zendframework/zend-cache component. This might change when v3 is released to use the psr-7 caching FIG standard.

When you have ApiClient instance you can use it by calling methods as defined in /vendor/plhw/hf-api-client/data/v1 on it. Additionally API documentation can be found here.

for example, search the published practices around a coordinate.

Under the hood

When you call any method on the APIClient instance an access token is requested from our OAuth2 server. This access token is then cached for aditional uses up to the moment it expires or is deleted. It will then get a new access token.

Any calls to our API are now signed with that access token and is used by our permission system to determain if you have access or not.

Our API will accept and return json payload with are automaticly (de)encoded.

OAuth2 ClientCredentialsGrant

For machine to machine communication OAuth2 ClientCredentialGrant is appropiate. You must obtain the following information from us.

  1. client ID
  2. client secret
  3. scope

Your client side application should communicate via a proxy to our server.

Run all examples in the 'commerce' domain:

Upgrading

v2 has been rewritten for php 8+. Principals are the same but there are a few minor changes that will break your application.

Please see our examples to see how you interact with the api.


All versions of hf-api-client with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 | ^8.0
beberlei/assert Version ^3.3
fig/http-message-util Version ^1.1
laminas/laminas-cache Version ^3.0
laminas/laminas-cache-storage-adapter-filesystem Version ^2.0
laminas/laminas-http Version ^2.14
laminas/laminas-serializer Version ^2.10
league/oauth2-client Version ^2.6
ocramius/package-versions Version ^2.1
ramsey/uuid Version ^4.1
symfony/var-dumper Version ^5.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 plhw/hf-api-client contains the following files

Loading the files please wait ....