Download the PHP package adeelnawaz/polr-api-bundle without Composer

On this page you can find all versions of the php package adeelnawaz/polr-api-bundle. 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 polr-api-bundle

Polr API Bundle

(Note: This version is not compatible with Symfony 3. Please use version 0.1.1 for apps running on Symfony 3)

This bundle provides Polr API Client integration in Symfony (4|5). This bundle is simply a wrapper over PHP package adeelnawaz/polr-api-client. The bundle exposes a service PolrApiService that can be utilized to call API methods of the PolrApi class from API Client package.

Installation

Step 1: Configuration

Create a configuration file in your config directory named polr_api.yml containing the following configuration:

In .env[.*] file, add the following environment variables

Note: The POLR_API_QUOTA value makes sure that your application separates the API calls with enough delay that you don't exceed your calls/minute quota. If you specify a smaller value than your API key's actual quota then you will get an error from your Polr API.

Step 2: Install via Composer

In your console, navigate to your Symfony project directory and execute the following command to download the latest stable version of this package:

Step 3: Enable the Bundle

For apps with Symfony Flex, this step is not needed. Otherwise add the bundle to the list of registered bundles in config/bundles.php:

All done!

Usage

In order to consume the API, use the service PolrApiService. Create DTO object(s) (Adeelnawaz\PolrApiClient\DTO\Link, etc) for the method you intend to use and call the method. This will result in calling the respective REST API endpoint and returning the relative Adeelnawaz\PolrApiClient\DTO\Response object.
(See Docblocks of the PolrApiService methods for further information on input/output DTOs)

In case of a failed API call, the PolrApiService methods throw Adeelnawaz\PolrApiClient\Exception\ApiResponseException. The exception has getters for code, message, and a machine readable short string error_code returned by the Polr REST API.

Example controller:

See also

Polr API Client Documentation.


All versions of polr-api-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/framework-bundle Version ^4.4||^5.1
adeelnawaz/polr-api-client Version 1.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 adeelnawaz/polr-api-bundle contains the following files

Loading the files please wait ....