There are a lot of RemarkApp related projects that are written by node.js. But there is one common API for all of them. So this repo contains node.js package which provides common gateway to access Remark API.
To install this package, please, run the next command in the terminal:
$ npm install alterego-labs/remark-api-client-node --save
To be able to make requests to the login endpoint add the following line into the file in which you want to do that:
import { AuthApiGateway } from 'remark-api-client-node';And then you can run request and process responses something like this:
AuthApiGateway.login({ login: 'SomeUser001' })
.then((response_json) => {
Store.dispatch(receiveAccessToken(response_json.data.user));
return response_json;
}).catch(function(error) {
var response_json = error.response;
this.setState({ errors: response_json.data.errors });
});Import appropriate class:
import { UsersApiGateway } from 'remark-api-client-node';Example of the common usage:
UsersApiGateway.sendPushToken('sergio', {
type: 'android', value: 'asdsada'
});