Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const revOrder = function(location) {
var options = {
method: 'POST',
url: 'https://api-sandbox.rev.com/api/v1/orders',
json: true,
headers: {
Authorization: auth_header,
'Content-Type': 'application/json'
},
body: {
client_ref: "a username",
caption_options: {
inputs: [
{uri: location}
],
},
output_file_formats: ["SubRip"]
}
}
request(options, function (error, response, body) {
if (error) console.log(error);
console.log(response.headers.location);
// Here is where you would send a call to slack
send_slack_message("New order placed for " + options.body.client_ref + " api link: " + response.headers.location)
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.