jlorente / stethome-php-sdk
A PHP package to access the StethoMe API by a comprehensive way.
Installs: 4 693
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
- guzzlehttp/guzzle: ~6.0
README
A PHP package to access the StethoMe API by a comprehensive way.
Installation
The preferred way to install this extension is through composer.
With Composer installed, you can then install the extension using the following commands:
$ php composer.phar require jlorente/stethome-php-sdk
or add
... "require": { "jlorente/stethome-php-sdk": "*" }
to the require
section of your composer.json
file.
Configuration
You can set the STETHOME_VENDOR_TOKEN as environment variables or add them later on StethoMe class instantiation.
The name of the environment var is STETHOME_VENDOR_TOKEN.
Usage
Endpoints calls must done through the StethoMe class.
If you haven't set the environment variable previously, remember to provide the key on instantiation.
$stethome = new \Jlorente\StethoMe\StethoMe($secretVendorToken); $stethome->pulmonary()->getVisit($visitId);
Methods
Security
getToken
https://dev.middleware.stethome.com/docs/?url=/docs/file/v2/swagger.yaml#/security/get_token
Generate client token for end user device.
$stethome->security()->getToken();
postToken
https://dev.middleware.stethome.com/docs/?url=/docs/file/v2/swagger.yaml#/security/post_token
Generate client token for end user device, scoped to given visits ids (recommended).
$stethome->security()->postToken($params);
Pulmonary
deleteVisit
Delete visit recordings.
$stethome->pulmonary()->deleteVisit($visitId);
getVisit
Check processing status of all recordings associated with given visit id.
$stethome->pulmonary()->getVisit($visitId);
getPoint
Check processing status of single recording associated with given visit id.
$stethome->pulmonary()->getPoint($visitId, $point);
getPointTags
Get analysed tags for a single recording from given visit id.
$stethome->pulmonary()->getPointTags($visitId, $point);
getPointWav
Get single recording audio file for playback.
$stethome->pulmonary()->getPointWav($visitId, $point);
getVisitId
Generate visit ID. All subsequent client requests will have to send this ID to properly match all recordings to same visit.
$stethome->pulmonary()->getVisitId();
postVisitContent
Add visit content.
$stethome->pulmonary()->postVisitContent($visitId, array $parameters = []);
copyVisit
Create visit copy token.
$stethome->pulmonary()->copyVisit($visitId);
lockVisit
Lock visit.
$stethome->pulmonary()->lockVisit($visitId);
License
Copyright © 2020 José Lorente Martín jose.lorente.martin@gmail.com.
Licensed under the BSD 3-Clause License. See LICENSE.txt for details.