Download the PHP package pramod/php-api-consumer without Composer

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

Api Consumer

This Package developed to request various external api without creating external service or traits.

Installation

You can install the package via composer:

Usage

Please Refer Test Case For Complete Reference which is located in tests/ExampleTest.php

Basic Syntax

Call Your Graphql Api (Next Release)

  1. Add Your Service setting on <<config/api-consumer.php>>

  2. Add your endpoint on your request class
    • In case of graphQl key inside with auto set Accept and Content-Type headers as application/json
    • Method is set as POST
    • Need to pass your graphql query in query key
    • Default It call toJson()

List of all public graphql Api to test

Descriptions

  1. consume

    Request Or find Service Name mapped in config file having basic application url,version definitions. It has two payload.

    consume($apiHostname, $hosturl)

    Default Hosturl will be .wlink.com.np

  2. via

    This method is used to point service end or function name written in service Namespace

    • Available Method
      • first parameter: Api endpoint or uri
      • Second parameter: if second param is true, first param must be method name defined inside your services Folder's class
  3. with

    Includes all parameter including headers, payload, query string and method name

  4. conversion method [By Default it call toJson() method]
    • toArray
    • toJson
    • toCollection
  5. ssl method
    • either true or false, By default its True
  6. timeout method
    • you can pass second value, By Default its 30 seconds
  7. retry method
    • Pass Int value to retry external api, By Default it doesnt retry.

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

HAPPY CODING :)

Test


All versions of php-api-consumer with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
guzzlehttp/guzzle Version ^7.4
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 pramod/php-api-consumer contains the following files

Loading the files please wait ....