You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
871 B
37 lines
871 B
var freckle = require( "../" );
|
|
|
|
// Add subdomain and token information here
|
|
// leaving this blank will keep API test account information
|
|
freckle( "<your subdomain here>", "<your token here>" );
|
|
|
|
freckle.users.list(function( err, users ) {
|
|
console.log( users );
|
|
});
|
|
|
|
freckle.users.show(<id>, function( err, user ) {
|
|
console.log( user );
|
|
});
|
|
|
|
freckle.tags.list(function( err, tags ) {
|
|
console.log( tags );
|
|
});
|
|
|
|
freckle.users.token({ auth: [ "<email address>", "<password>" ] }, function( err, token ) {
|
|
console.log( token );
|
|
});
|
|
|
|
freckle.entries.add({
|
|
'entry': {
|
|
'minutes': "<time>"
|
|
, 'user': "<email address>"
|
|
, 'project_id': <project id>
|
|
, 'description': '<tag>'
|
|
, 'date': freckle.date( <date object> )
|
|
}
|
|
}, function( err, data ) {
|
|
console.log( err, data );
|
|
});
|
|
|
|
freckle.projects.list(function( err, projects ) {
|
|
console.log( projects );
|
|
});
|