Skip to main content

PHP SDK

Less than 1 minute

PHP SDK

Note

The PHP SDK is under development, and APIs might be changed in later versions. Pull requests are welcomed: https://github.com/gorse-io/php-gorseopen in new window

Packagist Versionopen in new windowPackagist Downloadsopen in new window

Install

composer require gorse/php-gorse

Usage

$client = new Gorse("http://127.0.0.1:8087/", "api_key");

$rowsAffected = $client->insertFeedback([
    new Feedback("star", "bob", "vuejs:vue", "2022-02-24"),
    new Feedback("star", "bob", "d3:d3", "2022-02-25"),
    new Feedback("star", "bob", "dogfalo:materialize", "2022-02-26"),
    new Feedback("star", "bob", "mozilla:pdf.js", "2022-02-27"),
    new Feedback("star", "bob", "moment:moment", "2022-02-28")
]);

$client->getRecommend('10');