Last active
April 22, 2019 21:19
-
-
Save anthonybudd/cc2d2118489f406109b9e328871f46be to your computer and use it in GitHub Desktop.
This file contains hidden or 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 TPS = require('3ps-js') | |
const fs = require('fs') | |
var tps = new TPS('YOUR_API_KEY') | |
tps.components.create({ | |
name: 'Dice', | |
group_id: '00ffedbb-ff29-5138-9b5d-cd1f6ae3bc6b', | |
is_public: false, | |
stl: fs.readFileSync('./dice.stl'), | |
// Default Print Settings | |
material: 'PLA', | |
process: 'FDM', | |
resolution: '200', | |
infill: '20', | |
color: 'Red', | |
}).then(function(component) { | |
tps.print({ | |
group_id: '00ffedbb-ff29-5138-9b5d-cd1f6ae3bc6b', | |
fulfillment_type: 'standard', | |
components: [{ | |
id: component.id | |
}] | |
}).then(function (job) { | |
console.log(`Printing ${job.id}`) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment