PHPackages                             adeelnawaz/polr-api-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. adeelnawaz/polr-api-bundle

ActiveSymfony-bundle[API Development](/categories/api)

adeelnawaz/polr-api-bundle
==========================

Integration of Polr API Client into Symfony

1.0.1(5y ago)03.7kMITPHPCI failing

Since May 30Pushed 5y agoCompare

[ Source](https://github.com/adeelnawaz/polr-api-bundle)[ Packagist](https://packagist.org/packages/adeelnawaz/polr-api-bundle)[ RSS](/packages/adeelnawaz-polr-api-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

Polr API Bundle
===============

[](#polr-api-bundle)

*(**Note:** This version is not compatible with Symfony 3. Please use version [0.1.1](https://github.com/adeelnawaz/polr-api-bundle/releases/tag/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
------------

[](#installation)

### Step 1: Configuration

[](#step-1-configuration)

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

```
polr_api:
  api_url: '%env(POLR_API_URL)%'
  api_key: '%env(POLR_API_KEY)%'
  api_quota: '%env(int:POLR_API_QUOTA)%'
```

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

```
POLR_API_URL=https://your-polr-app.com
POLR_API_KEY=your_polr_api_key
POLR_API_QUOTA=0 # Set to zero for unlimited
```

**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

[](#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:

```
$ composer require adeelnawaz/polr-api-bundle
```

### Step 3: Enable the Bundle

[](#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`:

```
