FatSecret Platform API Documentation

Exercises: Get All

OAuth 1.0 Deprecated
Description

This is a utility method, returning the full list of all supported exercise type names and their associated unique identifiers.

Parameters
All
NAME TYPE REQUIRED DESCRIPTION
method String Required MUST be "exercises.get"
format String Optional The desired response format. Valid response formats are "xml" or "json" (default value is "xml").
Premier Exclusive
Name Type Required Description
region String Optional Results will be filtered by region. E.G.: "FR" returns results from France
language String Optional (Ignored unless region is also specified) Results will be in the specified language. E.G.: "fr" returns results in French
Response
The only storable value returned by this call is exercise_id.

Each exercise element contains information as follows:

NAME TYPE DESCRIPTION
exercise_id Long Unique exercise identifier
exercise_name String Name of the exercise

Example Response

Example 1:

<?xml version="1.0" encoding="utf-8"?>
<exercise_types 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">
  <exercise>
    <exercise_id>0</exercise_id>
    <exercise_name>Other</exercise_name>
  </exercise>
  <exercise>
    <exercise_id>2</exercise_id>
    <exercise_name>Resting</exercise_name>
  </exercise>
  <exercise>
    <exercise_id>1</exercise_id>
    <exercise_name>Sleeping</exercise_name>
  </exercise>
</exercise_types>

Example 1:

{
  "exercise_types": {
    "exercise": [
      {
        "exercise_id": "0",
        "exercise_name": "Other"
      },
      {
        "exercise_id": "2",
        "exercise_name": "Resting"
      },
      {
        "exercise_id": "1",
        "exercise_name": "Sleeping"
      }
    ]
  }
}
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>'