Get version group
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://pokeapi.co/api/v2/version-group/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/version-group/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/version-group/1/") .get() .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = {method: 'GET', url: 'https://pokeapi.co/api/v2/version-group/1/'};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://pokeapi.co/api/v2/version-group/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/version-group/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/version-group/1/wget --quiet \ --method GET \ --output-document \ - https://pokeapi.co/api/v2/version-group/1/Version groups categorize highly similar versions of the games.
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 name for this resource.
Order for sorting. Almost by date of release, except similar versions are grouped together.
The generation this version was introduced in.
object
The name of the referenced resource.
The URL of the referenced resource.
A list of methods in which Pokémon can learn moves in this version group.
object
The name of the referenced resource.
The URL of the referenced resource.
A list of Pokédexes introduces in this version group.
object
The name of the referenced resource.
The URL of the referenced resource.
A list of regions that can be visited in this version group.
object
The name of the referenced resource.
The URL of the referenced resource.
The versions this version group owns.
object
The name of the referenced resource.
The URL of the referenced resource.
Example
{ "id": 1, "name": "red-blue", "order": 3, "generation": { "name": "generation-i", "url": "https://pokeapi.co/api/v2/generation/1/" }, "move_learn_methods": [ { "name": "level-up", "url": "https://pokeapi.co/api/v2/move-learn-method/1/" }, { "name": "machine", "url": "https://pokeapi.co/api/v2/move-learn-method/4/" } ], "pokedexes": [ { "name": "kanto", "url": "https://pokeapi.co/api/v2/pokedex/2/" } ], "regions": [ { "name": "kanto", "url": "https://pokeapi.co/api/v2/region/1/" } ], "versions": [ { "name": "red", "url": "https://pokeapi.co/api/v2/version/1/" }, { "name": "blue", "url": "https://pokeapi.co/api/v2/version/2/" } ]}