pokeapi/templates/pages/docsv1.html
2016-06-02 09:42:48 +01:00

912 lines
24 KiB
HTML

{% extends "base_docs.html" %}
{% load markdown_deux_tags %}
{% block docstitle %}
<h1>Pokeapi V1 Documentation</h1>
{% endblock %}
{% block docsversionstate %}
<li class="active"><a href="#">V1</a></li>
<li><a href="/docsv2/">V2</a></li>
{% endblock %}
{% block docsnav %}
<ul>
<li><a href="#info">Information</a></li>
<li><a href="#slack">Slack</a></li>
<li><a href="#wrap">Wrappers</a></li>
<hr>
<li><a href="#pokedex">Pokedex</a></li>
<li><a href="#pokemon">Pokemon</a></li>
<li><a href="#types">Types</a></li>
<li><a href="#moves">Moves</a></li>
<li><a href="#abilities">Abilities</a></li>
<li><a href="#eggs">Egg groups</a></li>
<li><a href="#description">Descriptions</a></li>
<li><a href="#sprites">Sprites</a></li>
<li><a href="#game">Games</a></li>
</ul>
{% endblock %}
{% block docsbody %}
<h2 id="wrap">Wrappers</h2>
<p class="lead">Wrappers for these languages have been made:</p>
<ul>
<li><b>Python</b> - <a href="http://github.com/PokeAPI/pykemon">Pykemon</a> by Paul Hallett.</li>
<li><b>.NET</b> - <a href="https://gitlab.com/PoroCYon/PokeApi.NET/tree/master">PokeAPI.NET</a> by PoroCYon.</li>
<li><b>Racket</b> - <a href="https://github.com/scottlindeman/racketmon">Racketmon</a> by Scott Lindeman.</li>
<li><b>Java</b> - <a href="https://github.com/mickeyjk/PokeJava">PokeJava</a> by Mickeyjk.</li>
<li><b>Ruby</b> - <a href='https://github.com/baweaver/pokegem'>Pokegem</a> by Brandon Weaver.</li>
<li><b>Node</b> - <a href='https://github.com/TheIronDeveloper/pokeapi-node-wrapper'>PokeApi Node Wrapper</a> by Tyler Stark.</li>
<li><b>Scala</b> - <a href="https://github.com/sh0hei/mascalade-pokeapi">mascalade-pokeapi</a> by Shohei Shimomura.</li>
</ul>
<p>Written a wrapper? Let us know and we'll add it to the list here.</p>
<h2 id="pokedex" >Pokedex</h2>
<p>A Pokedex returns the names and resource_uri for all pokemon. <strong>Note</strong>: This is a special resource call. Always call <b>/api/v1/pokedex/1/</b>.</p>
<h3>GET pokedex/1/</h3>
<pre>
{
"created": "2013-11-09T15:14:48.957604",
"modified": "2013-11-09T15:14:48.957565",
"name": "national",
"pokemon": [
{
"name": "pidgeotto",
"resource_uri": "api/v1/pokemon/17/"
},
...
]
}
</pre>
<!-- <p>Fields:</p>
<ul>
<li><b>name</b> - the pokedex name e.g. <i>National</i>.</li>
<li><b>resource_uri</b> - the uri of this resource.</li>
<li><b>created</b> - the creation date of the resource.</li>
<li><b>modified</b> - the last time this resource was modified.</li>
<li><b>pokemon</b> - a big list of pokemon within this pokedex.</li>
</ul> -->
<h4>Pokedex</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokedex name e.g. <i>National</i></td>
<td>string</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource.</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource.</td>
<td>date</td>
</tr>
<tr>
<td>pokemon</td>
<td>a big list of pokemon within this pokedex.</td>
<td>list</td>
</tr>
</tbody>
</table>
<h2 id="pokemon">Pokemon</h1>
<p>A Pokemon resource represent a single Pokémon. <strong>Note</strong>: the ID for Pokémon is special. Use the <b>National pokédex</b> number as the ID to return the desired resource.</p>
<h3> GET pokemon/</h3>
<p>Returns a list of pokemon</p>
<h3> GET pokemon/{id or name}/</h3>
<pre>
{
"abilities": [
{
"name": "overgrow",
"resource_uri": "/api/v1/ability/1/"
},
{
"name": "chlorophyll",
"resource_uri": "/api/v1/ability/2/"
}
],
"attack": 49,
"catch_rate": 45,
"created": "2013-11-02T12:08:25.745455",
"defense": 49,
"egg_cycles": 21,
"egg_groups": [
{
"name": "Monster",
"resource_uri": "/api/v1/egg/1/"
},
{
"name": "Grass",
"resource_uri": "/api/v1/egg/8/"
}
],
"ev_yield": "1 Sp Atk",
"evolutions": {
"level": 16,
"method": "level up",
"resource_uri": "/api/v1/pokemon/2/",
"to": "Ivysaur"
},
"exp": 64,
"growth_rate": "ms",
"happiness": 70,
"height": "2'4",
"hp": 45,
"male_female_ratio": "87.5/12.5",
"modified": "2013-11-02T13:28:04.914889",
"moves": [
{
"learn_type": "other",
"name": "Tackle",
"resource_uri": "/api/v1/move/1/"
},
{
"learn_type": "other",
"name": "Growl",
"resource_uri": "/api/v1/move/2/"
},
{
"learn_type": "level up",
"level": 10,
"name": "Vine whip",
"resource_uri": "/api/v1/move/3/"
}
],
"name": "Bulbasaur",
"national_id": 1,
"resource_uri": "/api/v1/pokemon/4/",
"sp_atk": 65,
"sp_def": 65,
"species": "seed pokemon",
"speed": 45,
"total": 318,
"types": [
{
"name": "grass",
"resource_uri": "/api/v1/type/5/"
},
{
"name": "poison",
"resource_uri": "/api/v1/type/8/"
}
],
"weight": "15.2lbs"
}
</pre>
<h4>Pokemon</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokemon name e.g. <i>Bulbasaur</i></td>
<td>string</td>
</tr>
<tr>
<td>national_id</td>
<td>the id of the resource, this is the <b>National pokedex</b> number of the pokemon.</td>
<td>integer</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource.</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource.</td>
<td>date</td>
</tr>
<tr>
<td>modified</td>
<td>the last time this resource was modified.</td>
<td>date</td>
</tr>
<tr>
<td>abilities</td>
<td>the abilities this pokemon can have</td>
<td>list</td>
</tr>
<tr>
<td>egg_groups</td>
<td>the egg groups this pokemon is in</td>
<td>list</td>
</tr>
<tr>
<td>evolutions</td>
<td>the evolutions this pokemon can evolve into</td>
<td>list</td>
</tr>
<tr>
<td>descriptions</td>
<td>the pokedex descriptions this pokemon has</td>
<td>list</td>
</tr>
<tr>
<td>moves</td>
<td>the moves this pokemon can learn</td>
<td>list</td>
</tr>
<tr>
<td>types</td>
<td>the types this pokemon is</td>
<td>list</td>
</tr>
<tr>
<td>catch_rate</td>
<td>this pokemon's catch rate</td>
<td>integer</td>
</tr>
<tr>
<td>species</td>
<td>the species identifier of this pokemon</td>
<td>string</td>
</tr>
<tr>
<td>hp</td>
<td>the base hp stat of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>attack</td>
<td>the base attack stat of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>defense</td>
<td>the base defense stat of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>sp_atk</td>
<td>the base special attack stat of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>sp_def</td>
<td>the base special defense stat of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>speed</td>
<td>the base speed stat of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>total</td>
<td>the total of the above attributes</td>
<td>integer</td>
</tr>
<tr>
<td>speed</td>
<td>the base speed stat of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>egg_cycles</td>
<td>number of egg cycles needed</td>
<td>integer</td>
</tr>
<tr>
<td>ev_yield</td>
<td>the ev yield for this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>exp</td>
<td>the exp yield from this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>growth_rate</td>
<td>the growth rate of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>height</td>
<td>the height of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>weight</td>
<td>the weight of this pokemon</td>
<td>integer</td>
</tr>
<tr>
<td>male_female_ratio</td>
<td>in the format M / F</td>
<td>ratio</td>
</tr>
</tbody>
</table>
<h2 id="types">Type</h2>
<p>A Type resource represent a single Pokémon type</p>
<h3> GET type/</h3>
<p>Returns a list of types</p>
<h3> GET type/{id}/ </h3>
<pre>
{
"created": "2013-11-02T12:09:07.305733",
"id": 3,
"ineffective": [
{
"name": "fire",
"resource_uri": "/api/v1/type/2/"
},
{
"name": "ice",
"resource_uri": "/api/v1/type/6/"
},
{
"name": "steel",
"resource_uri": "/api/v1/type/17/"
},
{
"name": "water",
"resource_uri": "/api/v1/type/3/"
}
],
"modified": "2013-11-02T13:14:44.369331",
"name": "Water",
"no_effect": [],
"resistance": [
{
"name": "fire",
"resource_uri": "/api/v1/type/2/"
},
{
"name": "ice",
"resource_uri": "/api/v1/type/6/"
},
{
"name": "steel",
"resource_uri": "/api/v1/type/17/"
},
{
"name": "water",
"resource_uri": "/api/v1/type/3/"
}
],
"resource_uri": "/api/v1/type/3/",
"super_effective": [
{
"name": "fire",
"resource_uri": "/api/v1/type/2/"
},
{
"name": "ground",
"resource_uri": "/api/v1/type/9/"
},
{
"name": "rock",
"resource_uri": "/api/v1/type/13/"
}
],
"weakness": [
{
"name": "electric",
"resource_uri": "/api/v1/type/4/"
},
{
"name": "grass",
"resource_uri": "/api/v1/type/5/"
}
]
}
</pre>
<h4>Type</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokedex name e.g. <i>Water</i></td>
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>the id of the resource</td>
<td>integer</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource.</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource.</td>
<td>date</td>
</tr>
<tr>
<td>modified</td>
<td>the last time this resource was modified.</td>
<td>date</td>
</tr>
<tr>
<td>ineffective</td>
<td>the types this type is ineffective against</td>
<td>list</td>
</tr>
<tr>
<td>no_effect</td>
<td>the types this type has no effect against</td>
<td>list</td>
</tr>
<tr>
<td>resistance</td>
<td>the types this type is resistant to</td>
<td>list</td>
</tr>
<tr>
<td>super_effective</td>
<td>the types this type is super effective against</td>
<td>list</td>
</tr>
<tr>
<td>weakness</td>
<td>the types this type is weak to</td>
<td>list</td>
</tr>
</tbody>
</table>
<h2 id="moves">Move</h2>
<p>A Move resource represent a single move</p>
<h3> GET move/</h3>
<p>Returns a list of moves</p>
<h3> GET move/{id}/ </h3>
<pre>
{
"accuracy": 100,
"category": "physical",
"created": "2013-11-02T12:37:05.266762",
"description": "A physical attack in which the user charges and slams into the target with its whole body.",
"id": 1,
"modified": "2013-11-03T11:51:57.009696",
"name": "Tackle",
"power": 50,
"pp": 35,
"resource_uri": "/api/v1/move/1/"
}
</pre>
<h4>Move</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokedex name e.g. <i>National</i></td>
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>the id of the resource</td>
<td>integer</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>modified</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>description</td>
<td>a description of the move</td>
<td>string</td>
</tr>
<tr>
<td>power</td>
<td>the power of the move</td>
<td>integer</td>
</tr>
<tr>
<td>accuracy</td>
<td>the accuracy of the move</td>
<td>string</td>
</tr>
<tr>
<td>category</td>
<td>the category of the move</td>
<td>string</td>
</tr>
<tr>
<td>pp</td>
<td>the pp points of the move</td>
<td>string</td>
</tr>
</tbody>
</table>
<h2 id="abilities">Ability</h2>
<p>An Ability resource represent a single Pokémon ability</p>
<h3> GET ability/</h3>
<p>Returns a list of abilities</p>
<h3> GET ability/{id}/ </h3>
<pre>
{
"created": "2013-11-02T12:21:28.166682",
"description": "When a Pokmon with Overgrow uses a Grass-type move, the power will increase by 1.5x if the user has less than or equal to 1/3 of its maximum HP remaining.",
"id": 1,
"modified": "2013-11-02T13:27:06.591413",
"name": "Overgrow",
"resource_uri": "/api/v1/ability/1/"
}
</pre>
<h4>Ability</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokedex name e.g. <i>National</i></td>
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>the id of the resource</td>
<td>integer</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>modified</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>description</td>
<td>the description of this ability</td>
<td>string</td>
</tr>
</tbody>
</table>
<h2 id="eggs">Egg group</h2>
<p>An Egg group resource represent a single Pokémon egg group</p>
<h3> GET egg/</h3>
<p>Returns a list of egg groups</p>
<h3> GET egg/{id}/ </h3>
<pre>
{
"created": "2013-11-02T12:24:55.532023",
"id": 1,
"modified": "2013-11-02T12:24:55.531989",
"name": "Monster",
"pokemon": [
{
"name": "Ivysaur",
"resource_uri": "/api/v1/pokemon/2/"
},
{
"name": "Bulbasaur",
"resource_uri": "/api/v1/pokemon/1/"
}
],
"resource_uri": "/api/v1/egg/1/"
}
</pre>
<h4>EggGroup</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokedex name e.g. <i>National</i></td>
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>the id of the resource</td>
<td>integer</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>modified</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>pokemon</td>
<td>the pokemon htis egg group is for</td>
<td>list</td>
</tr>
</tbody>
</table>
<h2 id="description">Description</h2>
<p>A Description resource represent a single Pokémon pokédex description</p>
<h3> GET description/</h3>
<p>Returns a list of descriptions</p>
<h3> GET description/{id}/ </h3>
<pre>
{
created: '2013-12-24T17:14:38.281429',
description: 'A strange seed was planted on its back at birth. The plant sprouts and grows with this POKMON.',
games: [{
name: 'red(JPN)',
resource_uri: '/api/v1/game/1/'
}, {
name: 'green(JPN)',
resource_uri: '/api/v1/game/2/'
}],
id: 2,
modified: '2014-01-18T14:29:53.118541',
name: 'Bulbasaur_gen_1',
pokemon: {
name: 'bulbasaur',
resource_uri: '/api/v1/pokemon/1/'
},
resource_uri: '/api/v1/description/2/'
}
</pre>
<h4>Description</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokedex name e.g. <i>National</i></td>
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>the id of the resource</td>
<td>integer</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>modified</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>games</td>
<td>a list of games this description is in</td>
<td>list</td>
</tr>
<tr>
<td>pokemon</td>
<td>the pokemon this sprite is for</td>
<td>list</td>
</tr>
</tbody>
</table>
<h2 id="sprites">Sprite</h2>
<p>A Sprite resource represent a single Pokémon Sprite</p>
<h3> GET sprite/</h3>
<p>Returns a list of sprites</p>
<h3> GET sprite/{id}/ </h3>
<pre>
{
"created": "2013-11-02T12:34:19.113143",
"id": 1,
"image": "/media/img/1383395659.12.png",
"modified": "2013-11-02T12:34:19.113053",
"name": "Bulbasaur_blue_red",
"pokemon": {
"name": "bulbasaur",
"resource_uri": "/api/v1/pokemon/1/"
},
"resource_uri": "/api/v1/sprite/1/"
}
</pre>
<h4>Sprite</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokedex name e.g. <i>National</i></td>
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>the id of the resource</td>
<td>integer</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>modified</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>pokemon</td>
<td>the pokemon this sprite is for</td>
<td>pokemon</td>
</tr>
<tr>
<td>image</td>
<td>the uri for the sprite image</td>
<td>string</td>
</tr>
</tbody>
</table>
<h2 id="game">Game</h2>
<p>A Game resource represent a single Pokémon game</p>
<h3> GET game/</h3>
<p>Returns a list of games</p>
<h3> GET game/{id}/ </h3>
<pre>
{
"created": "2013-11-02T12:11:41.755402",
"generation": 1,
"id": 1,
"modified": "2013-11-02T12:12:47.378286",
"name": "Pokemon red (JPN)",
"release_year": 1996,
"resource_uri": "/api/v1/game/1/"
}
</pre>
<h4>Game</h4>
<table>
<thead>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>the pokedex name e.g. <i>National</i></td>
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>the id of the resource</td>
<td>integer</td>
</tr>
<tr>
<td>resource_uri</td>
<td>the uri of this resource</td>
<td>string</td>
</tr>
<tr>
<td>created</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>modified</td>
<td>the creation date of the resource</td>
<td>date</td>
</tr>
<tr>
<td>release_year</td>
<td>the year the game was released</td>
<td>string</td>
</tr>
<tr>
<td>generation</td>
<td>the generation this game belongs to</td>
<td>integer</td>
</tr>
</tbody>
</table>
{% endblock %}