Giter VIP home page Giter VIP logo

nodefreckle's Introduction

Node.js Freckle/Noko api bindings

Created by Tim Branyen @tbranyen

These bindings work specifically with the Noko (formally Freckle) V1 API. If you are not currently using Noko for time management, you totally should! It rocks! https://nokotime.com, it was created by @madrobby who has been excellent with his support.

Note: Freckle was renamed to Noko in Q2/2019. Any references to Freckle or Noko are the same.

Installing

Easy install (Recommended)

This will install and configure everything you need to use freckle.

$ sudo npm install freckle

API Example Usage

var freckle = require( 'freckle' );

// All freckle commands are sent over HTTPS

// Add your own subdomain and API token information
freckle( "mysubdomain", "askdfljsdjflkj3" );

// List all users
freckle.users.list(function( err, users ) {
  if( err ) {
    throw new Error( err );
  }

  console.log( users );
});

// Show a specific user
freckle.users.show( 5, function( err, user ) {
  if( err ) {
    throw new Error( err );
  }

  console.log( user );
});

// Fetch a users api token
freckle.users.token({ auth: [ "[email protected]", "mypassword" ] }, function( err, token ) {
  if( err ) {
    throw new Error( err );
  }

  console.log( token );
});

// Adding a new time entry
freckle.entries.add({
  'entry': {
    'minutes': "1hr"
  , 'user': "[email protected]"
  , 'project_id': 54
  , 'description': 'opensource'
  , 'date': freckle.date( new Date )
  }
}, function( err, data ) {
  if( err ) {
    throw new Error( err );
  }

  console.log( err, data );
});

####Search Example Usage

see http://madrobby.github.io/freckle-apidocs/entries.html for search argument specification.

// List all PROGRAMMING entries
var args = {'search': {'tags': 'PROGRAMMING'}};
freckle.entries.search(args, function( err, entries ) {
  if( err ) {
    throw new Error( err );
  }

  console.log( entries );
});

Note: When dealing with the entries API, use the search command instead of the list command. All pages of entries will be returned at once so the result set can become quite large if you do not use search with proper filters.

Release information

v0.0.2:

* Rename to noko

v0.0.1:

* Initial potentially complete bindings

Getting involved

If you find this project of interest, please document all issues and fork if you feel you can provide a patch.

nodefreckle's People

Contributors

fyaconiello avatar j33n avatar madrobby avatar tbranyen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nodefreckle's Issues

entries.search?

According to the Freck API docs you should be able to search through entries. Perhaps we could get this added? Perhaps it already is possible and I'm just not understanding how?

... -d 'search[tags]=development,design' -d 'search[people]=342,7653,212'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.