Last active
September 3, 2018 13:08
-
-
Save Jakosaur/24e21c30cfc91a3013c7723b5785ccc7 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 Traveler = require('the-traveler').default; | |
const Enums = require('the-traveler/build/enums'); | |
const Manifest = require('the-traveler/build/Manifest').default; | |
const traveler = new Traveler({ | |
apikey: '', | |
userAgent: 'yourUserAgent' //used to identify your request to the API | |
}); | |
function refreshManifest() { | |
traveler.getDestinyManifest().then(result => { | |
traveler.downloadManifest(result.Response.mobileWorldContentPaths.en, './manifest.content').then(filepath => { | |
const manifest = new Manifest(filepath); | |
manifest.queryManifest('SELECT name FROM sqlite_master WHERE type="table"').then(queryResult => { | |
// console.log(queryResult); | |
console.log("Manifest Refreshed") | |
}).catch(err => { | |
console.log(err); | |
}); | |
}).catch(err => { | |
console.log(err); | |
}) | |
}); | |
} | |
refreshManifest(); | |
setTimeout(refreshManifest, 10000); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment