PHPackages                             inhaleexhale/healthgraphapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. inhaleexhale/healthgraphapi

ActiveLibrary[API Development](/categories/api)

inhaleexhale/healthgraphapi
===========================

PHP implementation of the HealthGraph API based on the StravaAPI repo from iamstuartwilson

0.0.3(8y ago)113MITPHPPHP &gt;=5.5

Since Sep 14Pushed 8y agoCompare

[ Source](https://github.com/InhaleExhale/healthgraphapi)[ Packagist](https://packagist.org/packages/inhaleexhale/healthgraphapi)[ RSS](/packages/inhaleexhale-healthgraphapi/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

StravaApi
=========

[](#stravaapi)

Simple PHP class to interact with Runkeeper's HealthGraph API. Forked from [Iamstuartwilson/strava](https://github.com/iamstuartwilson/strava).

[![Build Status](https://camo.githubusercontent.com/18c7367de0a0a1a5ffe002eedc89aaca57ff4e0bc1c4154f397f163858411702/68747470733a2f2f7472617669732d63692e6f72672f69616d73747561727477696c736f6e2f7374726176612e737667)](https://travis-ci.org/iamstuartwilson/strava)[![Minimum PHP Version](https://camo.githubusercontent.com/735bca2bfa82bede292ead8d59049439a96c33129c23fa41da09f98bfa621316/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d352e352d3838393242462e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/735bca2bfa82bede292ead8d59049439a96c33129c23fa41da09f98bfa621316/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d352e352d3838393242462e7376673f7374796c653d666c6174)

Overview
--------

[](#overview)

The class simply houses methods to help send data to and recieve data from the API.

Please read the [API documentation](http://strava.github.io/api/) to see what endpoints are available.

*There is currently no file upload support at this time*

Installation
------------

[](#installation)

### With Composer

[](#with-composer)

```
$ composer require iamstuartwilson/strava

```

**Or**

Add `InhaleExhale/runkeeper-php` to your `composer.json`:

```
{
    "require" : {
        "iamstuartwilson/strava" : "~1.3"
    }
}
```

### Manually

[](#manually)

Copy `HealthGraphApi.php` to your project and *require* it in your application as described in the next section.

Getting Started
---------------

[](#getting-started)

Include the class and instantiate with your **client\_id** and **client\_secret** from your [registered app](http://www.strava.com/developers):

```
require_once 'HealthGraphApi.php';

$api = new InhaleExhale\HealthGraphApi(
    $clientId,
    $clientSecret
);
```

You will then need to [authenticate](http://strava.github.io/api/v3/oauth/) your strava account by requesting an access code *\[1\]*. You can generate a URL for authentication using the following method:

```
$api->authenticationUrl($redirect, $approvalPrompt = 'auto', $scope = null, $state = null);
```

When a code is returned you must then exchange it for an [access token](http://strava.github.io/api/v3/oauth/#post-token) for the authenticated user:

```
$api->tokenExchange($code);
```

Before making any requests you must set the access token as returned from your token exchange or via your own private token from Strava:

```
$api->setAccessToken($accessToken);
```

Example Requests
----------------

[](#example-requests)

Get the most recent 100 KOMs from any athlete

```
$api->get('athletes/:id/koms', ['per_page' => 100]);
```

Post a new activity *\[2\]*

```
$api->post('activities', [
    'name'             => 'API Test',
    'type'             => 'Ride',
    'start_date_local' => date( 'Y-m-d\TH:i:s\Z'),
    'elapsed_time'     => 3600
]);
```

Update a athlete's weight *\[2\]*

```
$api->put('athlete', ['weight' => 70]);
```

Delete an activity *\[2\]*

```
$api->delete('activities/:id');
```

### Notes

[](#notes)

**1**. The account you register your app will give you an access token, so you can skip this step if you're just testing endpoints/methods.

**2**. These actions will need the **scope** set to *write* when authenticating a user

---

Historic Releases
-----------------

[](#historic-releases)

Previous version **1.2.2**

**Updates include:**

- Possibility to access the HTTP response headers
- PHP 7 compatibility
- Basic PHPUnit test cases for Auth URL generation

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8770458654b8edd34a0c0c29c82f8a86cce2c155267c211896529e6b4e013651?d=identicon)[InhaleExhale](/maintainers/InhaleExhale)

---

Top Contributors

[![mjaschen](https://avatars.githubusercontent.com/u/328130?v=4)](https://github.com/mjaschen "mjaschen (25 commits)")[![iamstuartwilson](https://avatars.githubusercontent.com/u/3594817?v=4)](https://github.com/iamstuartwilson "iamstuartwilson (10 commits)")[![HalestormAI](https://avatars.githubusercontent.com/u/31828525?v=4)](https://github.com/HalestormAI "HalestormAI (4 commits)")[![bryant1410](https://avatars.githubusercontent.com/u/3905501?v=4)](https://github.com/bryant1410 "bryant1410 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/inhaleexhale-healthgraphapi/health.svg)

```
[![Health](https://phpackages.com/badges/inhaleexhale-healthgraphapi/health.svg)](https://phpackages.com/packages/inhaleexhale-healthgraphapi)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M478](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
