1.1.113 • Published 5 months ago

endomondo-unofficial-api v1.1.113

Weekly downloads
10
License
MIT
Repository
github
Last release
5 months ago

logomakr_7drp6q

All Contributors

Build Status Coverage Status npm GitHub license Maintenance Donate

This is a promise based unofficial endomondo api.

installation

npm install endomondo-unofficial-api

Use

the API provides the next functionalities

Authentication

Get login information and tokens. The next snippet describes an example of the call:

var authenticate = require('endomondo-unofficial-api').authenticate

authenticate({email: <email>, password: <password>})
    .then((result) => console.log(result))
    .catch((result) => console.log(result))

the complete set of parameters get determined by:

{
    email: params.email,
    password: params.password,
    deviceId: params.uuid || uuid,
    country: params.country || 'ES',
    action: params.action || 'pair'
}

The result of the promise will be if failed the error that caused it and if success an result object similar to this:

{ 
  authToken: <token>,
  measure: <mesure unit>,
  displayName: <user name>,
  userId: <user id>,
  facebookConnected: <true|false>
}

Workouts

Get a list of your workouts. The next snippet describes an example of the call:

var workouts = require('endomondo-unofficial-api').workouts

var token = 'authToken'

workouts({authToken: token})
    .then((result) => { console.log(result) })
    .catch((result) => console.log(result))

the complete set of parameters get determined by:

{
    authToken: params.authToken,
    fields: params.fields || undefined,
    maxResults: params.maxResults || undefined,
    deflate: params.deflate || undefined,
    compression: params.compression || undefined,
    before: params.before || undefined,
    after: params.after || undefined,
}

The result of the promise will be if failed the error that caused it and if success an result object similar to this:

{
  "data":[<activities>],
  "more":false
}

Workout (get)

Get a specific workout. The next snippet describes an example of the call:

var workoutGet = require('endomondo-unofficial-api').workout.get

var token = 'authToken'
var workoutId = 'workoutId'

workoutGet({authToken: token, workoutId: workoutId})
    .then((result) => { console.log(result) })
    .catch((result) => console.log(result))

Workout (set)

Set (or create) a specific workout. The next snippet describes an example of the call:

var workoutSet = require('endomondo-unofficial-api').workout.set

var token = 'authToken'
var userId = 'userId'

workoutSet({authToken: token, userId: userId, time: Date.now()-70, duration: 60, distance: 0.05 })
    .then((result) => { console.log(result) })
    .catch((result) => console.log(result))

the complete set of parameters are determined by:

{
    authToken: params.authToken,
    duration: params.duration,
    trackPoints: [ { dateTime, inst, latitude, longitude, distance, speed, altitude, heartRate }],
    workoutId: params.workoutId || Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)
}

or

{
    authToken: params.authToken,
    duration: params.duration,
    time: params.time, 
    distance: params.distance,
    workoutId: params.workoutId || Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)
}

The result of the promise will be if failed the error that caused it and if success an result object like this:

{ workoutId: <workoutId> }

Workout (remove)

Get a specific workout. The next snippet describes an example of the call:

var workoutRemove = require('endomondo-unofficial-api').workout.remove

var token = 'authToken'
var workoutId = 'workoutId'

workoutRemove({authToken: token, workoutId: workoutId})
    .then((result) => { console.log(result) })
    .catch((result) => console.log(result))

the complete set of parameters are determined by:

{
    workoutId: params.id,
    sport: params.sport || 0,
    duration: params.duration || 0,
    gzip: params.gzip || true,
    audioMessage: params.audioMessage || false,
    goalType: params.goalType || 'BASIC',
    extendedResponse: params.extendedResponse || undefined,
    calories: params.calories || undefined,
    hydration: params.hydration || undefined
}

The result of the promise will be if failed the error that caused it and if success a result object that is quite complex to describe just try it ;).

Thanks

Special thanks to @aperezm85 whos code was used as inspiration for this package.

Logo

Sport graphic by Webalys from Flaticon is licensed under CC BY 3.0. Made with Logo Maker

Disclaimer, legalese and everything else.

This is not affiliated or endorset by Endomondo, or any other party. This software available on the site is provided "as is" and any expressed or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the user under the pseudonym Kanekotic, or any of their contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

1.1.113

5 months ago

1.1.111

10 months ago

1.1.110

10 months ago

1.1.112

10 months ago

1.1.109

11 months ago

1.1.108

