Add-PokeAPIBaseURI

SYNOPSIS

Sets the base URI for the PokeAPI connection.

SYNTAX

__AllParameterSets

Add-PokeAPIBaseURI [[-BaseURI] <string>] [-WhatIf] [-Confirm]

ALIASES

This cmdlet has the following aliases,

  • Add-PokeBaseURI
  • Set-PokeAPIBaseURI
  • Set-PokeBaseURI

DESCRIPTION

The Add-PokeAPIBaseURI cmdlet sets the base URI which is later used to construct the full URI for all API calls.

The POKEAPI_BASE_URI environment variable is used when the module is imported and takes precedence over a saved configuration.

EXAMPLES

EXAMPLE 1

Add-PokeAPIBaseURI

The base URI will use https://pokeapi.co/api/v2 which is PokeAPI’s default URI.

EXAMPLE 2

Add-PokeAPIBaseURI -BaseURI http://myapi.gateway.example.com/api/v2

A custom API gateway of http://myapi.gateway.example.com/api/v2 will be used for all API calls to PokeAPI.

PARAMETERS

-BaseURI

Define the base URI for the PokeAPI connection using PokeAPI’s URI or a custom URI.

A self-hosted PokeAPI (https://github.com/PokeAPI/pokeapi) can be used by defining its full API url such as http://localhost/api/v2

The default base URI is https://pokeapi.co/api/v2

Type: System.String
DefaultValue: https://pokeapi.co/api/v2
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  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

NOTES

The Add-PokeBaseURI, Set-PokeBaseURI, & Set-PokeAPIBaseURI aliases are kept for older scripts.