Code Monkey home page Code Monkey logo

fitbit.net's Introduction

Fitbit.NET API Client Library

License: Apache License 2.0

Features

  • Makes structured calls to the Fitbit API from .NET projects
  • Logs in users using the OAuth flow
  • Easy data storage using POCO objects responses
  • Mono compatibility
  • Based on the popular RestSharp (http://restsharp.org/)

Basic Usage

FitbitClient client = new FitbitClient(ConsumerKey, ConsumerSecret, userProfile.FitbitAuthToken, userProfile.FitbitAuthSecret);

Activity dayActivity = client.GetDayActivity(new DateTime(2012,7,1));

Project Contents

  • Fitbit - Client Library
  • Fitbit.Tests - NUnit tests
  • Fitbit.IntegrationTests - NUnit integration tests with the API
  • SampleWebMVC - A quick simple site using the client library

Getting Started

  1. Download the Project
  2. Go to dev.fitbit.com and create an app account (ConsumerKey and ConsumerSecret). If you are debugging in Visual Studio, set the callback URL to localhost and your local debug port, something like localhost:12345/Fitbit/Callback
  3. Open Web.config and replace the settings with the ones you obtained from Fitbit
<add key="FitbitConsumerKey" value="YOUR_CONSUMER_KEY_HERE" />
<add key="FitbitConsumerSecret" value="YOUR_CONSUMER_SECRET_HERE" />
  1. Run the sample web MVC project
  2. (optional) Setting up the Integration Tests (which connect to the live API) Open the Configuration.cs file and insert an app ConsumerKey and ConsumerSecret, then follow the 3 step process listed in that app. You're trying to end up with permanent oauth credentials, doing that once in NUnit and saving it locally.

Contributing

Lots of ways to contribute

  • Help fill in the rest of the API calls. Please use the existing calls as an example. Also, at least one unit test and integration test (NUnit) are required before I'll take a pull request.
  • Documentation - If you'd like to write some getting started guides, or more indepth walkthroughs, you're a hero to me.
  • Suggestions for code cleanup / shrinking - Please engage in some conversation here on Github.
  • Adding example pages to the SampleWebMVC site showing what the API can do.

Meta

This is an open source project in progress. If you're interested in getting involved and want to chat about it, please email me at [email protected] or twitter @aaronc

Additional Thanks to: Gavin Draper - github.com/gavdraper - desktop auth Jonathan Walz - github.com/jonathanwalz - food and weight logs Chris Fletcher - github.com/cfletcher - sleep data

fitbit.net's People

Contributors

aarondcoleman avatar cfletcher avatar ducas avatar fbridger avatar gavdraper avatar jonathonwalz avatar kenhutchinson avatar mjdavy avatar rc7502 avatar

Watchers

 avatar  avatar  avatar

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.