Package 'trapinch'

Title: Get Data from the PokéAPI Service
Description: Query version 2 of the RESTful PokéAPI <https://pokeapi.co/> to return information about the Pokémon game franchise, including moves, berries, items, locations, etc.
Authors: Matt Dray [aut, cre]
Maintainer: Matt Dray <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1
Built: 2024-11-15 04:37:11 UTC
Source: https://github.com/matt-dray/trapinch

Help Index


Clear the Cache

Description

Removes all cached returns from the PokéAPI, which are stored as RDS files at the path resolved by tools::R_user_dir("trapinch", "cache").

Usage

clear_cache()

Value

Nothing. Deletes cached files.

Examples

## Not run: clear_cache()

Get Data from PokeAPI: Abilities

Description

Get Data from PokeAPI: Abilities

Usage

get_ability(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_ability("stench")

Get Data from PokeAPI: Berries

Description

Get Data from PokeAPI: Berries

Usage

get_berry(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_berry("cheri")

Get Data from PokeAPI: Berry Firmnesses

Description

Get Data from PokeAPI: Berry Firmnesses

Usage

get_berry_firmness(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_berry_firmness("very-soft")

Get Data from PokeAPI: Berry Flavors

Description

Get Data from PokeAPI: Berry Flavors

Usage

get_berry_flavor(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_berry_flavor("spicy")

Get Data from PokeAPI: Characteristics

Description

Get Data from PokeAPI: Characteristics

Usage

get_characteristic(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_characteristic(1)

Get Data from PokeAPI: Contest Effects

Description

Get Data from PokeAPI: Contest Effects

Usage

get_contest_effect(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_contest_effect(1)

Get Data from PokeAPI: Contest Types

Description

Get Data from PokeAPI: Contest Types

Usage

get_contest_type(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_contest_type("cool")

Get Data from PokeAPI: Egg Groups

Description

Get Data from PokeAPI: Egg Groups

Usage

get_egg_group(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_egg_group("monster")

Get Data from PokeAPI: Encounter Conditions

Description

Get Data from PokeAPI: Encounter Conditions

Usage

get_encounter_condition(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_encounter_condition("swarm")

Get Data from PokeAPI: Encounter Condition Values

Description

Get Data from PokeAPI: Encounter Condition Values

Usage

get_encounter_condition_value(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_encounter_condition_value("swarm-yes")

Get Data from PokeAPI: Encounter Methods

Description

Get Data from PokeAPI: Encounter Methods

Usage

get_encounter_method(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_encounter_method("walk")

Get Data from PokeAPI: Evolution Chains

Description

Get Data from PokeAPI: Evolution Chains

Usage

get_evolution_chain(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_evolution_chain(1)

Get Data from PokeAPI: Evolution Triggers

Description

Get Data from PokeAPI: Evolution Triggers

Usage

get_evolution_trigger(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_evolution_trigger("level-up")

Get Data from PokeAPI: Genders

Description

Get Data from PokeAPI: Genders

Usage

get_gender(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_gender("female")

Get Data from PokeAPI: Generations

Description

Get Data from PokeAPI: Generations

Usage

get_generation(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_generation("generation-i")

Get Data from PokeAPI: Growth rates

Description

Get Data from PokeAPI: Growth rates

Usage

get_growth_rate(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_growth_rate("slow")

Get Data from PokeAPI: Items

Description

Get Data from PokeAPI: Items

Usage

get_item(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_item("master-ball")

Get Data from PokeAPI: Item Attributes

Description

Get Data from PokeAPI: Item Attributes

Usage

get_item_attribute(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_item_attribute("countable")

Get Data from PokeAPI: Item Categories

Description

Get Data from PokeAPI: Item Categories

Usage

get_item_category(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_item_category("stat-boosts")

Get Data from PokeAPI: Item Fling Effects

Description

Get Data from PokeAPI: Item Fling Effects

Usage

get_item_fling_effect(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_item_fling_effect("badly-poison")

Get Data from PokeAPI: Item Pockets

Description

Get Data from PokeAPI: Item Pockets

Usage

get_item_pocket(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_item_pocket("misc")

Get Data from PokeAPI: Languages

Description

Get Data from PokeAPI: Languages

Usage

get_language(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_language("ja")

Get Data from PokeAPI: Locations

Description

Get Data from PokeAPI: Locations

Usage

get_location(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_location("canalave-city")

Get Data from PokeAPI: Location Areas

Description

Get Data from PokeAPI: Location Areas

Usage

get_location_area(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_location_area("canalave-city-area")

Get Data from PokeAPI: Machines

Description

Get Data from PokeAPI: Machines

Usage

get_machine(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_machine(1)

Get Data from PokeAPI: Moves

Description

Get Data from PokeAPI: Moves

Usage

get_move(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_move("pound")

Get Data from PokeAPI: Move Ailments

Description

Get Data from PokeAPI: Move Ailments

Usage

get_move_ailment(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_move_ailment("paralysis")

Get Data from PokeAPI: Move Battle Styles

Description

Get Data from PokeAPI: Move Battle Styles

Usage

get_move_battle_style(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_move_battle_style("attack")

Get Data from PokeAPI: Move Categories

Description

Get Data from PokeAPI: Move Categories

Usage

get_move_category(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_move_category("ailment")

Get Data from PokeAPI: Move Damage Classes

Description

Get Data from PokeAPI: Move Damage Classes

Usage

get_move_damage_class(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_move_damage_class("status")

Get Data from PokeAPI: Move Learn Methods

Description

Get Data from PokeAPI: Move Learn Methods

Usage

get_move_learn_method(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_move_learn_method("level-up")

Get Data from PokeAPI: Move Targets

Description

Get Data from PokeAPI: Move Targets

Usage

get_move_target(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_move_target("specific-move")

Get Data from PokeAPI: Natures

Description

Get Data from PokeAPI: Natures

Usage

get_nature(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_nature("bold")

Get Data from PokeAPI: Pal Park Areas

Description

Get Data from PokeAPI: Pal Park Areas

Usage

get_pal_park_area(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pal_park_area("forest")

Get Data from the PokéAPI Service

Description

Get Data from the PokéAPI Service

Usage

get_pokeapi(endpoint, resource = NULL, ext = NULL)

Arguments

endpoint

Character. The name of the endpoint to query. This includes categories such as "pokemon", "locations" or "berries". See details.

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

ext

Character. Further extension to the provided endpoint and resource. Defaults to NULL. Only used for the 'pokemon' endpoint to find Pokémon encounters.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokeapi("pokemon", "bulbasaur")

Get Data from PokeAPI: Pokeathlon Stats

Description

Get Data from PokeAPI: Pokeathlon Stats

Usage

get_pokeathlon_stat(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokeathlon_stat("speed")

Get Data from PokeAPI: Pokedexes

Description

Get Data from PokeAPI: Pokedexes

Usage

get_pokedex(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokedex("kanto")

Get Data from PokeAPI: Pokemon

Description

Get Data from PokeAPI: Pokemon

Usage

get_pokemon(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokemon("clefairy")

Get Data from PokeAPI: Pokemon Colors

Description

Get Data from PokeAPI: Pokemon Colors

Usage

get_pokemon_color(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokemon_color("black")

Get Data from PokeAPI: Pokemon Forms

Description

Get Data from PokeAPI: Pokemon Forms

Usage

get_pokemon_form(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokemon_form("arceus-bug")

Get Data from PokeAPI: Pokemon Habitats

Description

Get Data from PokeAPI: Pokemon Habitats

Usage

get_pokemon_habitat(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokemon_habitat("cave")

Get Data from PokeAPI: Pokemon Location Areas

Description

Get Data from PokeAPI: Pokemon Location Areas

Usage

get_pokemon_location_areas(resource)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokemon_encounters("bulbasaur")

Get Data from PokeAPI: Pokemon Shapes

Description

Get Data from PokeAPI: Pokemon Shapes

Usage

get_pokemon_shape(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokemon_shape("ball")

Get Data from PokeAPI: Pokemon Species

Description

Get Data from PokeAPI: Pokemon Species

Usage

get_pokemon_species(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_pokemon_species("wormadam")

Get Data from PokeAPI: Regions

Description

Get Data from PokeAPI: Regions

Usage

get_region(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_region("kanto")

Get Data from PokeAPI: Stats

Description

Get Data from PokeAPI: Stats

Usage

get_stat(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_stat("attack")

Get Data from PokeAPI: Super Contest Effects

Description

Get Data from PokeAPI: Super Contest Effects

Usage

get_super_contest_effect(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_super_contest_effect(1)

Get Data from PokeAPI: Types

Description

Get Data from PokeAPI: Types

Usage

get_type(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_type("ground")

Get Data from PokeAPI: Version

Description

Get Data from PokeAPI: Version

Usage

get_version(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_version("red")

Get Data from PokeAPI: Version Groups

Description

Get Data from PokeAPI: Version Groups

Usage

get_version_group(resource = NULL)

Arguments

resource

Character or numeric. The name or ID of the resource to return from the named endpoint. Most 'get' functions can accept either, but some only accept an ID. Defaults to NULL, in which case all possible resources are returned for the provided endpoint. See details.

Details

Note that the 'trapinch' package uses version 2 of the API. See the PokéAPI documentation for more information and a full list of endpoints and resources. You can also view the built-in resource_lookups data for this information. Results are cached.

Value

A list. The exact contents depend on the endpoint and resource being requested

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.

Examples

## Not run: get_version_group("red-blue")

PokéAPI Endpoints and Resources Lookup

Description

IDs, names and URLs for each resource from each endpoint available from the PokéAPI. These can be passed used in each of the package's get_*() functions.

Usage

resource_lookups

Format

A list of length 48. Each element is a dataframe that represents the possible resources for each PokéAPI endpoint. The dataframes have columns id (integer), name (character) where relevant and corresponding url (character). The number of rows in each dataframe is equal to the total number of resources available for the given endpoint.

Source

API by PokéAPI https://pokeapi.co/. Data from The Pokémon Company.