screendoor-api-node
NodeJS module for interacting with the Screendoor API via the Request module.
http://dobtco.github.io/screendoor-api-docs/
Available Endpoints
- GET /sites/:site_id/projects
- GET /sites/:site_id/projects/:project_id
- GET /projects/:project_id/response_fields
- GET /projects/:project_id/responses/:response_id
- PUT /projects/:project_id/responses/:response_id
- POST /projects/:project_id/responses
- POST /form_renderer/
Example Usage
var ScreendoorAPI =scrndr = api_key
GET /sites/:site_id/projects
scrndr;
GET /sites/:site_id/projects/:project_id
scrndr;
GET /projects/:project_id/response_fields
scrndr;
GET /projects/:project_id/responses/:response_id
scrndr;
POST /projects/:project_id/responses
var response_fields ="1": "Test Name""2": "test@test.com""3": "New application for your job on Startuply";var options ='skip_email_confirmation': true'skip_notifications': true'skip_validation': true;scrndr;
Note: Arrays do not currently work as POST values, so labels cannot be sent through Set Project Response. However they can be used with Update Project Response.
PUT /projects/:project_id/responses/:response_id
var response_fields ="1": "Test Name""2": "test@test.com""3": "New application for your job on Startuply";var options =force_validation : falselabels : 'test'status : 'Open';scrndr;
POST /form_renderer/
scrndr;
encoded_file
should be the Base64 encoded content of the file you want to upload, with everything before the comma removed. Ex:
var encoded_file_parts = uploaded_fileencoded_file = encoded_file_parts1;
file_options
should be an Object containing the filename and the content-type. You can extract the content-type from the Base64 encoded file. Ex:
var matches = encoded_file_parts0file_options =contentType: matches1filename: 'replace_with_your_filename.xxx';
Errors
Errors are returned as either null or instances of the NodeJS Error Object with a message.