Skip to content

findify/php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Findify PHP SDK

This is a PHP SDK for our JSON API, you can check full documentation at Findify Developer Portal

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "require": {
    "findify/sdk": "1.*"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

require_once('/path-to-findify-sdk/autoload.php');

Getting Started

Please visit Findify Developer Portal for the full API spec and guides.

Authentication

Please check Findify Developer Portal to get the API key

Requesting the API

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Key', 'YOUR_API_KEY');

$api_instance = new Swagger\Client\Api\DefaultApi();
$autocomplete = new \Swagger\Client\Model\AutocompleteRequest(); // \Swagger\Client\Model\AutocompleteRequest | Request parameters for autocomplete

try {
    $result = $api_instance->autocompletePost($autocomplete);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->autocompletePost: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api-v3.findify.io/v3

Class Method HTTP request Description
DefaultApi autocompletePost POST /autocomplete
DefaultApi feedbackPost POST /feedback
DefaultApi recommendItemsFeaturedPost POST /recommend/items/featured
DefaultApi recommendItemsItemIdViewedViewedPost POST /recommend/items/{item_id}/viewed/viewed
DefaultApi recommendItemsItemIdsBoughtBoughtPost POST /recommend/items/{item_ids}/bought/bought
DefaultApi recommendItemsNewestPost POST /recommend/items/newest
DefaultApi recommendItemsTrendingPost POST /recommend/items/trending
DefaultApi recommendItemsViewedLatestPost POST /recommend/items/viewed/latest
DefaultApi recommendSlotPost POST /recommend/{slot}
DefaultApi searchPost POST /search
DefaultApi smartCollectionSlotPost POST /smart-collection/{slot}

Documentation For Models

Running tests

To run the unit tests:

composer install
./vendor/bin/phpunit lib/Tests

Contributing

Feel free to create issues, send pull requests or contact us at [email protected]!

Licence

MIT