Skip to content

Commit

Permalink
Added latest methods from staging
Browse files Browse the repository at this point in the history
  • Loading branch information
Surfoo committed Sep 21, 2020
1 parent ecd984c commit 162b9d6
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [3.12.0] - 2020-09-21
### Added
- New API methods added:
- getGeocacheSizes
- getGeocacheStatuses
- getTrackableJourneys
- getOptedOutUsers

## [3.11.0] - 2020-05-22
### Added
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
}
},
"require": {
"php": "~7.3",
"monolog/monolog": "~2.0",
"guzzlehttp/guzzle": "~6.5",
"surfoo/oauth2-geocaching": "~1.3"
"php": "^7.3",
"monolog/monolog": "^2.0",
"guzzlehttp/guzzle": "^6.0 || ^7.0",
"surfoo/oauth2-geocaching": "^1.3"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
Expand Down
60 changes: 60 additions & 0 deletions src/Sdk/GeocachingSdk.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,19 @@ public function getUserTrackables(array $query = [], array $options = [])
return $this->httpClient->get('trackables', $query, $options);
}

/**
* swagger: GET /v{api-version}/trackables/{referenceCode}/journeys
*
* @see https://api.groundspeak.com/documentation#get-trackable-journeys
* @see https://api.groundspeak.com/api-docs/index#!/Trackables/Trackables_GetTrackableJourneys
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
public function getTrackableJourneys(string $referenceCode, array $query = [], array $options = [])
{
return $this->httpClient->get('trackables/' . $referenceCode . '/journeys', $query, $options);
}

/**
* swagger: GET /v{api-version}/trackables/geocointypes
*
Expand Down Expand Up @@ -959,6 +972,7 @@ public function getReferenceCodeFromId(array $query, array $options = [])
* swagger: GET /v{api-version}/countries
*
* @see https://api.groundspeak.com/documentation#get-countries
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetCountries
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand All @@ -971,6 +985,7 @@ public function getCountries(array $options = [])
* swagger: GET /v{api-version}/states
*
* @see https://api.groundspeak.com/documentation#get-states
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetStates
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand All @@ -983,6 +998,7 @@ public function getStates(array $options = [])
* swagger: GET /v{api-version}/countries/{countryId}/states
*
* @see https://api.groundspeak.com/documentation#get-country-states
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetStatesByCountry
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand All @@ -995,6 +1011,7 @@ public function getStatesByCountry(int $countryId, array $options = [])
* swagger: GET /v{api-version}/membershiplevels
*
* @see https://api.groundspeak.com/documentation#get-membership-levels
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetMembershipLevels
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand All @@ -1007,6 +1024,7 @@ public function getMembershipLevels(array $options = [])
* swagger: GET /v{api-version}/geocachetypes
*
* @see https://api.groundspeak.com/documentation#get-geocache-types
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetGeocacheTypes
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand All @@ -1019,6 +1037,7 @@ public function getGeocacheTypes(array $options = [])
* swagger: GET /v{api-version}/attributes
*
* @see https://api.groundspeak.com/documentation#get-attributes
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetAttributes
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand All @@ -1027,10 +1046,37 @@ public function getAttributes(array $options = [])
return $this->httpClient->get('attributes', $options);
}

/**
* swagger: GET /v{api-version}/geocachesizes
*
* @see https://api.groundspeak.com/documentation#get-geocache-sizes
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetGeocacheSizes
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
public function getGeocacheSizes(array $options = [])
{
return $this->httpClient->get('geocachesizes', $options);
}

/**
* swagger: GET /v{api-version}/geocachestatuses
*
* @see https://api.groundspeak.com/documentation#get-geocache-statuses
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetGeocacheStatuses
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
public function getGeocacheStatuses(array $options = [])
{
return $this->httpClient->get('geocachestatuses', $options);
}

/**
* swagger: GET /v{api-version}/geocachelogtypes
*
* @see https://api.groundspeak.com/documentation#get-geocachelog-types
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetGeocacheLogTypes
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand All @@ -1043,6 +1089,7 @@ public function getGeocacheLogTypes(array $options = [])
* swagger: GET /v{api-version}/trackablelogtypes
*
* @see https://api.groundspeak.com/documentation#get-trackablelog-types
* @see https://api.groundspeak.com/api-docs/index#!/ReferenceData/ReferenceData_GetTrackableLogTypes
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand All @@ -1051,6 +1098,19 @@ public function getTrackableLogTypes(array $options = [])
return $this->httpClient->get('trackablelogtypes', $options);
}

/**
* swagger: GET /v{api-version}/optedoutusers
*
* @see https://api.groundspeak.com/documentation#get-opted-out-users
* @see https://api.groundspeak.com/api-docs/index#!/Users/Users_GetOptedOutUsers
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
public function getOptedOutUsers(array $query, array $options = [])
{
return $this->httpClient->get('optedoutusers', $query, $options);
}

/**
* swagger: GET /status/ping
*
Expand Down
28 changes: 28 additions & 0 deletions src/Sdk/GeocachingSdkInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,13 @@ public function getTrackable(string $referenceCode, array $query = [], array $op
*/
public function getUserTrackables(array $query = [], array $options = []);

/**
* @see https://api.groundspeak.com/documentation#get-trackable-journeys
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
public function getTrackableJourneys(string $referenceCode, array $query = [], array $options = []);

/**
* @see https://api.groundspeak.com/documentation#get-geocoin-types
*
Expand Down Expand Up @@ -549,6 +556,20 @@ public function getGeocacheTypes(array $options = []);
*/
public function getAttributes(array $options = []);

/**
* @see https://api.groundspeak.com/documentation#get-geocache-sizes
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
public function getGeocacheSizes(array $options = []);

/**
* @see https://api.groundspeak.com/documentation#get-geocache-statuses
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
public function getGeocacheStatuses(array $options = []);

/**
* @see https://api.groundspeak.com/documentation#get-geocachelog-types
*
Expand All @@ -563,6 +584,13 @@ public function getGeocacheLogTypes(array $options = []);
*/
public function getTrackableLogTypes(array $options = []);

/**
* @see https://api.groundspeak.com/documentation#get-opted-out-users
*
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
public function getOptedOutUsers(array $query, array $options = []);

/**
* @return \Geocaching\Lib\Adapters\GuzzleHttpClient
*/
Expand Down

0 comments on commit 162b9d6

Please sign in to comment.