Skip to content
A PHP client for Usabilla API
Branch: master
Clone or download
Latest commit 159e6c7 Dec 31, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src/Usabilla/API
tests/Usabilla/Tests/API
.gitignore
.travis.yml
LICENSE.MD
README.MD
composer.json
composer.lock
phpunit.xml.dist

README.MD

Usabilla PHP Client

Build Status Code Climate Test Coverage

This package allows PHP developers to gain access to the Usabilla resources such as buttons, feedback items, campaigns and their results. This packages is heavily inspired by the AWS PHP Client.

Resources

Features

  • Built for PHP 5.6+ and compliant with PSR-4.
  • Built on Guzzle Services.
  • Installable through Composer.

Getting Started

  1. Install Composer by following installation instructions on: https://getcomposer.org/download/
  2. Request Usabilla API credentials.
  3. Run composer require usabilla/usabilla-api-php on your project.

Quick Example

Request 5 feedback items belonging to a button.

<?php

require 'vendor/autoload.php';

use Usabilla\API\Client\UsabillaClient;

// Creates a new Usabilla client.
$client = new UsabillaClient('ACCESS_KEY', 'SECRET_KEY');

// Specify the parameters as mentioned in the service description.
$params = ['id' => 'BUTTON_ID', 'limit' => 5];

// Gets the command.
$command = $client->getCommand('GetWebsiteFeedbackItems', $params);

// Executes the command.
$response = $client->execute($command);

// Prints the received response.
print_r($response);

Using Command Line

You can use the command line to retrieve results from the API using scripts found in the example folder:

  • Using single_page.php : php single_page.php {command} {access-key} {secret-key}

  • Using single_page_with_id.php : php single_page_with_id.php {command} {id} {access-key} {secret-key}

More examples:

You can’t perform that action at this time.