1.0.4 • Published 2 years ago

@couchyou/cy-desktop-emulator v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Desktop Emulator for Couchyou server framework

use this feature to debug node js script before implement it in Couchyou Studio Javascript function

Methods:

func.api.get_session_id() - get the session id

func.api.get_field_value(SESSION_ID,field_id) - get field value

func.api.set_field_value(SESSION_ID,field_id,value) - set field value

func.api.read_drive(SESSION_ID, filename, callback) - read file from the drive

func.api.write_drive(SESSION_ID, stream, filename, make_public, callback) - write file to the drive

func.api.callback(SESSION_ID, jobNo, callback) - perform callback on asynchronous calls to inform the framework when process done

func.api.error(SESSION_ID, msg, details) - write error log

Usage:

/////////////// USE THIS SAMPLE CODE FIRST /////////////

const func = require('@couchyou/cy-desktop-emulator')('pk_629c....', 'sk_629.....');

const SESSION_ID = func.api.get_session_id();

const jobNo = 0;

const callback = null;

//////////////////// YOUR CODE HERE /////////////////////