NOTE: This library is no longer being developed.
Welcome to the cortical.io Retina PHP client source code page.
Release Version: 2.2.0
This page contains
- How to use
- Change Log
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.
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->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
- New endpoints added:
- Language Detection Endpoint.
- Classify Endpoint.
- Compare Bulk Endpoint.
- Initial release version.