mitrm/yii2-endomondo

Simple Endomondo Api Class for Yii2

Installs: 16

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2017-04-28 17:03 UTC

This package is auto-updated.

Last update: 2024-10-26 04:36:08 UTC


README

Endomondo is not offering oficial app but there is a way how to add/write some data by their mobile API. There not exists documentation and it is very hard to figure out which parameters can be used. Using this is only on your own risk. Endomondo can make changes in this API without any warning.

Authentication of user

You have to know users email and password. Example:

$endomondo = new \Fabulator\Endomondo\Endomondo();
$endomondo->login(USER_EMAIL, USER_PASSWORD);
var_dump($endomondo->getUserInfo());

Get information about existed workouts

You can even export gpx files.

$workout = $endomondo->workouts->get('560851703');
$workout->saveGPX('./temp/workout.gpx');

Create workouts

You can easily create workouts. This will create a run in New Year, 35 minutes long and 10.23 km length.

$endomondo->workouts->create(\Fabulator\Endomondo\Endomondo::SPORT_RUNNING, new DateTime("2015-01-01 13:45:15"), 35 * 60, 10.23)