ConvertTo-BirdWeatherBaseUri
SYNOPSIS
Converts a BirdWeather url to the base URI that the module uses
SYNTAX
__AllParameterSets
ConvertTo-BirdWeatherBaseUri [-BaseURI] <string>
ALIASES
This cmdlet has the following aliases,
- ConvertTo-BWBaseUri
DESCRIPTION
The ConvertTo-BirdWeatherBaseUri cmdlet validates a BirdWeather url & returns the base URI (the host) that is shared by the REST & the GraphQL API
The url must be an absolute https url. A trailing /api/v1 (REST) or /graphql (GraphQL) path is removed, a query string, a fragment, & trailing slashes are removed as well
This is an internal function that is used by the base URI & settings functions
EXAMPLES
EXAMPLE 1
ConvertTo-BirdWeatherBaseUri -BaseURI 'https://app.birdweather.com/api/v1/'
Returns https://app.birdweather.com
EXAMPLE 2
ConvertTo-BirdWeatherBaseUri -BaseURI 'https://app.birdweather.com/graphql'
Returns https://app.birdweather.com
PARAMETERS
-BaseURI
The BirdWeather host, the REST url (https://app.birdweather.com/api/v1), or the GraphQL url (https://app.birdweather.com/graphql)
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
System.String
OUTPUTS
System.String
NOTES
N/A