Download the PHP package diegomel/client-consumer without Composer

On this page you can find all versions of the php package diegomel/client-consumer. 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 client-consumer

ApigilityConsumer

Latest Version Build Status Coverage Status PHPStan Downloads

ZF Apigility Client module to consume API Services.

This is README for version ^2.0 which only support php ^7.1 with zend-servicemanager v3 and zend-json v3

For version 1, you can read at version 1 readme which still support php ^5.6|^7.0 with zend-servicemanager v2.

Consider upgrading :)

Installation

Installation of this module uses composer.

For its configuration, copy vendor/samsonasik/apigility-consumer/config/apigility-consumer.local.php.dist to config/autoload/apigility-consumer.local.php and configure with your api host url (required), oauth, and/or http auth settings:

Then, enable it :

Using at Zend\Expressive

You can use at Zend\Expressive, after set up local config/autoload/apigility-consumer.local.php like above, you can copy config/expressive.local.php.dist to config/autoload/expressive.local.php, and you can use it.

Services

1. ApigilityConsumer\Service\ClientAuthService

It used for oauth, with usage:

Specify Oauth "client_id"

You can specify what client_id to be used on Http Auth with provide withClient():

Reset Oauth "client_id"

We can re-use the client service and use back default "client_id" with resetClient():

2. ApigilityConsumer\Service\ClientService

For general Api Call, with usage:

a. General RAW Json data

b. With Upload file

You can also do upload with it to upload file to API Service. For example:

With include Http (basic or digest) Authentication

if api call require authentication for basic or digest, you can apply ->withHttpAuthType():

that will read of specified basic or digest auth config we defined at config/autoload/apigility-consumer.local.php.

If you want to specify custom username and password for the Http Auth on callAPI() call, you can specify via $data:

Specify "client_id" on Http Auth

On Http Auth, there is no "client_id" definition concept. On ClientService, they are keys that represent just like "client_id" to ease switch client specific http auth.

To allow You can specify what "client_id" to be used on Http Auth with provide withClient():

Reset "client_id" Http Auth

We can re-use the client service and use back default "client_id" with resetClient():

Reset Http Auth Type

After one or both HttpClient::AUTH_BASIC or HttpClient::AUTH_DIGEST used, we can re-use the client service and use back normal API Call without Http Authentication with apply ->resetHttpAuthType():

Client Result of callAPI() returned usage

The $clientResult will be a ApigilityConsumer\Result\ClientResult or ApigilityConsumer\Result\ClientAuthResult instance, with this instance, you can do:

Contributing

Contributions are very welcome. Please read CONTRIBUTING.md


All versions of client-consumer with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
zendframework/zend-json Version ^3.0
zendframework/zend-http Version ^2.6
zendframework/zend-servicemanager Version ^3.3.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 diegomel/client-consumer contains the following files

Loading the files please wait ....