Giter Site home page Giter Site logo

go.fitbit's Introduction

GoFitbit

Wrapper for the OAuth based REST API of Fitbit.com. For the full documentation please see <a href=""http://dev.fitbit.com">dev.fitbit.com.

The development of this library is still in ALPHA so it still could be a bit buggy. So feel free to request merges and bug fix any problems in this repo.

Usage

Before you can get started with the API you'll have to register your application at dev.fitbit.com and obtain consumer key and secret for your application.

This library will handle the OAuth authorisation. To register your application you'll have to grant access to your application with your fitbit account. This can be done with the gofitbit-client repo.

func main() {
	//Init config
	config := &Config{
		false, //Debug
		false, //Disable SSL
	}

	//Initialise FitbitAPI
	fapi, err := NewAPI("--", "--", config)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("API initialised")

	//Add client
	client, err := fapi.NewClient()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("New client initialised")

	//Call methods from client
	client.GetProfile()
	client.GetRecentActivities()
}

Changelog

  • Version 0.4: 08 April 2014
  • Added support for Body, Alarms, Device, Heartrate, Glucose, Water, Sleep
  • Tested 75% of the implemented functions
  • Minor bug fixes (compiler issues, wrong URLs, etc.)
  • Version 0.3: 11 March 2014
  • Added support for activities
  • Version 0.2: 11 March 2014
  • Fixed to use persisten OAuth token
  • Added data retriever
  • Added Profile struct to retrieve basic profile data
  • Version 0.1: 10 March 2014
  • Initial commit
  • Partial support for activities and profile
  • Protected setup so client only calls public methods
  • LICENSE and README.md files

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.