Skip to content

Instantly share code, notes, and snippets.

@ethanwillis
Created November 15, 2018 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethanwillis/caf1e46d3ca0e4a7fdc61b88a19bec8c to your computer and use it in GitHub Desktop.
Save ethanwillis/caf1e46d3ca0e4a7fdc61b88a19bec8c to your computer and use it in GitHub Desktop.
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 goes here",
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);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment