Download the PHP package samsonasik/apigility-consumer without Composer

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

ApigilityConsumer

Latest Version ci build Code Coverage PHPStan Downloads

Laminas API Tools Client module to consume API Services.

This is README for version ^4.0 which only support php ^8.0 with laminas-servicemanager v3 and laminas-json v3.

For version ^3.0 you can read at version 3 readme which only support php ^7.1 with laminas-servicemanager v3 and laminas-json v3.

For version ^2.0, you can read at version 2 readme 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 Mezzio

You can use at Mezzio, after set up local config/autoload/apigility-consumer.local.php like above, you can copy config/mezzio.local.php.dist to config/autoload/mezzio.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 apigility-consumer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
laminas/laminas-http Version ^2.14
laminas/laminas-json Version ^3.2
laminas/laminas-servicemanager Version ^3.6
laminas/laminas-stdlib Version ^3.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 samsonasik/apigility-consumer contains the following files

Loading the files please wait ....