This is a client for the Venturz API. It is written in Node.js and is intended to be used as a library.
npm install venturz-api-client
const PlatformClient = require('venturz-api-client');
const platformClient = new PlatformClient({
apiAddress: 'https://api.venturz.com',
startupId: 'your_startup_id',
authorizationToken: 'your_authorization_token'
});
const user = await platformClient.getUserById('user_id');
const exists = await platformClient.isUserExistsById('user_id');
const user = await platformClient.getUserByAuthorizationToken('authorization_token');
const expired = await platformClient.expireAuthorizationByToken('authorization_token');
Creates a new instance of the PlatformClient.
Type: Object
Type: String
The address of the Venturz API.
Type: String
The ID of your startup.
Type: String
The authorization token of your startup.
Gets a user by ID.
Type: String
The ID of the user.
Type: Object
The user.
Checks if a user exists by ID.
Type: String
The ID of the user.
Type: Boolean
Whether the user exists.
Gets a user by authorization token.
Type: String
The authorization token of the user.
Type: Object
The user.
Expires a user's authorization token.
Type: String
The authorization token of the user.
Type: Boolean
Whether the authorization token was expired.
Sets a user's property by ID.
Type: String
The ID of the user.
Type: String
The property of the user.
Type: String
The value of the property.
Type: Boolean
Whether the user property was set.
Gets a user's property by ID.
Type: String
The ID of the user.
Type: String
The property of the user.
Type: String
The default value of the property.
Type: String
The value of the user property.
Gets the status of a user's metric.
Type: String
The ID of the user.
Type: String
The name of the metric.
Type: Object
The status of the user's metric.
Checks if a user's metric can be allowed.
Type: String
The ID of the user.
Type: String
The name of the metric.
Type: Boolean
Whether the user's metric can be allowed.
Tries to commit a user's metric usage.
Type: String
The ID of the user.
Type: String
The name of the metric.
Type: Number
The count of the metric usage.
Type: Boolean
The result of the try commit metric usage.
Commits a user's metric usage.
Type: String
The ID of the user.
Type: String
The name of the metric.
Type: Number
The count of the metric usage.
Type: Boolean
The result of the commit metric usage.