Created
November 15, 2018 19:14
-
-
Save ethanwillis/caf1e46d3ca0e4a7fdc61b88a19bec8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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