noginn/garmin-connect-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

noginn/garmin-connect-client

Composer 安装命令:

composer require noginn/garmin-connect-client

包简介

A simple PHP library to interact with the Garmin Connect website and APIs

README 文档

README

Provides a simple PHP library to interact with the Garmin Connect website and APIs.

Usage

Export the 25 most recent activities

<?php

use Buzz\Browser;
use Buzz\Client\Curl;
use Endurance\GarminConnect\GarminConnectClient;

$username = 'test';
$password = 'qwerty';

$browser = new Browser(new Curl())
$client = new GarminConnectClient($browser);
$client->signIn($username, $password);

$activities = $client->fetchActivities($username, 25);
foreach ($activities as $activity) {
    $client->downloadActivity($activity->getId(), __DIR__ . '/activities/' . $activity->getId() . '.tcx');
}

Upload an activity FIT file

<?php

use Buzz\Browser;
use Buzz\Client\Curl;
use Endurance\GarminConnect\GarminConnectClient;

$username = 'test';
$password = 'qwerty';

$browser = new Browser(new Curl());
$client = new GarminConnectClient($browser);
$client->signIn($username, $password);
$client->uploadActivity('/path/to/activity.fit');

Running the export script

$ cd garmin-connect-client
$ php composer.phar install

$ ./bin/export username password [/path/to/save/files]

统计信息

  • 总下载量: 74
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-10