Skip to content

Commit

Permalink
Prevented tests from running due to authentication.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raistlfiren committed Jun 9, 2024
1 parent 4cd94a2 commit 238551a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Http/GarminClient/GarminClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public function __construct(
private HttpClientInterface $client,
private GarminAuthenticator $garminAuthenticator
) {
$this->setup();
}

public function addCredentials(string $username, string $password): void
Expand All @@ -40,13 +39,15 @@ public function setup(): void

public function fetchPersonalInformation(): array
{
$this->setup();
$response = $this->client->request('GET', self::GARMIN_API_URL . '/userprofile-service/userprofile/personal-information');

return $response->toArray();
}

public function getWorkoutList($intStart = 0, $intLimit = 10, $myWorkoutsOnly = true, $sharedWorkoutsOnly = false)
{
$this->setup();
$queryParameters = array(
'start' => $intStart,
'limit' => $intLimit,
Expand Down Expand Up @@ -75,6 +76,7 @@ public function getWorkoutList($intStart = 0, $intLimit = 10, $myWorkoutsOnly =

public function createWorkout($data)
{
$this->setup();
if (empty($data)) {
throw new DataException('Data must be supplied to create a new workout.');
}
Expand Down Expand Up @@ -113,6 +115,7 @@ public function createWorkout($data)
*/
public function deleteWorkout($id)
{
$this->setup();
if (empty($id)) {
throw new DataException('Workout ID must be supplied to delete a workout.');
}
Expand Down Expand Up @@ -151,6 +154,7 @@ public function deleteWorkout($id)
*/
public function scheduleWorkout($id, $data)
{
$this->setup();
$headers = [
'NK: NT',
'Content-Type: application/json'
Expand Down

0 comments on commit 238551a

Please sign in to comment.