Skip to content

Instantly share code, notes, and snippets.

@itsravenous
Created July 13, 2016 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsravenous/0b094bff34c420136966257fa06a4d64 to your computer and use it in GitHub Desktop.
Save itsravenous/0b094bff34c420136966257fa06a4d64 to your computer and use it in GitHub Desktop.
Resaving incomplete classification results in GET, not PUT
const api = require('panoptes-client/lib/api-client');
const auth = require('panoptes-client/lib/auth');
const credentials = {
login: process.env.PANOPTES_USER,
password: process.env.PANOPTES_PASSWORD,
}
auth.signIn(credentials)
.then(() => {
return api.type('classifications/incomplete').get();
})
.then(classifications => {
return classifications[0].save(); // GET https://panoptes-staging.zooniverse.org/api/classifications/<id>
})
.catch(console.error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment