So you'd like to create an interesting application on top of the data available from the Fitbit REST API. Provided you want to use ruby to build the interesting application, this guide will help you to get setup to use fitgem to interact with the API.

This application exists to teach users on several levels:

  1. As a reference app for how to write a real, OAuth-enabled application (the source for this app is available on github!)
  2. As a testbed for the fitgem library in the context of a real, OAuth-enabled application.
  3. As in-depth examples on how to use the fitgem library. The fitgem API is documented thoroughly, but this site provides a way to look at the method calls in the context of executing a task (getting user data, logging an activity, etc.)

Guide Topics

This introduction section is meant to define terms and make sure you have the right context for the rest of the guide. The guide covers five broad topics that should get you on your way to building an app using ruby, some kind of ruby web framework, and fitgem.

Playing With the Fitgem API

Using Fitgem walks through the conventions used by the gem, and describes how to use the library to read to and write from the Fitbit REST API. By the end of this section you should be able to write command-line ruby scripts that can read or write data to Fitbit.

Fitbit Resources: User Information

The Fitbit Resources section describes the various resources you can read and write through the REST API in more detail, including examples for various types of resources

Conventions Used in This Guide

Tooltips

Throughout the guide, when you see a text link like this it denotes an available tooltip. By hovering over it you will see additional information.

Links to Github Source and Fitbit API Docs

Throughout the examples there are links to the source code for this site, as well as links to the Fitbit API documentation. When linking to either, the link will always appear like this.

Live Data

In the examples are several areas where live data from the Fitbit API will appear if you have created an account and linked it with a corresponding Fitbit account. This functionality is part of using this application as a real-life test of the fitgem library, and you don't have to create or link accounts to in order to view the guide.

Login with Fitbit to view Live Data examples