diff --git a/docs/03-supported-apis.md b/docs/03-supported-apis.md index bcb151b..111b8bf 100644 --- a/docs/03-supported-apis.md +++ b/docs/03-supported-apis.md @@ -218,41 +218,39 @@ $location = $api->geocoding()->getByZipCode('1000-001', 'pt'); ## Common Methods -#### `withUnitSystem` +#### `withLanguage` ```php -withUnitSystem(string $unitSystem): self +withLanguage(string $language): self ``` -Makes a request with a different unit system from the one globally defined in the [configuration](02-configuration.md#unitsystem). - -Only available for [`OneCall`](#one-call) and [`Weather`](#weather) APIs. +Set the language per request. +Only available for [`OneCall`](#one-call) and [`Weather`](#weather) API requests. ```php -use ProgrammatorDev\OpenWeatherMap\UnitSystem\UnitSystem; +use ProgrammatorDev\OpenWeatherMap\Language\Language -// Uses 'imperial' unit system for this request alone -$openWeatherMap->weather() - ->withUnitSystem(UnitSystem::IMPERIAL) +// uses the "pt" language for this request alone +$api->weather() + ->withLanguage(Language::PORTUGUESE) ->getCurrent(50, 50); ``` -#### `withLanguage` +#### `withUnitSystem` ```php -withLanguage(string $language): self +withUnitSystem(string $unitSystem): self ``` -Makes a request with a different language from the one globally defined in the [configuration](02-configuration.md#language). - -Only available for [`OneCall`](#one-call) and [`Weather`](#weather) APIs. +Set the unit system per request. +Only available for [`OneCall`](#one-call) and [`Weather`](#weather) API requests. ```php -use ProgrammatorDev\OpenWeatherMap\Language\Language +use ProgrammatorDev\OpenWeatherMap\UnitSystem\UnitSystem; -// Uses 'pt' language for this request alone -$openWeatherMap->weather() - ->withLanguage(Language::PORTUGUESE) +// uses the "imperial" unit system for this request alone +$api->weather() + ->withUnitSystem(UnitSystem::IMPERIAL) ->getCurrent(50, 50); ```