Realy simple and lightweight REST client for parse-server
import PSC from 'psc';
import fetch from 'node-fetch';
interface SomeObject {
fooBar: string;
}
const config = {
url: 'http://localhost/parse',
applicationId: 'some-key'
}
const psc = new PSC(config, fetch);
const boundClient = await psc.login('username', 'password')
const query = boundClient.query<SomeObject>('ClassName');
query.equal('name', 'Hello')
const object = await query.first()
console.log(object.fooBar);
// Run a function with the master key
const result = await psc.Master.run('someFunction', { objectId: 'abc123' });
console.log(output);