@lucasmod/pokemon.js 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +96 -58
- package/docs/index.html +187 -84
- package/docs/styles.css +761 -106
- package/package.json +4 -4
- package/src/PokeAPI/get_ability.js +17 -17
- package/src/PokeAPI/get_all.js +9 -9
- package/src/PokeAPI/get_evolution_line.js +18 -18
- package/src/PokeAPI/get_generation.js +11 -11
- package/src/PokeAPI/get_item.js +13 -13
- package/src/PokeAPI/get_move.js +13 -13
- package/src/PokeAPI/get_nature.js +13 -13
- package/src/PokeAPI/get_pokemon.js +13 -13
- package/src/PokeAPI/get_pokemon_species.js +13 -13
- package/src/PokeAPI/get_region.js +12 -12
- package/src/PokeAPI/get_type.js +17 -17
- package/src/index.js +24 -24
- package/src/utils/filter_data.js +12 -12
- package/src/utils/format.js +2 -2
- package/src/utils/get.js +28 -28
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lucasmod
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,85 +1,123 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# `@lucasmod/pokemon.js`
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
✨ **A maneira mais fácil de interagir com a PokéAPI no Node.js!** ✨
|
|
6
|
+
|
|
7
|
+
<br>
|
|
8
|
+
|
|
9
|
+
<!-- Badges Dinâmicos (Substituir 'lucasmod' pelo nome de usuário correto no GitHub para os badges de estrela/fork, se necessário) -->
|
|
10
|
+
[](https://www.npmjs.com/package/@lucasmod/pokemon.js)
|
|
11
|
+
[](https://www.npmjs.com/package/@lucasmod/pokemon.js)
|
|
12
|
+
[](https://nodejs.org/)
|
|
13
|
+
[](https://opensource.org/licenses/MIT)
|
|
14
|
+
|
|
15
|
+
<br>
|
|
16
|
+
|
|
17
|
+
<!-- Imagem de Destaque (Mantendo a imagem original, mas centralizada com Markdown) -->
|
|
18
|
+
<img src="https://i.postimg.cc/Sx7sKrmx/pokemon.png" alt="pokemon.js - Interaja com a PokéAPI" width="546" />
|
|
19
|
+
|
|
20
|
+
<br>
|
|
21
|
+
|
|
22
|
+
</div>
|
|
6
23
|
|
|
7
24
|
---
|
|
8
|
-
<div align="left">
|
|
9
|
-
<br />
|
|
10
|
-
<p>
|
|
11
|
-
<a href="https://www.npmjs.com/package/@lucasmod/pokemon.js"><img src="https://i.postimg.cc/Sx7sKrmx/pokemon.png" width="546" alt="pokemon.js" /></a>
|
|
12
|
-
</p>
|
|
13
|
-
<br />
|
|
14
|
-
<p>
|
|
15
|
-
<a href="https://www.npmjs.com/package/@lucasmod/pokemon.js"><img src="https://img.shields.io/npm/v/pokemon.js.svg" alt="Versão NPM" /></a>
|
|
16
|
-
<a href="https://www.npmjs.com/package/@lucasmod/pokemon.js"><img src = "https://img.shields.io/npm/dt/pokemon.js.svg" alt="Downloads NPM"/></a>
|
|
17
|
-
</p>
|
|
18
|
-
<p>
|
|
19
|
-
<a href="https://www.npmjs.com/package/@lucasmod/pokemon.js"><img src="https://nodei.co/npm/pokemon.js.png" alt="npm installinfo" /></a>
|
|
20
|
-
</p>
|
|
21
|
-
</div>
|
|
22
25
|
|
|
23
|
-
##
|
|
26
|
+
## ⚡️ Sobre o Projeto
|
|
27
|
+
|
|
28
|
+
Esta é uma **versão corrigida e mantida** do pacote original `pokemon.js` [1], desenvolvida por **lucasmod**.
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
- [Instalação](#instalação)
|
|
27
|
-
- [Exemplo de Uso](#exemplo-de-uso)
|
|
28
|
-
- [Métodos](#métodos)
|
|
29
|
-
- [Links](#links)
|
|
30
|
+
O foco desta versão é garantir a **compatibilidade total** com as versões mais recentes do Node.js, corrigindo o problema de importação de módulos (ESM) que afetava o pacote original. `@lucasmod/pokemon.js` é um módulo **Node.js** que simplifica a interação com a [PokéAPI](https://pokeapi.co/) [2], permitindo que você acesse dados de Pokémon, habilidades, movimentos e muito mais de forma rápida e eficiente.
|
|
30
31
|
|
|
31
|
-
##
|
|
32
|
+
## 🛠 Instalação
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
**Requisito:** Node.js **12.0.0** ou superior. Nenhuma dependência externa é necessária.
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
Utilize o `npm` para instalar o pacote em seu projeto:
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
```bash
|
|
39
|
+
npm install @lucasmod/pokemon.js
|
|
40
|
+
```
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
## 🚀 Exemplo de Uso
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
O pacote utiliza a sintaxe moderna de **ESM** (`import/export`).
|
|
43
45
|
|
|
44
|
-
```
|
|
46
|
+
```javascript
|
|
45
47
|
import Pokemon from '@lucasmod/pokemon.js';
|
|
46
48
|
|
|
49
|
+
// Busca os dados do Pokémon 'zorua' e imprime no console
|
|
47
50
|
Pokemon.get_pokemon('zorua').then(console.log);
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
Saída (Exemplo - Retorna o JSON completo da PokéAPI):
|
|
54
|
+
{
|
|
55
|
+
id: 570,
|
|
56
|
+
name: 'zorua',
|
|
57
|
+
height: 7,
|
|
58
|
+
weight: 125,
|
|
59
|
+
base_experience: 66,
|
|
60
|
+
abilities: [ ... ],
|
|
61
|
+
types: [ ... ],
|
|
62
|
+
... // O objeto completo é muito maior!
|
|
63
|
+
}
|
|
64
|
+
*/
|
|
48
65
|
```
|
|
49
|
-
### Métodos
|
|
50
66
|
|
|
51
|
-
|
|
52
|
-
Retorna dados do pokémon em formato JSON.
|
|
67
|
+
## 📚 Referência da API (Métodos)
|
|
53
68
|
|
|
54
|
-
|
|
55
|
-
Retorna um Array dos tipos do pokémon ou retorna dados do tipo em formato JSON.
|
|
69
|
+
Abaixo estão os métodos principais disponíveis no objeto `Pokemon`:
|
|
56
70
|
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
| Método | Descrição | Parâmetros | Retorno |
|
|
72
|
+
| :--- | :--- | :--- | :--- |
|
|
73
|
+
| `get_pokemon` | Retorna dados detalhados de um Pokémon. | `pokemon` (string), `fields` (array, opcional) | `Promise<Object>` (JSON do Pokémon) |
|
|
74
|
+
| `get_type` | Retorna dados de um tipo ou os tipos de um Pokémon. | `name` (string), `is_pokemon` (boolean, opcional), `fields` (array, opcional) | `Promise<Object>` (JSON do Tipo) ou `Promise<Array>` (Tipos do Pokémon) |
|
|
75
|
+
| `get_ability` | Retorna dados de uma habilidade ou as habilidades de um Pokémon. | `name` (string), `is_pokemon` (boolean, opcional), `fields` (array, opcional) | `Promise<Object>` (JSON da Habilidade) ou `Promise<Array>` (Habilidades do Pokémon) |
|
|
76
|
+
| `get_evolution_line` | Retorna a linha evolutiva completa de um Pokémon. | `pokemon` (string), `fields` (array, opcional) | `Promise<Array>` (Linha Evolutiva) |
|
|
77
|
+
| `get_move` | Retorna dados detalhados sobre um movimento (ataque). | `move` (string), `fields` (array, opcional) | `Promise<Object>` (JSON do Movimento) |
|
|
78
|
+
| `get_nature` | Retorna os atributos afetados por uma Natureza. | `nature` (string), `fields` (array, opcional) | `Promise<Object>` (Atributos de Natureza) |
|
|
79
|
+
| `get_item` | Retorna dados detalhados sobre um item. | `item` (string), `fields` (array, opcional) | `Promise<Object>` (JSON do Item) |
|
|
80
|
+
| `get_generation` | Retorna dados sobre uma Geração específica. | `generation` (string/number), `fields` (array, opcional) | `Promise<Object>` (JSON da Geração) |
|
|
81
|
+
| `get_region` | Retorna dados sobre uma Região específica. | `region` (string), `fields` (array, opcional) | `Promise<Object>` (JSON da Região) |
|
|
82
|
+
| `get_all` | Retorna uma lista de todos os recursos de um tipo. | `type` (string: 'pokemon', 'type', 'ability', etc.) | `Promise<Array>` (Lista de Nomes) |
|
|
59
83
|
|
|
60
|
-
|
|
61
|
-
Retorna um Array que contém a linha evolutiva do pokémon.
|
|
84
|
+
## 🔗 Recursos e Links
|
|
62
85
|
|
|
63
|
-
|
|
64
|
-
|
|
86
|
+
* **NPM:** [https://www.npmjs.com/package/@lucasmod/pokemon.js] [3]
|
|
87
|
+
* **GitHub (Original):** [https://github.com/Otakump4/pokemon.js.git] [4]
|
|
88
|
+
* **PokéAPI (Fonte de Dados):** [https://pokeapi.co/] [2]
|
|
65
89
|
|
|
66
|
-
|
|
67
|
-
Retorna um Objeto que contém o atributo aumentado e diminuído causado pela natureza.
|
|
90
|
+
---
|
|
68
91
|
|
|
69
|
-
|
|
70
|
-
Retorna dados sobre o item em formato JSON.
|
|
92
|
+
### 🌟 Contribuição
|
|
71
93
|
|
|
72
|
-
|
|
73
|
-
Retorna dados sobre a geração em formato JSON.
|
|
94
|
+
Sinta-se à vontade para abrir *issues* ou enviar *pull requests* no repositório do GitHub para melhorias, correções de bugs ou novas funcionalidades.
|
|
74
95
|
|
|
75
|
-
|
|
76
|
-
Retorna dados sobre a região em formato JSON.
|
|
96
|
+
### 📜 Licença
|
|
77
97
|
|
|
78
|
-
|
|
79
|
-
Retorna um Array contendo nomes de todos os recursos do tipo especificado.
|
|
98
|
+
Este projeto está licenciado sob a Licença **MIT**.
|
|
80
99
|
|
|
81
|
-
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 📱 Conecte-se com o Autor
|
|
103
|
+
|
|
104
|
+
<div align="center">
|
|
105
|
+
|
|
106
|
+
**lucasmod**
|
|
107
|
+
|
|
108
|
+
<br>
|
|
109
|
+
|
|
110
|
+
<!-- IMPORTANTE: Substitua os links e nomes de usuário pelos seus reais! -->
|
|
111
|
+
|
|
112
|
+
[](https://instagram.com/lucas_mod_domina)
|
|
113
|
+
[](https://youtube.com/@Otaku.mp4)
|
|
114
|
+
[](https://github.com/Otakump4)
|
|
115
|
+
[](https://wa.me/559491569380)
|
|
116
|
+
[](https://t.me/LUCAS_MOD_DOMINA)
|
|
117
|
+
|
|
118
|
+
</div>
|
|
82
119
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
120
|
+
[1]: https://www.npmjs.com/package/pokemon.js "Pacote Original pokemon.js"
|
|
121
|
+
[2]: https://pokeapi.co/ "PokéAPI - The Pokémon API"
|
|
122
|
+
[3]: https://www.npmjs.com/package/@lucasmod/pokemon.js "NPM - @lucasmod/pokemon.js"
|
|
123
|
+
[4]: https://github.com/Otakump4/pokemon.js.git "GitHub - Repositório"
|
package/docs/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="stylesheet" href="styles.css">
|
|
8
8
|
<meta charset="UTF-8">
|
|
9
9
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
10
|
-
<title>pokemon.js</title>
|
|
10
|
+
<title>pokemon.js - Biblioteca Pokémon para Node.js</title>
|
|
11
11
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
12
12
|
|
|
13
13
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css">
|
|
@@ -17,118 +17,221 @@
|
|
|
17
17
|
|
|
18
18
|
<body>
|
|
19
19
|
<div class="content project-detail">
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<div class="
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
<!-- HEADER HERO -->
|
|
21
|
+
<header class="project-header hero-section">
|
|
22
|
+
<div class="hero-content">
|
|
23
|
+
<div class="hero-badge">✨ Pokémon API Wrapper</div>
|
|
24
|
+
<h1 class="hero-title">pokemon.js</h1>
|
|
25
|
+
<p class="hero-subtitle">A forma mais fácil de capturar dados Pokémon com Node.js</p>
|
|
26
|
+
|
|
27
|
+
<div class="hero-cta">
|
|
28
|
+
<a href="#instalacao" class="btn btn-primary">Começar Agora</a>
|
|
29
|
+
<a href="https://github.com/Otakump4/pokemon.js.git" class="btn btn-secondary" target="_blank">Ver no GitHub</a>
|
|
27
30
|
</div>
|
|
28
31
|
</div>
|
|
32
|
+
|
|
33
|
+
<div class="project-meta">
|
|
34
|
+
<span class="meta-item">👤 Lucas Mod</span>
|
|
35
|
+
<span class="meta-item">📅 Verão 2026</span>
|
|
36
|
+
<span class="meta-item">🎯 Projeto Pessoal</span>
|
|
37
|
+
</div>
|
|
29
38
|
</header>
|
|
30
39
|
|
|
40
|
+
<!-- BADGES -->
|
|
31
41
|
<div class="project-badges">
|
|
32
|
-
<a href="https://www.npmjs.com/package/@lucasmod/pokemon.js">
|
|
42
|
+
<a href="https://www.npmjs.com/package/@lucasmod/pokemon.js" target="_blank" class="badge-link">
|
|
33
43
|
<img src="https://img.shields.io/npm/v/pokemon.js.svg" alt="Versão NPM">
|
|
34
44
|
</a>
|
|
35
|
-
<a href="https://www.npmjs.com/package/@lucasmod/pokemon.js">
|
|
45
|
+
<a href="https://www.npmjs.com/package/@lucasmod/pokemon.js" target="_blank" class="badge-link">
|
|
36
46
|
<img src="https://img.shields.io/npm/dt/pokemon.js.svg" alt="Downloads NPM">
|
|
37
47
|
</a>
|
|
38
48
|
</div>
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<
|
|
50
|
+
<!-- TABLE OF CONTENTS -->
|
|
51
|
+
<nav class="toc-section">
|
|
52
|
+
<h3>📑 Navegação Rápida</h3>
|
|
53
|
+
<ul class="toc-list">
|
|
43
54
|
<li><a href="#sobre">Sobre</a></li>
|
|
44
55
|
<li><a href="#instalacao">Instalação</a></li>
|
|
45
56
|
<li><a href="#exemplo-uso">Exemplo de Uso</a></li>
|
|
46
|
-
<li><a href="#metodos">Métodos</a></li>
|
|
47
|
-
<li><a href="#links">Links</a></li>
|
|
57
|
+
<li><a href="#metodos">Métodos Disponíveis</a></li>
|
|
58
|
+
<li><a href="#links">Links Úteis</a></li>
|
|
48
59
|
</ul>
|
|
49
60
|
</nav>
|
|
50
61
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
<!-- ABOUT SECTION -->
|
|
63
|
+
<section id="sobre" class="project-section">
|
|
64
|
+
<h2>📖 Sobre</h2>
|
|
65
|
+
<div class="section-content">
|
|
66
|
+
<p><strong>pokemon.js</strong> é um módulo <a href="https://nodejs.org" target="_blank" class="link-highlight">Node.js</a> moderno que facilita a interação com a <a href="https://pokeapi.co/" target="_blank" class="link-highlight">PokéAPI</a>.</p>
|
|
67
|
+
<p>Com uma API simples e intuitiva, você pode acessar dados de milhares de Pokémon, tipos, habilidades, movimentos e muito mais, tudo com apenas algumas linhas de código.</p>
|
|
68
|
+
|
|
69
|
+
<div class="features-grid">
|
|
70
|
+
<div class="feature-card">
|
|
71
|
+
<div class="feature-icon">⚡</div>
|
|
72
|
+
<h4>Rápido</h4>
|
|
73
|
+
<p>Acesso otimizado aos dados da PokéAPI</p>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="feature-card">
|
|
76
|
+
<div class="feature-icon">📦</div>
|
|
77
|
+
<h4>Zero Dependências</h4>
|
|
78
|
+
<p>Nenhuma dependência externa necessária</p>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="feature-card">
|
|
81
|
+
<div class="feature-icon">🔧</div>
|
|
82
|
+
<h4>Fácil de Usar</h4>
|
|
83
|
+
<p>API simples e bem documentada</p>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="feature-card">
|
|
86
|
+
<div class="feature-icon">🎯</div>
|
|
87
|
+
<h4>Completo</h4>
|
|
88
|
+
<p>Acesso a todos os recursos da PokéAPI</p>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</section>
|
|
55
93
|
|
|
94
|
+
<!-- INSTALLATION SECTION -->
|
|
56
95
|
<section id="instalacao" class="project-section">
|
|
57
|
-
<h2
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
96
|
+
<h2>📥 Instalação</h2>
|
|
97
|
+
<div class="section-content">
|
|
98
|
+
<p><strong>Requisitos:</strong> Node.js 12.0.0 ou mais recente</p>
|
|
99
|
+
<p><strong>Dependências:</strong> Nenhuma! 🎉</p>
|
|
100
|
+
|
|
101
|
+
<div class="install-box">
|
|
102
|
+
<code class="install-command">npm install @lucasmod/pokemon.js</code>
|
|
103
|
+
<button class="copy-btn" onclick="copyToClipboard(this)">📋 Copiar</button>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
61
106
|
</section>
|
|
62
107
|
|
|
108
|
+
<!-- USAGE EXAMPLE SECTION -->
|
|
63
109
|
<section id="exemplo-uso" class="project-section">
|
|
64
|
-
<h2
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
Pokemon.
|
|
110
|
+
<h2>💡 Exemplo de Uso</h2>
|
|
111
|
+
<div class="section-content">
|
|
112
|
+
<p>Aqui está um exemplo simples para começar:</p>
|
|
113
|
+
<pre class="code-block"><code class="language-javascript">import Pokemon from '@lucasmod/pokemon.js'
|
|
114
|
+
|
|
115
|
+
// Obter dados de um Pokémon
|
|
116
|
+
Pokemon.get_pokemon('pikachu').then(data => {
|
|
117
|
+
console.log(data.name)
|
|
118
|
+
console.log(data.height)
|
|
119
|
+
console.log(data.weight)
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
// Obter tipo de um Pokémon
|
|
123
|
+
Pokemon.get_type('pikachu', true).then(types => {
|
|
124
|
+
console.log(types)
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
// Obter linha evolutiva
|
|
128
|
+
Pokemon.get_evolution_line('charmander').then(evolution => {
|
|
129
|
+
console.log(evolution)
|
|
130
|
+
})</code></pre>
|
|
131
|
+
</div>
|
|
68
132
|
</section>
|
|
69
133
|
|
|
134
|
+
<!-- METHODS SECTION -->
|
|
70
135
|
<section id="metodos" class="project-section">
|
|
71
|
-
<h2
|
|
72
|
-
<div class="
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
136
|
+
<h2>🎮 Métodos Disponíveis</h2>
|
|
137
|
+
<div class="section-content">
|
|
138
|
+
<p>Explore todos os métodos disponíveis para interagir com a PokéAPI:</p>
|
|
139
|
+
|
|
140
|
+
<div class="method-list">
|
|
141
|
+
<div class="card method">
|
|
142
|
+
<div class="method-icon">🔍</div>
|
|
143
|
+
<h3><code>get_pokemon(pokemon, fields=[])</code></h3>
|
|
144
|
+
<p>Retorna dados completos do Pokémon em formato JSON, incluindo altura, peso, tipos, habilidades e muito mais.</p>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="card method">
|
|
148
|
+
<div class="method-icon">⚔️</div>
|
|
149
|
+
<h3><code>get_type(name, is_pokemon=false, fields=[])</code></h3>
|
|
150
|
+
<p>Retorna um Array dos tipos do Pokémon ou dados detalhados do tipo em formato JSON.</p>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<div class="card method">
|
|
154
|
+
<div class="method-icon">💪</div>
|
|
155
|
+
<h3><code>get_ability(name, is_pokemon=false, fields=[])</code></h3>
|
|
156
|
+
<p>Retorna um Array das habilidades do Pokémon ou dados da habilidade em formato JSON.</p>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div class="card method">
|
|
160
|
+
<div class="method-icon">🔄</div>
|
|
161
|
+
<h3><code>get_evolution_line(pokemon, fields=[])</code></h3>
|
|
162
|
+
<p>Retorna um Array que contém toda a linha evolutiva do Pokémon, desde sua forma inicial.</p>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div class="card method">
|
|
166
|
+
<div class="method-icon">🎯</div>
|
|
167
|
+
<h3><code>get_move(move, fields=[])</code></h3>
|
|
168
|
+
<p>Retorna dados detalhados sobre um movimento em formato JSON, incluindo poder, precisão e tipo.</p>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<div class="card method">
|
|
172
|
+
<div class="method-icon">🌿</div>
|
|
173
|
+
<h3><code>get_nature(nature, fields=[])</code></h3>
|
|
174
|
+
<p>Retorna um Objeto que contém os atributos aumentados e diminuídos causados pela natureza.</p>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div class="card method">
|
|
178
|
+
<div class="method-icon">🎁</div>
|
|
179
|
+
<h3><code>get_item(item, fields=[])</code></h3>
|
|
180
|
+
<p>Retorna dados detalhados sobre um item em formato JSON, incluindo descrição e efeitos.</p>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<div class="card method">
|
|
184
|
+
<div class="method-icon">📊</div>
|
|
185
|
+
<h3><code>get_generation(generation, fields=[])</code></h3>
|
|
186
|
+
<p>Retorna dados sobre uma geração Pokémon específica em formato JSON.</p>
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<div class="card method">
|
|
190
|
+
<div class="method-icon">🗺️</div>
|
|
191
|
+
<h3><code>get_region(region, fields=[])</code></h3>
|
|
192
|
+
<p>Retorna dados sobre uma região Pokémon em formato JSON, incluindo Pokémon e locais.</p>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<div class="card method">
|
|
196
|
+
<div class="method-icon">📚</div>
|
|
197
|
+
<h3><code>get_all(type)</code></h3>
|
|
198
|
+
<p>Retorna um Array contendo nomes de todos os recursos do tipo especificado (pokémon, tipos, itens, etc).</p>
|
|
199
|
+
</div>
|
|
121
200
|
</div>
|
|
201
|
+
</div>
|
|
122
202
|
</section>
|
|
123
203
|
|
|
124
|
-
|
|
204
|
+
<!-- LINKS SECTION -->
|
|
205
|
+
<section id="links" class="project-section">
|
|
206
|
+
<h2>🔗 Links Úteis</h2>
|
|
207
|
+
<div class="section-content">
|
|
208
|
+
<p>Acesse os recursos relacionados ao projeto:</p>
|
|
209
|
+
<ul class="links">
|
|
210
|
+
<li><a href="https://www.npmjs.com/package/@lucasmod/pokemon.js" target="_blank" class="tag tag-npm">📦 NPM Package</a></li>
|
|
211
|
+
<li><a href="https://github.com/Otakump4/pokemon.js.git" target="_blank" class="tag tag-github">🐙 GitHub Repository</a></li>
|
|
212
|
+
<li><a href="https://pokeapi.co/" target="_blank" class="tag tag-api">🔌 PokéAPI</a></li>
|
|
213
|
+
</ul>
|
|
214
|
+
</div>
|
|
215
|
+
</section>
|
|
125
216
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
</ul>
|
|
217
|
+
<!-- FOOTER -->
|
|
218
|
+
<footer class="project-footer">
|
|
219
|
+
<p>Feito com ❤️ para a comunidade Pokémon • <a href="https://github.com/Otakump4/pokemon.js.git" target="_blank">Contribua no GitHub</a></p>
|
|
220
|
+
</footer>
|
|
131
221
|
</div>
|
|
222
|
+
|
|
223
|
+
<script>
|
|
224
|
+
function copyToClipboard(button) {
|
|
225
|
+
const text = button.previousElementSibling.textContent
|
|
226
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
227
|
+
const originalText = button.textContent
|
|
228
|
+
button.textContent = '✅ Copiado!'
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
button.textContent = originalText
|
|
231
|
+
}, 2000)
|
|
232
|
+
})
|
|
233
|
+
}
|
|
234
|
+
</script>
|
|
132
235
|
</body>
|
|
133
236
|
|
|
134
|
-
</html>
|
|
237
|
+
</html>
|