Download the PHP package peterfox/graphaware-reco-client without Composer

On this page you can find all versions of the php package peterfox/graphaware-reco-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package graphaware-reco-client

GraphAware-Reco client for PHP

The client is designed to work in turning recommendations and scores from a GraphAware Recommendation endpoint into objects that are easy to work with.

The current implementation uses Guzzle but can easily build your own to work with any HTTP client library.

Install

Use composer to get the package

Basic Setup

A basic example can use the common implementations of the interfaces set out but it's easy to create your own or extend the common ones to make it work with your own tweaks to the recommendations end point you've created.

You can then just supply a parameter array to fetch a set of recommendations

Implement your own service

You can implement your own setup as needed, the common classes are mainly for examples and because they cover how most developers would set up a recommendation endpoint for their service.

Create a recommendation service

The purpose of the RecommendationService interface is to simply state the uri for the endpoint and any arguments that you'll use for to request your recommendations.

Create a response parser

Overall the response parser is simply used as a way of taking the json as an array and breaking it down into an array of recommendations. By default most setups will just be an array of recommendations already so nothing happens in the common example but if you need to change that you can.

Create a recommendation model

Your models might differ from the common example as each recommendation might provide more details about the nodes it's recommending, as such you can implement your own.

Create a recommendation factory

If you have made your own recommendation models you'll need to implement a factory for the client to initiate an instance of it using the date for each recommendation.

Testing

There's some basic testing you can run for the library, namely PHPSpec and Behat. To run the behat tests you must also run the tutu server to emulate a GraphAware Reco setup.

Run tutu

Run behat:

Run phpspec:


All versions of graphaware-reco-client with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle-services Version ~0.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package peterfox/graphaware-reco-client contains the following files

Loading the files please wait ....