-
Notifications
You must be signed in to change notification settings - Fork 1
Pokemon
Sayad Uddin Tahsin edited this page Apr 9, 2023
·
2 revisions
The Pokemon category is a part of a library that provides information about Pokemon. With this category, you can get information on various aspects of Pokemon, including abilities, moves, items, and Pokedex entries.
Get Pokemon ability information.
- ability (str): Ability name/id
- id (int): Ability ID
- name (str): Ability Name
- generation (int): Ability Generation
- effects (str): Ability Effects
- description (str): Ability Description
- pokemons (list): Ability Pokemons
- descriptions (str): Ability Descriptions (Versions)
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import pokemon
# Create a new instance of the Ability class
ability = others.Ability("1")
# Get the info (e.g. generation)
generation = ability.generation
Get Pokemon item information
- item (str): Item name/id
- id (int): Item ID
- name (str): Item Name
- effects (str): Item Effects
- cost (int): Item Cost
- attributes (list): Item Attributes
- sprite (list): Item Sprites
- descriptions (str): Item Descriptions (Versions)
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import pokemon
# Create a new instance of the Item class
item = others.Item("1")
# Get the info (e.g. sprite)
sprite = item.sprite
Get Pokemon move information
- move (str): Move name/id
- id (int): Move ID
- name (str): Move Name
- generation (int): Move Generation
- effects (str): Move Effects
- type (str): Move Description
- category (list): Move Category
- contest (str): Move Contest
- pp (int): Move Contest
- power (int): Move Contest
- accuracy (int): Move Contest
- priority (int): Move Contest
- pokemon (list): Move Contest
- descriptions (str): Move Descriptions (Description, Version)
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import pokemon
# Create a new instance of the Ability class
move = others.Move("1")
# Get the info (e.g. accuracy)
accuracy = move.accuracy
Get Pokemon information
- ability (str): Pokedex name
- name (str): Pokedex Name
- id (str): Pokedex ID
- type (list): Pokedex Types
- species (list): Pokedex Species
- abilities (list): Pokedex Abilities
- height (str): Pokedex Height
- weight (str): Pokedex Weight
- base_experience (str): Pokedex Base Experience
- egg_groups (list): Pokedex Egg Groups
-
stats (class)
-
- hp (str): Stats HP
- attack (str): Stats Attack
- defense (str): Stats Defense
- sp_atk (str): Stats SP Attack
- sp_def (str): Stats SP Defense
- speed (str): Stats Speed
- total (str): Stats Total
- raw (dict): The Stats raw JSON response from the API.
-
-
family (class)
-
- evolutionStage (str): Family Evolution Stage
- evolutionLine (list): Family Evolution Line
- raw (dict): The Family raw JSON response from the API.
-
-
sprites (class)
-
- normal (str): Sprite Normal
- animated (list): Sprite Animated
- raw (dict): The Sprites raw JSON response from the API.
-
- description (str): Pokedex Description
- generation (str): Pokedex generation
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
from sra import pokemon
# Create a new instance of the Pokedex class
ability = pokemon.Pokedex("pikachu")
# Get the info (e.g. weight, sprite (animated))
generation = ability.generation
sprite_animated = ability.sprites.animated
sra-pylib by Sayad Uddin Tahsin
-
Animal
-
Animu
-
Canvas
-
Facts
-
Image
-
Others
-
Pokemon
-
Chatbot
-
Welcome (Free)
- ImageNotFound
- InvalidFileFormat
- APITimeout
- APIError
- ImageRetrieveError
- InvalidAvatarURL
- InvalidImageURL
- InvalidHEXColor
- InvalidBrightnessPower
- InvalidRGBCode
- DisplayNameError
- UsernameError
- CommentError
- ThemeError
- InvalidTemplate
- InvalidBackground
- InvalidFont
- InvalidType
- InvalidTextColor
- ThresholdError