PHPackages                             owainjones74/puregym-api-wrapper - 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. owainjones74/puregym-api-wrapper

ActiveLibrary[API Development](/categories/api)

owainjones74/puregym-api-wrapper
================================

A PHP API wrapper for PureGym's mobile API

1.0.0(1y ago)14MITPHP

Since Oct 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/0wain/puregym-api-php-wrapper)[ Packagist](https://packagist.org/packages/owainjones74/puregym-api-wrapper)[ RSS](/packages/owainjones74-puregym-api-wrapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

PureGym PHP API Wrapper
=======================

[](#puregym-php-api-wrapper)

This is a PHP wrapper for the PureGym Mobile API. This API is not public facing and is subject to change at any time without notice by the PureGym devs.

Massive credit to [2t6h/puregym-attendance](https://github.com/2t6h/puregym-attendance) for their work in reverse engineering the API. This library is based on their work.

**Disclaimer**: This library is not affiliated with PureGym in any way. Use at your own risk.

[![Packagist Version](https://camo.githubusercontent.com/3f78dd306c17cb979cfeb9600a97e15219a71e7f3021c87e9db1343fa08dfe6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7761696e6a6f6e657337342f7075726567796d2d6170692d777261707065722e737667)](https://camo.githubusercontent.com/3f78dd306c17cb979cfeb9600a97e15219a71e7f3021c87e9db1343fa08dfe6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7761696e6a6f6e657337342f7075726567796d2d6170692d777261707065722e737667)[![Total Downloads](https://camo.githubusercontent.com/c38ec8b1dd0d0fe63e7710bbbcec72cfc3ec25e8481880d08680967b7190f21a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f7761696e6a6f6e657337342f7075726567796d2d6170692d777261707065722e737667)](https://camo.githubusercontent.com/c38ec8b1dd0d0fe63e7710bbbcec72cfc3ec25e8481880d08680967b7190f21a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f7761696e6a6f6e657337342f7075726567796d2d6170692d777261707065722e737667)

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

[](#installation)

1. Install the package with composer `composer require owainjones74/puregym-api-wrapper`
2. Require the composer autoloader `require 'vendor/autoload.php';` if required.
3. Create a new instance of the PureGymClient with your email and pin `$client = new PureGymClient('my@email.com', '12345678');`

Tests
-----

[](#tests)

1. Install the dev dependencies with `composer install --dev`
2. Create a `.env` file in the root of the project with the following contents:

```
PUREGYM_USERNAME=my@email.com # Your puregym email
PUREGYM_PASSWORD=12345678 # Your puregym pin
```

3. Run the tests with `composer test`

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

use Owainjones74\Puregym\PureGymClient;

// Pass your puregym account email and pin. This is the same email and pin you use to login to the PureGym app.
$client = new PureGymClient('my@email.com', '12345678');

// Get your member
$member = $client->member();

// Echo out your name
echo $member->firstName . ' ' . $member->lastName;
```

Documentation
-------------

[](#documentation)

### Owainjones74\\Puregym\\PureGymClient

[](#owainjones74puregympuregymclient)

The core client for interacting with the PureGym API.

#### Example

[](#example)

```
$client = new PureGymClient('your@email.com`, '12345678');
$member = $client->member(); // The member linked to this information
```

#### Methods

[](#methods)

##### -&gt;member(): Owainjones74\\Puregym\\Member

[](#-member-owainjones74puregymmember)

Returns the member linked to the email and pin provided when creating the client.

#### -&gt;allGyms(): array

[](#-allgyms-array)

Returns an array of all gyms available to the member.

#### -&gt;gym($id): Owainjones74\\Puregym\\Gym

[](#-gymid-owainjones74puregymgym)

Returns a gym object for the gym with the given id.

### Owainjones74\\Puregym\\Member

[](#owainjones74puregymmember)

A member object representing the member linked to the email and pin provided when creating the client.

#### Example

[](#example-1)

```
$member = $client->member();

echo $member->firstName . ' ' . $member->lastName;
```

#### Methods

[](#methods-1)

##### -&gt;activity(): Owainjones74\\Puregym\\Activity

[](#-activity-owainjones74puregymactivity)

Returns an activity object for the member. This is the recent activity for this member.

#### -&gt;homeGym(): Owainjones74\\Puregym\\Gym

[](#-homegym-owainjones74puregymgym)

Returns a gym object for the members home gym.

### Owainjones74\\Puregym\\Gym

[](#owainjones74puregymgym)

A gym object representing a gym.

#### Example

[](#example-2)

```
$gym = $client->gym(69);

echo $gym->name;
```

#### Methods

[](#methods-2)

##### -&gt;attendance(): Owainjones74\\Puregym\\Attendance

[](#-attendance-owainjones74puregymattendance)

Returns an attendance object for the gym. This is the current attendance for this gym, consisting of the number of people in the gym and the capacity of the gym.

### Owainjones74\\Puregym\\Activity

[](#owainjones74puregymactivity)

An activity object representing the recent activity for a member.

#### Example

[](#example-3)

```
$activity = $member->activity();

echo $activity->totalVisits;
```

### Owainjones74\\Puregym\\Attendance

[](#owainjones74puregymattendance)

An attendance object representing the current attendance for a gym. Mainly the stats for the current amount of visitors and the capacity of the gym.

#### Example

[](#example-4)

```
$attendance = $gym->attendance();

echo $attendance->totalPeopleInGym . '/' . $attendance->maximumCapacity;
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

585d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b69e9199a204117536c25c2e260f655c79cd63b22204568655ab3b291d00f0c?d=identicon)[owainjones74](/maintainers/owainjones74)

---

Top Contributors

[![0wain](https://avatars.githubusercontent.com/u/15251181?v=4)](https://github.com/0wain "0wain (17 commits)")

---

Tags

api-wrappergymphppuregympuregym-php

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/owainjones74-puregym-api-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/owainjones74-puregym-api-wrapper/health.svg)](https://phpackages.com/packages/owainjones74-puregym-api-wrapper)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

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

GitHub API v3 client

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

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

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