Created
May 2, 2016 07:37
-
-
Save tim-kos/f23dd0541e7ffeb80f82c021d9838c30 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
var TransloaditClient = require('./lib/TransloaditClient'); | |
var transloadit = new TransloaditClient({ | |
authKey : '****', | |
authSecret : '****', | |
useSsl: false | |
}); | |
var assemblyOptions = { | |
params: { | |
template_id: "****" | |
}, | |
fields: { | |
url: "https://transloadit.com/img/video-merge-demo/mountain.jpg" | |
} | |
}; | |
transloadit.createAssembly(assemblyOptions, function(err, result) { | |
if (err) { | |
throw new Error(err); | |
} | |
console.log('success'); | |
var assemblyId = result.assembly_id; | |
console.log({ | |
assemblyId: assemblyId | |
}); | |
transloadit.getAssembly(assemblyId, function(err, data) { | |
console.log('assembly data', data); | |
}); | |
}); | |
// Check here to see that it is working | |
// https://api2.transloadit.com/assemblies/c74bfec006c111e681d097a9e49c730b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment