FatSecret Platform API Documentation

Profile - Exercise Diary: Get Calories Expended For Month

OAuth 1.0 Deprecated
Description

Returns the summary estimated daily calories expended for a user's exercise diary entries for the month specified. Use this call to display total energy expenditure information to users about their exercise and activities for a nominated month. Days with no saved exercise diary entries are not included.

Parameters
All
NAME TYPE REQUIRED DESCRIPTION
method String Required MUST be "exercise_entries.get_month"
date Int Optional Number of days since January 1, 1970 (default value is the current day)
format String Optional The desired response format. Valid response formats are "xml" or "json" (default value is "xml").
Response
There are no storable values returned by this call.

Each month element contains information as follows:

NAME TYPE DESCRIPTION
from_date_int Int First day expressed as the number of days elapsed since January 1, 1970
to_date_int Int Last day expressed as the number of days elapsed since January 1, 1970

Each day element contains information as follows:

NAME TYPE DESCRIPTION
date_int Int Date expressed as the number of days elapsed since January 1, 1970
calories Decimal Energy content in kcal

Example Response

Example 1:

<?xml version="1.0" encoding="utf-8"?>
<month xmlns="http://platform.fatsecret.com/api/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://platform.fatsecret.com/api/1.0/ http://platform.fatsecret.com/api/1.0/fatsecret.xsd">
  <from_date_int>14276</from_date_int>
  <to_date_int>14303</to_date_int>
  <day>
    <date_int>14276</date_int>
    <calories>2595</calories>
  </day>
  <day>
    <date_int>14282</date_int>
    <calories>3590</calories>
  </day>
  <day>
    <date_int>14288</date_int>
    <calories>2292</calories>
  </day>
  <day>
    <date_int>14294</date_int>
    <calories>2657</calories>
  </day>
  <day>
    <date_int>14303</date_int>
    <calories>2772</calories>
  </day>
</month>

Example 1:

{
  "month": {
    "day": [
      {
        "calories": "2595",
        "date_int": "14276"
      },
      {
        "calories": "3590",
        "date_int": "14282"
      },
      {
        "calories": "2292",
        "date_int": "14288"
      },
      {
        "calories": "2657",
        "date_int": "14294"
      },
      {
        "calories": "2772",
        "date_int": "14303"
      }
    ],
    "from_date_int": "14276",
    "to_date_int": "14303"
  }
}
Error Codes
CODE TYPE DESCRIPTION
2 OAuth 1.0 Missing required oauth parameter: '<details>'
3 OAuth 1.0 Unsupported oauth parameter: '<details>'
4 OAuth 1.0 Invalid signature method: '<details>'
5 OAuth 1.0 Invalid consumer key: '<details>'
6 OAuth 1.0 Invalid/expired timestamp: '<details>'
7 OAuth 1.0 Invalid/used nonce: '<details>'
8 OAuth 1.0 Invalid signature: '<details>'
9 OAuth 1.0 Invalid access token: '<details>'