client.status
Checks that the Velo API is reachable and that the client's credentials are valid.
Imports
const velo = require('velo-node')Example
const velo = require('velo-node')
async function main() {
const client = new velo.Client('api_key')
const status = await client.status()
if (status === 'ok') {
console.log('Connected to the Velo API')
}
}
main()Definition
status(): Promise<string>Parameters
None.
Return Type
- Type:
Promise<string>
Resolves to the API response body. A successful status request returns "ok".
Errors
Rejects with an Error if the request fails or the API returns an unsuccessful HTTP response.