11 months ago

1.1.107

11 months ago

1.1.106

11 months ago

1.1.105

12 months ago

1.1.104

12 months ago

1.1.100

1 year ago

1.1.103

12 months ago

1.1.102

1 year ago

1.1.101

1 year ago

1.1.99

1 year ago

1.1.98

1 year ago

1.1.97

1 year ago

1.1.96

1 year ago

1.1.95

1 year ago

1.1.94

1 year ago

1.1.93

1 year ago

1.1.92

1 year ago

1.1.91

1 year ago

1.1.90

1 year ago

1.1.89

1 year ago

1.1.88

1 year ago

1.1.87

1 year ago

1.1.86

1 year ago

1.1.85

1 year ago

1.1.84

1 year ago

1.1.83

1 year ago

1.1.82

1 year ago

1.1.81

1 year ago

1.1.80

1 year ago

1.1.79

1 year ago

1.1.78

1 year ago

1.1.77

1 year ago

1.1.76

2 years ago

1.1.75

2 years ago

1.1.74

2 years ago

1.1.73

2 years ago

1.1.72

2 years ago

1.1.70

2 years ago

1.1.71

2 years ago

1.1.67

2 years ago

1.1.66

2 years ago

1.1.65

2 years ago

1.1.69

2 years ago

1.1.68

2 years ago

1.1.59

2 years ago

1.1.63

2 years ago

1.1.62

2 years ago

1.1.61

2 years ago

1.1.60

2 years ago

1.1.64

2 years ago

1.1.56

2 years ago

1.1.55

2 years ago

1.1.58

2 years ago

1.1.57

2 years ago

1.1.49

2 years ago

1.1.52

2 years ago

1.1.51

2 years ago

1.1.50

2 years ago

1.1.54

2 years ago

1.1.53

2 years ago

1.1.48

2 years ago

1.1.47

2 years ago

1.1.46

2 years ago

1.1.45

2 years ago

1.1.44

2 years ago

1.1.38

2 years ago

1.1.37

2 years ago

1.1.36

2 years ago

1.1.39

2 years ago

1.1.41

2 years ago

1.1.40

2 years ago

1.1.43

2 years ago

1.1.42

2 years ago

1.1.34

2 years ago

1.1.33

2 years ago

1.1.32

2 years ago

1.1.31

2 years ago

1.1.35

2 years ago

1.1.29

3 years ago

1.1.28

3 years ago

1.1.30

3 years ago

1.1.19

3 years ago

1.1.18

3 years ago

1.1.17

3 years ago

1.1.23

3 years ago

1.1.22

3 years ago

1.1.21

3 years ago

1.1.20

3 years ago

1.1.27

3 years ago

1.1.26

3 years ago

1.1.25

3 years ago

1.1.24

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.13

3 years ago

1.1.10

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.88

3 years ago

1.0.89

3 years ago

1.0.91

3 years ago

1.0.90

3 years ago

1.0.95

3 years ago

1.0.94

3 years ago

1.0.93

3 years ago

1.0.92

3 years ago

1.0.87

5 years ago

1.0.86

5 years ago

1.0.85

5 years ago

1.0.84

5 years ago

1.0.83

5 years ago

1.0.82

5 years ago

1.0.81

5 years ago

1.0.80

5 years ago

1.0.79

5 years ago

1.0.74

5 years ago

1.0.73

5 years ago

1.0.72

5 years ago

1.0.71

6 years ago

1.0.70

6 years ago

1.0.69

6 years ago

1.0.68

6 years ago

1.0.67

6 years ago

1.0.66

6 years ago

1.0.65

6 years ago

1.0.64

6 years ago

1.0.63

6 years ago

1.0.62

6 years ago

1.0.61

6 years ago

1.0.60

6 years ago

1.0.59

6 years ago

1.0.58

6 years ago

1.0.57

6 years ago

1.0.56

6 years ago

1.0.55

6 years ago

1.0.54

6 years ago

1.0.53

6 years ago

1.0.52

6 years ago

1.0.51

6 years ago

1.0.50

6 years ago

1.0.49

6 years ago

1.0.48

6 years ago

1.0.47

6 years ago

1.0.46

6 years ago

1.0.45

6 years ago

1.0.43

6 years ago

1.0.42

6 years ago

1.0.41

6 years ago

1.0.40

6 years ago

1.0.39

6 years ago

1.0.38

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.34

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.2

8 years ago