Using PokeApi in Pluto

RESTful API is pretty straight forward to use, and Pluto adds/subtracts nothing from this.

julia> using HTTP, JSON3

julia> j = JSON3.read(HTTP.get("https://pokeapi.co/api/v2/type/3").body)
JSON3.Object{Vector{UInt8}, Vector{UInt64}} with 9 entries:

julia> all_type3_pokemon_names = [x["pokemon"]["name"] for x in j[:pokemon]]
135-element Vector{String}:
 "charizard"
 "butterfree"
 "pidgey"
 "pidgeotto"
 "pidgeot"
 "spearow"
 "fearow"
 "zubat"
 "golbat"
 "farfetchd"
 "doduo"
 "dodrio"
 "scyther"
 "gyarados"
 "aerodactyl"
 "articuno"
 "zapdos"
1 Like