Get characteristic
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://pokeapi.co/api/v2/characteristic/1/"
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/characteristic/1/")) .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/characteristic/1/") .get() .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = {method: 'GET', url: 'https://pokeapi.co/api/v2/characteristic/1/'};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://pokeapi.co/api/v2/characteristic/1/';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/characteristic/1/";
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/characteristic/1/wget --quiet \ --method GET \ --output-document \ - https://pokeapi.co/api/v2/characteristic/1/Characteristics indicate which stat contains a Pokémon’s highest IV. A Pokémon’s Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo). Check out Bulbapedia for greater detail.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”This parameter can be a string or an integer.
Examples
1Responses
Section titled “Responses”object
The identifier for this resource.
The remainder of the highest stat/IV divided by 5.
The possible values of the highest stat that would result in a Pokémon recieving this characteristic when divided by 5.
The stat which results in this characteristic.
object
The name of the referenced resource.
The URL of the referenced resource.
The descriptions of this characteristic listed in different languages.
object
The localized description for an API resource in a specific language.
The language this name is in.
object
The name of the referenced resource.
The URL of the referenced resource.
Example
{ "id": 1, "gene_modulo": 0, "possible_values": [ 0, 5 ], "highest_stat": { "name": "hp", "url": "https://pokeapi.co/api/v2/stat/1/" }, "descriptions": [ { "description": "Loves to eat", "language": { "name": "en", "url": "https://pokeapi.co/api/v2/language/9/" } } ]}