No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
php-client-sdk
.gitignore
LICENSE
README.md

README.md

php-client-sdk

NOTE: This library is no longer being developed.

cortical.io

Welcome to the cortical.io Retina PHP client source code page.

Release Version: 2.2.0

This page contains

  • Introduction
  • Dependencies
  • How to use
  • Change Log

Introduction

cortical.io's PHP client - a simple PHP http client which simplifies the communication with the Retina server using the Retina's REST API. The source code is split into the following:

  • / Endpoint files - One for each endpoint group.
  • /models - The return object classes.
  • /tests - Unit tests of all endpoints and examples of their usage.

Dependencies

cortical.io's Retina PHP client has been tested with PHP Version 5.6.3 and with all 2.x.x versions of cortical.io's api.

To use the API you will need to obtain an api key.

How to use/build

  • You will need PHP (version 5.6.3 has been tested).
  • Install PHPUnit, this is library for run integration tests (optional installation).
  • Clone all the sources from our Github repository.

You should now be able to use the client in the following way (obtaining a semantic representation of the term apple):

    require_once("ApiClient.php");
    $API_KEY = "your_api_key";
    $BASE_PATH = "http://api.cortical.io/rest";
    $RETINA_NAME = "en_associative";
    $apiClient = new APIClient($API_KEY, $BASE_PATH);
    $termsApi = new TermsApi($apiClient);
    
    $terms = $termsApi->getTerm("apple", true, $RETINA_NAME);
    echo serialize($terms[0]->fingerprint->positions);

For further documentation about the Retina-API and information on cortical.io's 'Retina' technology please see: http://www.cortical.io/developers_tutorials.html. Also the tests folder contains more examples of how to use client.

If you have any questions or problems please visit our forum: http://www.cortical.io/developers_forum.html

Change Log

v 2.2.0

  • New endpoints added:
    • Language Detection Endpoint.
    • Classify Endpoint.
    • Compare Bulk Endpoint.

v 2.1.0

  • Initial release version.