heroiclabs / nakama-js

JavaScript client for Nakama server written in TypeScript.
https://heroiclabs.com/docs/nakama/client-libraries/javascript/
Apache License 2.0
194 stars 55 forks source link

TypeError: nakamajs.UsersFetchMessage is not a constructor #11

Closed inmylo closed 6 years ago

inmylo commented 6 years ago

According to the docs at https://heroiclabs.com/docs/user-accounts/ I try to fetch users by ID.

But it seems there is no such function UsersFetchMessage, because the console error I get is: An error occured during session connection: TypeError: nakamajs.UsersFetchMessage is not a constructor

novabyte commented 6 years ago

Hi @imilo. Looks like the docs are out of date with the latest update to the JavaScript. Thanks for letting me know. In the meantime what you'll want to use is nakamajs.UsersFetchRequest.

novabyte commented 6 years ago

@imilo This is sorted. The new client tests show usage for fetching batches of users. https://github.com/heroiclabs/nakama-js/blob/master/test/client-user.test.js#L140