This Javascript package creates layer to communicate with NOTIFIT administration back-end.
npm install notifit-admin
cd node_modules/notifit-admin
npm test
var sdk = require('notifit-admin')
sdk.register('my_username', 'John', 'Doe', '[email protected]', 'mySuperPass12345').then(function(result){
console.log('User registered')
}).catch(function(err){
console.error('Error: something went wrong')
console.error(err)
})
sdk.login('my_username', 'mySuperPass12345').then(function(result){
console.log('User logged in')
}).catch(function(err){
console.error('Error: something went wrong')
console.error(err)
})
sdk.createProject('My first project', 'BestCoders', 'Test project', 'My type').then(function(result){
console.log('Project created')
console.log(result) // created project data can be accessed here
}).catch(function(err){
console.error('Error: something went wrong')
console.error(err)
})
var project = {
Token: 'xyz' // You must know the project token
}
sdk.updateProject(project.Token, 'My first project v2', 'BestCoders v2', 'Test project v2').then(function(result){
console.log('Project updated')
}).catch(function(err){
console.error('Error: something went wrong')
console.error(err)
})
sdk.getProjects().then(function(result){
console.log('Project fetched')
console.log(result)
}).catch(function(err){
console.error('Error: something went wrong')
console.error(err)
})
sdk.createAppleApp(project.Token, 'iOS super app', false).then(function(result){
console.log('Application created')
}).catch(function(err){
console.error('Error: something went wrong')
console.error(err)
})
sdk.getAppleKeyValues(project.Token).then(function(result){
console.log(result)
}).catch(function(err){
console.error('Error: something went wrong')
console.error(err)
})
sdk.logout()