Giter VIP home page Giter VIP logo

Comments (6)

OndraFiedler avatar OndraFiedler commented on September 2, 2024 1

Can you please share what was the issue?

Regarding the latter issue, it will be probably connected to the import of the Requests.

use Recombee\RecommApi\Requests as Reqs;

...

$req = new Reqs\AddUser("user1");

Please see the code examples for more info.

from php-api-client.

AdamMiltonBarker avatar AdamMiltonBarker commented on September 2, 2024

Resolved this but now Uncaught Error: Class "AddUser" not found when using $client->send(new AddUser($user_id));

from php-api-client.

AdamMiltonBarker avatar AdamMiltonBarker commented on September 2, 2024

The code examples that I found for AddUser do not have Reqs\AddUser on AddUser, I just worked this out so all good.

from php-api-client.

AdamMiltonBarker avatar AdamMiltonBarker commented on September 2, 2024

Sorry thought I had resolved it, Reqs\AddUser gives Uncaught Recombee\RecommApi\Exceptions\ResponseException: {"error": "Method not allowed.", "statusCode": 405, "statusMessage": "method not allowed"}

from php-api-client.

AdamMiltonBarker avatar AdamMiltonBarker commented on September 2, 2024

Will not work, I have been able to import items but using the same credentials I get

Fatal error: Uncaught Recombee\RecommApi\Exceptions\ResponseException: {"error": "Method not allowed.", "statusCode": 405, "statusMessage": "method not allowed"} in /home/cognitech/vendor/recombee/php-api-client/src/RecommApi/Client.php:216

$req = new Reqs\AddUser(USER);
$client->send($req);

Strangely , there are users in the db

from php-api-client.

OndraFiedler avatar OndraFiedler commented on September 2, 2024

The most probable reason is passing an empty or NULL userId, leading to a wrong URL of the REST call.
Can you please check what is being passed to AddUser?

from php-api-client.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.