You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I will add more finds today. However just wanted to point something out:
client.users.find({ id: '1234' }, callback);
is different to:
client.users.find({ user_id: '1234' }, callback);
id is set automatically by Intercom. It is the primary key for the resource you are saving. user_id is an optional identifier you can set. Often people store their own database ids in there. More info here.
Firstly, thanks for writing a sweet API!
Secondly, the following code would be very useful and not difficult to implement:
//Find user by id
client.users.find({ id: '1234' }, callback);
would be better represented as:
//Find user by id
(client.users.find({ user_id: '1234' }, callback);
as this would be less misleading. This would not be a difficult fix either and would be much more practical to use.
As well as the above issue, the following would be extremely useful:
// Find user by email
client.users.find({ email: '1234@gmail.com' }, callback);
It could be implemented in user.js using:
client.get('/users/?email=${email}', {}, callback);
Cheers!
The text was updated successfully, but these errors were encountered: