OTHER License
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.
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()
}