Skip to content

Instantly share code, notes, and snippets.

@Jakosaur
Last active September 3, 2018 13:08
Show Gist options
  • Save Jakosaur/24e21c30cfc91a3013c7723b5785ccc7 to your computer and use it in GitHub Desktop.
Save Jakosaur/24e21c30cfc91a3013c7723b5785ccc7 to your computer and use it in GitHub Desktop.
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