Get pokeathlon stat
GET
/api/v2/pokeathlon-stat/{id}/
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://pokeapi.co/api/v2/pokeathlon-stat/example/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://pokeapi.co/api/v2/pokeathlon-stat/example/")) .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://pokeapi.co/api/v2/pokeathlon-stat/example/") .get() .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = {method: 'GET', url: 'https://pokeapi.co/api/v2/pokeathlon-stat/example/'};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://pokeapi.co/api/v2/pokeathlon-stat/example/';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use reqwest;
#[tokio::main]pub async fn main() { let url = "https://pokeapi.co/api/v2/pokeathlon-stat/example/";
let client = reqwest::Client::new(); let response = client.get(url) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url https://pokeapi.co/api/v2/pokeathlon-stat/example/wget --quiet \ --method GET \ --output-document \ - https://pokeapi.co/api/v2/pokeathlon-stat/example/Pokeathlon Stats are different attributes of a Pokémon’s performance in Pokéathlons. In Pokéathlons, competitions happen on different courses; one for each of the different Pokéathlon stats. See Bulbapedia for greater detail.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
This parameter can be a string or an integer.
Responses
Section titled “Responses”Media typeapplication/json
object
id
required
integer
name
required
string
affecting_natures
required
object
decrease
required
Array<object>
object
max_change
required
integer format: int32
nature
required
object
name
required
string
url
required
string format: uri
increase
required
Array<object>
object
max_change
required
integer format: int32
nature
required
object
name
required
string
url
required
string format: uri
names
required
Array<object>
object
name
required
string
language
required
object
name
required
string
url
required
string format: uri
Example
{ "affecting_natures": { "decrease": [ { "max_change": -1, "nature": { "name": "hardy", "url": "https://pokeapi.co/api/v2/nature/1/" } } ], "increase": [ { "max_change": 2, "nature": { "name": "hardy", "url": "https://pokeapi.co/api/v2/nature/1/" } } ] }}