You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -19,15 +20,14 @@ PHP library to connect and use garmin wellness api
19
20
```
20
21
composer require stoufa06/php-garmin-connect-api
21
22
```
23
+
# Example
24
+
25
+
Please take a look at [examples](./examples/README.md) folder
22
26
# Usage
23
27
## Get authorization link
24
28
```php
25
29
use Stoufa\GarminApi\GarminApi;
26
30
27
-
/** use this if you are not using utc timezone in your server or your php code **/
28
-
$timezone = date_default_timezone_get();
29
-
date_default_timezone_set('UTC');
30
-
31
31
try
32
32
{
33
33
@@ -52,21 +52,13 @@ catch (\Throwable $th)
52
52
{
53
53
// catch your exception here
54
54
}
55
-
finally
56
-
{
57
-
date_default_timezone_set($timezone);
58
-
}
59
55
60
56
```
61
57
## Get token credentials
62
58
63
59
After the user connects his garmin account successfully it will redirect to callback_uri. "oauth_token" and "oauth_verifier" should be available in $_GET.
64
60
65
61
```php
66
-
/** use this if you are not using utc timezone in your server or your php code **/
0 commit comments