diff --git a/CHANGELOG b/CHANGELOG index 8e3a862..9723731 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/composer.json b/composer.json index c790ba7..9265a13 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Sdk/GeocachingSdk.php b/src/Sdk/GeocachingSdk.php index a3e2059..3261343 100644 --- a/src/Sdk/GeocachingSdk.php +++ b/src/Sdk/GeocachingSdk.php @@ -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 * @@ -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 */ @@ -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 */ @@ -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 */ @@ -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 */ @@ -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 */ @@ -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 */ @@ -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 */ @@ -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 */ @@ -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 * diff --git a/src/Sdk/GeocachingSdkInterface.php b/src/Sdk/GeocachingSdkInterface.php index 839e258..2749559 100644 --- a/src/Sdk/GeocachingSdkInterface.php +++ b/src/Sdk/GeocachingSdkInterface.php @@ -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 * @@ -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 * @@ -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 */