Coder Social home page Coder Social logo

Comments (2)

brad avatar brad commented on July 29, 2024

@tenderitaf Try authd_client.log_activity(data['activityLog'])

Still, some of your parameters aren't right. Your json file is an example of what fitbit will respond with after you post an activity log. Your POST should have these parameters:

POST Parameters

activityId optional/required This is the Activity ID of the activity, directory activity, or intensity level activity. If you pass directory activity id, Fitbit calculates and substitutes it with the corresponding intensity level activity id based on the specified distance and/or duration.

activityName optional/required Custom activity name. Either activityId or activityName must be provided.

manualCalories optional/required Calories burned, specified manually. Required with activityName parameter, otherwise optional.

startTime required Activity start time. Hours and minutes in the format HH:mm:ss.

durationMillis required Duration in milliseconds.

date required Log entry date; in the format yyyy-MM-dd.

distance optional/required Distance; required for logging directory activity. In the format X.XX and in the selected distanceUnit or in the unit system that corresponds to the Accept-Language header provided.

distanceUnit optional Distance measurement unit. Steps units are available only for "Walking" (activityId=90013) and "Running" (activityId=90009) directory activities and their intensity levels.

from python-fitbit.

tenderitaf avatar tenderitaf commented on July 29, 2024

Thanks a lot it worked :)

from python-fitbit.

Related Issues (20)

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.