Download the PHP package owainjones74/puregym-api-wrapper without Composer
On this page you can find all versions of the php package owainjones74/puregym-api-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download owainjones74/puregym-api-wrapper
More information about owainjones74/puregym-api-wrapper
Files in owainjones74/puregym-api-wrapper
Package puregym-api-wrapper
Short Description A PHP API wrapper for PureGym's mobile API
License MIT
Informations about the package puregym-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 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.
https://packagist.org/packages/owainjones74/puregym-api-wrapper
Installation
- Install the package with composer
composer require owainjones74/puregym-api-wrapper
- Require the composer autoloader
require 'vendor/autoload.php';
if required. - Create a new instance of the PureGymClient with your email and pin
$client = new PureGymClient('[email protected]', '12345678');
Tests
- Install the dev dependencies with
composer install --dev
-
Create a
.env
file in the root of the project with the following contents: - Run the tests with
composer test
Usage
Documentation
Owainjones74\Puregym\PureGymClient
The core client for interacting with the PureGym API.
Example
Methods
->member(): Owainjones74\Puregym\Member
Returns the member linked to the email and pin provided when creating the client.
->allGyms(): array
Returns an array of all gyms available to the member.
->gym($id): Owainjones74\Puregym\Gym
Returns a gym object for the gym with the given id.
Owainjones74\Puregym\Member
A member object representing the member linked to the email and pin provided when creating the client.
Example
Methods
->activity(): Owainjones74\Puregym\Activity
Returns an activity object for the member. This is the recent activity for this member.
->homeGym(): Owainjones74\Puregym\Gym
Returns a gym object for the members home gym.
Owainjones74\Puregym\Gym
A gym object representing a gym.
Example
Methods
->attendance(): Owainjones74\Puregym\Attendance
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
An activity object representing the recent activity for a member.
Example
Owainjones74\Puregym\Attendance
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.