adding some images
1
.gitignore
vendored
|
@ -5,3 +5,4 @@
|
|||
*.DS_STORE
|
||||
db.*
|
||||
venv*
|
||||
node_modules
|
|
@ -1 +1,2 @@
|
|||
Paul Hallett paulandrewhallett@gmail.com
|
||||
Zane Adickes zaneadix@gmail.com
|
|
@ -1,56 +0,0 @@
|
|||
.header {
|
||||
text-align: center;
|
||||
padding-top:120px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding:30px;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background: #c0392b;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pad_top {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.twitter-tweet {
|
||||
margin: 0 auto !important;
|
||||
padding-top: 12px !important;
|
||||
padding-bottom: 12px !important;
|
||||
}
|
||||
|
||||
.twitter-share-button {
|
||||
float: left !important;
|
||||
width: 85px !important;
|
||||
}
|
||||
|
||||
.fb-like {
|
||||
float: left!important;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
width:100px;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav > .active > a,
|
||||
.navbar-inverse .navbar-nav > .active > a:hover,
|
||||
.navbar-inverse .navbar-nav > .active > a:focus {
|
||||
color: #ffffff;
|
||||
background: #c0392b!important;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-top: 1px solid #95a5a6;
|
||||
border-bottom: 1px solid #2c3e50;
|
||||
}
|
||||
|
||||
hr .light {
|
||||
border-top: 1px solid #ecf0f1;
|
||||
border-bottom: 1px solid #bdc3c7;
|
||||
}
|
407
assets/pokemon/css/custom.css
Executable file
|
@ -0,0 +1,407 @@
|
|||
@font-face {
|
||||
font-family: 'Lato';
|
||||
src: url('/static/pokemon/fonts/lato-regular/lato-regular.eot');
|
||||
src: url('/static/pokemon/fonts/lato-regular/lato-regular.eot?#iefix') format('embedded-opentype'),
|
||||
url('/static/pokemon/fonts/lato-regular/lato-regular.woff2') format('woff2'),
|
||||
url('/static/pokemon/fonts/lato-regular/lato-regular.woff') format('woff'),
|
||||
url('/static/pokemon/fonts/lato-regular/lato-regular.ttf') format('truetype'),
|
||||
url('/static/pokemon/fonts/lato-regular/lato-regular.svg#svgFontName') format('svg');
|
||||
}
|
||||
|
||||
html { padding-top: 50px; }
|
||||
|
||||
body, h1, h2, h3, h4, h5, h6, p {
|
||||
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: #263238;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h1, h2 { font-weight: 900; }
|
||||
|
||||
h2 { margin-bottom: 10px; }
|
||||
|
||||
a { color: #1b95e0; }
|
||||
|
||||
p, pre, table, ul {
|
||||
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
pre {
|
||||
|
||||
position: relative;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-width: 1px;
|
||||
border-color: #CCC;
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
.center-block {
|
||||
float: none;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
height: 200px;
|
||||
background-color: #263238;
|
||||
width: 100%;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.header h1,
|
||||
.header h2,
|
||||
.header h3,
|
||||
.header h4,
|
||||
.header h5 {
|
||||
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
margin: 0 10%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding:30px;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background: #EF5350;
|
||||
border-width: 0px;
|
||||
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.navbar-collapse {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav li a {
|
||||
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav .active a,
|
||||
.navbar-inverse .navbar-nav .active a:hover,
|
||||
.navbar-inverse .navbar-nav .active a:focus {
|
||||
background-color: #C62828!important;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
/*float: left;*/
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.input-group-addon {
|
||||
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.input-group-addon,
|
||||
.btn,
|
||||
.well,
|
||||
pre {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.well p:last-child{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.pad_top {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.twitter-tweet {
|
||||
margin: 0 auto !important;
|
||||
padding-top: 12px !important;
|
||||
padding-bottom: 12px !important;
|
||||
}
|
||||
|
||||
.twitter-share-button {
|
||||
float: left !important;
|
||||
width: 85px !important;
|
||||
}
|
||||
|
||||
.fb-like {
|
||||
float: left!important;
|
||||
}
|
||||
|
||||
.cta {
|
||||
|
||||
background-color: #F5F5F5;
|
||||
text-align: center;
|
||||
padding: 30px 0 30px;
|
||||
font-size: 21px;
|
||||
font-weight: 300;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.cta p:last-child {
|
||||
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* HOME
|
||||
*/
|
||||
|
||||
#home .header {
|
||||
|
||||
padding-top: 38px;
|
||||
/*margin-bottom: 30px;*/
|
||||
}
|
||||
|
||||
#home .header h1 {
|
||||
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#home .header h1:before {
|
||||
|
||||
content: "V2";
|
||||
position: absolute;
|
||||
font-size: 14px;
|
||||
top: 0;
|
||||
right: -22px;
|
||||
}
|
||||
|
||||
#home .header h1:after {
|
||||
|
||||
content: "BETA";
|
||||
position: absolute;
|
||||
font-size: 14px;
|
||||
color: #EF5350;
|
||||
top: 0;
|
||||
right: -63px;
|
||||
}
|
||||
|
||||
#home .header h2 {
|
||||
|
||||
font-weight: 300;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#home .header h4 {
|
||||
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
#home .header h4 .count {
|
||||
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
#home .btn-primary {
|
||||
|
||||
background-color: #1b95e0;
|
||||
color: #FFF
|
||||
}
|
||||
|
||||
#home pre {
|
||||
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ABOUT
|
||||
*/
|
||||
|
||||
#about .header {
|
||||
|
||||
padding-top: 65px;
|
||||
}
|
||||
|
||||
@media (min-width: 628px) {
|
||||
|
||||
#about .header {
|
||||
|
||||
padding-top: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* DOCS
|
||||
*/
|
||||
|
||||
#docs .hide {
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
#docs .header {
|
||||
|
||||
padding-top: 65px;
|
||||
}
|
||||
|
||||
@media (min-width: 516px) {
|
||||
|
||||
#docs .header {
|
||||
|
||||
padding-top: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
#docs h1#pokeapi-v2-api-reference {
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
#docs table {
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#docs table th:first-child,
|
||||
#docs table tr:first-child {
|
||||
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
#docs table th:last-child,
|
||||
#docs table tr:last-child {
|
||||
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
#docs table th, #docs table td {
|
||||
|
||||
border: 1px solid #CCC;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#docs h1, #docs h2, #docs h4, #docs #resourcename {
|
||||
|
||||
margin-top: -65px;
|
||||
padding-top: 65px;
|
||||
}
|
||||
|
||||
#docs .docs-body h1 {
|
||||
|
||||
margin-bottom: 30px;
|
||||
border-bottom: 1px solid #CCC;
|
||||
}
|
||||
|
||||
#docs h3 {
|
||||
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
#docs h6 {
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
#docs .side-nav ul {
|
||||
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#docs .side-nav ul li ul {
|
||||
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#docs .side-nav .doc-select li a {
|
||||
|
||||
padding-left: 10px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#docs .side-nav .doc-select li.active > a {
|
||||
|
||||
border-left: 2px solid #1b95e0;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
#docs .side-nav .doc-select li ul {
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
#docs .side-nav .doc-select li.active ul {
|
||||
|
||||
display: block;
|
||||
}
|
||||
|
||||
#docs .side-nav hr {
|
||||
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#docs .nav-group {
|
||||
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
#docs .nav-group.stick {
|
||||
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
top: 65px;
|
||||
}
|
||||
|
||||
#docs .side-nav .version-select li {
|
||||
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
background-color: #EF5350;
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2),
|
||||
0px -15px 0 0 #FFF;
|
||||
|
||||
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2),
|
||||
0px -15px 0 0 #FFF;
|
||||
}
|
||||
|
||||
#docs .version-select li a {
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
padding: 13px;
|
||||
width: 100%;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#docs .version-select li.active {
|
||||
|
||||
background-color: #C62828;
|
||||
}
|
||||
|
||||
#docs pre {
|
||||
|
||||
min-height: 280px;
|
||||
max-height: 280px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
#docs pre:before {
|
||||
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
display: inline-block;
|
||||
content: "example response";
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 10px;
|
||||
}
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
BIN
assets/pokemon/fonts/lato-regular/lato-regular.eot
Executable file
2836
assets/pokemon/fonts/lato-regular/lato-regular.svg
Executable file
After Width: | Height: | Size: 201 KiB |
BIN
assets/pokemon/fonts/lato-regular/lato-regular.ttf
Executable file
BIN
assets/pokemon/fonts/lato-regular/lato-regular.woff
Executable file
BIN
assets/pokemon/fonts/lato-regular/lato-regular.woff2
Executable file
|
@ -4,7 +4,7 @@ import os
|
|||
|
||||
PROJECT_ROOT = Path(__file__).ancestor(2)
|
||||
|
||||
DEBUG = False
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ADMINS = (
|
||||
|
@ -50,7 +50,8 @@ STATIC_ROOT = PROJECT_ROOT.child('assets')
|
|||
STATIC_URL = '/assets/'
|
||||
|
||||
STATICFILES_DIRS = (
|
||||
PROJECT_ROOT.child('assets'),
|
||||
# '/pokemon/assets/',
|
||||
# 'pokemon_v2/assets/',
|
||||
)
|
||||
|
||||
STATICFILES_FINDERS = (
|
||||
|
@ -83,7 +84,7 @@ WSGI_APPLICATION = 'config.wsgi.application'
|
|||
|
||||
TEMPLATE_DIRS = (
|
||||
PROJECT_ROOT.child('templates'),
|
||||
|
||||
# PROJECT_ROOT + 'pokemon/templates'
|
||||
)
|
||||
|
||||
DATABASES = {
|
||||
|
@ -129,6 +130,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.humanize',
|
||||
'corsheaders',
|
||||
'rest_framework',
|
||||
'markdown_deux'
|
||||
) + CUSTOM_APPS
|
||||
|
||||
|
||||
|
@ -154,5 +156,19 @@ REST_FRAMEWORK = {
|
|||
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
|
||||
|
||||
'PAGE_SIZE': 20,
|
||||
|
||||
'PAGINATE_BY': 20,
|
||||
}
|
||||
|
||||
MARKDOWN_DEUX_STYLES = {
|
||||
"default": {
|
||||
"extras": {
|
||||
"code-friendly": None,
|
||||
"tables": None,
|
||||
"fenced-code-blocks": None,
|
||||
"header-ids": None
|
||||
},
|
||||
"safe_mode": False,
|
||||
},
|
||||
}
|
||||
|
|
148
config/urls.py
|
@ -2,124 +2,20 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.conf.urls import url, include
|
||||
from django.conf.urls.static import static
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
from django.contrib import admin
|
||||
admin.autodiscover()
|
||||
from django.views.generic import TemplateView
|
||||
from pokemon import urls as pokemon_urls
|
||||
from pokemon_v2 import urls as pokemon_v2_urls
|
||||
|
||||
# need to make sure v2 urls resolve last so angular routes have control
|
||||
# v2 = [ url(r'^', include(pokemon_v2_urls)) ]
|
||||
|
||||
##################################
|
||||
#
|
||||
# V1 API setup using Tastypie
|
||||
#
|
||||
##################################
|
||||
|
||||
from tastypie.api import Api
|
||||
|
||||
from pokemon.api import (
|
||||
PokemonResource, TypeResource, AbilityResource, GameResource,
|
||||
SpriteResource, DescriptionResource, EggResource, MoveResource,
|
||||
PokedexResource
|
||||
)
|
||||
|
||||
api_resources = Api()
|
||||
api_resources.register(PokemonResource())
|
||||
api_resources.register(AbilityResource())
|
||||
api_resources.register(TypeResource())
|
||||
api_resources.register(GameResource())
|
||||
api_resources.register(SpriteResource())
|
||||
api_resources.register(DescriptionResource())
|
||||
api_resources.register(EggResource())
|
||||
api_resources.register(MoveResource())
|
||||
api_resources.register(PokedexResource())
|
||||
|
||||
|
||||
#####################################
|
||||
#
|
||||
# V2 API setup using Django Rest
|
||||
#
|
||||
#####################################
|
||||
|
||||
from rest_framework import routers
|
||||
from pokemon_v2.views import *
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
|
||||
router.register(r"ability", AbilityResource)
|
||||
router.register(r"berry", BerryResource)
|
||||
router.register(r"berry-firmness", BerryFirmnessResource)
|
||||
router.register(r"berry-flavor", BerryFlavorResource)
|
||||
router.register(r"characteristic", CharacteristicResource)
|
||||
router.register(r"contest-type", ContestTypeResource)
|
||||
router.register(r"contest-effect", ContestEffectResource)
|
||||
router.register(r"egg-group", EggGroupResource)
|
||||
router.register(r"encounter-method", EncounterMethodResource) # ?
|
||||
router.register(r"encounter-condition", EncounterConditionResource) # ?
|
||||
router.register(r"encounter-condition-value", EncounterConditionValueResource) # ?
|
||||
router.register(r"evolution-chain", EvolutionChainResource)
|
||||
router.register(r"evolution-trigger", EvolutionTriggerResource)
|
||||
router.register(r"generation", GenerationResource)
|
||||
router.register(r"gender", GenderResource)
|
||||
router.register(r"growth-rate", GrowthRateResource)
|
||||
router.register(r"item", ItemResource)
|
||||
router.register(r"item-category", ItemCategoryResource)
|
||||
router.register(r"item-attribute", ItemAttributeResource)
|
||||
router.register(r"item-fling-effect", ItemFlingEffectResource)
|
||||
router.register(r"item-pocket", ItemPocketResource)
|
||||
router.register(r"language", LanguageResource)
|
||||
router.register(r"location", LocationResource)
|
||||
router.register(r"location-area", LocationAreaResource)
|
||||
router.register(r"move", MoveResource)
|
||||
router.register(r"move-ailment", MoveMetaAilmentResource)
|
||||
router.register(r"move-battle-style", MoveBattleStyleResource)
|
||||
router.register(r"move-category", MoveMetaCategoryResource)
|
||||
router.register(r"move-damage-class", MoveDamageClassResource)
|
||||
router.register(r"move-learn-method", MoveLearnMethodResource)
|
||||
router.register(r"move-target", MoveTargetResource)
|
||||
router.register(r"nature", NatureResource)
|
||||
router.register(r"pal-park-area", PalParkAreaResource)
|
||||
router.register(r"pokedex", PokedexResource)
|
||||
router.register(r"pokemon", PokemonResource)
|
||||
router.register(r"pokemon-color", PokemonColorResource)
|
||||
router.register(r"pokemon-form", PokemonFormResource)
|
||||
router.register(r"pokemon-habitat", PokemonHabitatResource)
|
||||
router.register(r"pokemon-shape", PokemonShapeResource)
|
||||
router.register(r"pokemon-species", PokemonSpeciesResource)
|
||||
router.register(r"pokeathlon-stat", PokeathlonStatResource)
|
||||
router.register(r"region", RegionResource)
|
||||
router.register(r"stat", StatResource)
|
||||
router.register(r"super-contest-effect", SuperContestEffectResource)
|
||||
router.register(r"type", TypeResource)
|
||||
router.register(r"version", VersionResource)
|
||||
router.register(r"version-group", VersionGroupResource)
|
||||
|
||||
|
||||
###########################
|
||||
#
|
||||
# Gotta Get Em' All
|
||||
#
|
||||
###########################
|
||||
|
||||
urlpatterns = patterns(
|
||||
|
||||
'',
|
||||
|
||||
url(r'^$', 'config.views.home'),
|
||||
|
||||
url(r'^docs/$',
|
||||
TemplateView.as_view(template_name='pages/docs.html'),
|
||||
name="documentation"),
|
||||
|
||||
url(r'^about/$', 'config.views.about'),
|
||||
urlpatterns = [
|
||||
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
|
||||
url(r'^api/', include(api_resources.urls)),
|
||||
|
||||
url(r'^api/v2/', include(router.urls)),
|
||||
|
||||
url(r'^media/(?P<path>.*)',
|
||||
'django.views.static.serve',
|
||||
{'document_root': settings.MEDIA_ROOT}),
|
||||
|
@ -128,4 +24,32 @@ urlpatterns = patterns(
|
|||
'django.views.static.serve',
|
||||
{'document_root': settings.STATIC_ROOT}),
|
||||
|
||||
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
url(r'^$', 'config.views.home'),
|
||||
|
||||
url(r'^docsv1/$',
|
||||
TemplateView.as_view(template_name='pages/docsv1.html'),
|
||||
name="documentation"
|
||||
),
|
||||
|
||||
url(r'^docsv2/$',
|
||||
TemplateView.as_view(template_name='pages/docsv2.html'),
|
||||
name="documentation_v2"
|
||||
),
|
||||
|
||||
url(r'^404/$',
|
||||
TemplateView.as_view(template_name='404.html'),
|
||||
name="404"
|
||||
),
|
||||
|
||||
url(r'^500/$',
|
||||
TemplateView.as_view(template_name='500.html'),
|
||||
name="500"
|
||||
),
|
||||
|
||||
url(r'^about/$', 'config.views.about'),
|
||||
|
||||
url(r'^', include(pokemon_urls)),
|
||||
|
||||
url(r'^', include(pokemon_v2_urls)),
|
||||
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # + v2
|
248
config/views.py
|
@ -5,55 +5,246 @@ from django.shortcuts import render_to_response
|
|||
from django.template import RequestContext
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from pokemon.models import (
|
||||
Pokemon, Sprite, Move, Description, Game,
|
||||
EggGroup, Type, Ability, MovePokemon
|
||||
)
|
||||
# from pokemon.models import (
|
||||
# Pokemon, Sprite, Move, Description, Game,
|
||||
# EggGroup, Type, Ability, MovePokemon
|
||||
# )
|
||||
|
||||
from pokemon_v2.models import *
|
||||
|
||||
from hits.models import ResourceView
|
||||
|
||||
|
||||
def _total_site_data():
|
||||
|
||||
"""
|
||||
Compute the total count of objects on the site
|
||||
|
||||
Using count() is drastically cheaper than len(objects.all())
|
||||
"""
|
||||
|
||||
data = dict(
|
||||
pokemon=Pokemon.objects.count(),
|
||||
sprites=Sprite.objects.count(),
|
||||
moves=Move.objects.count(),
|
||||
descriptions=Description.objects.count(),
|
||||
games=Game.objects.count(),
|
||||
egg_groups=EggGroup.objects.count(),
|
||||
types=Type.objects.count(),
|
||||
# v1
|
||||
# data = dict(
|
||||
# pokemon=Pokemon.objects.count(),
|
||||
# sprites=Sprite.objects.count(),
|
||||
# moves=Move.objects.count(),
|
||||
# descriptions=Description.objects.count(),
|
||||
# games=Game.objects.count(),
|
||||
# egg_groups=EggGroup.objects.count(),
|
||||
# types=Type.objects.count(),
|
||||
# abilities=Ability.objects.count(),
|
||||
# move_pokes=MovePokemon.objects.count()
|
||||
# )
|
||||
|
||||
|
||||
# v2 Sorry for the brute force. Theres probably a better way to do this.
|
||||
data = dict (
|
||||
abilities=Ability.objects.count(),
|
||||
move_pokes=MovePokemon.objects.count()
|
||||
abilitie_names=AbilityName.objects.count(),
|
||||
abilitie_effect_texts=AbilityEffectText.objects.count(),
|
||||
abilities_flavor_texts=AbilityFlavorText.objects.count(),
|
||||
abilities_changes=AbilityChange.objects.count(),
|
||||
abilities_change_effect_texts=AbilityChangeEffectText.objects.count(),
|
||||
berries=Berry.objects.count(),
|
||||
berry_flavors=BerryFlavor.objects.count(),
|
||||
berry_firmnesses=BerryFirmness.objects.count(),
|
||||
berry_firmness_names=BerryFirmnessName.objects.count(),
|
||||
characteristics=Characteristic.objects.count(),
|
||||
characteristic_descriptions=CharacteristicDescription.objects.count(),
|
||||
contest_combos=ContestCombo.objects.count(),
|
||||
contest_types=ContestType.objects.count(),
|
||||
contest_type_names=ContestTypeName.objects.count(),
|
||||
contest_effects=ContestEffect.objects.count(),
|
||||
contest_effect_texts=ContestEffectEffectText.objects.count(),
|
||||
contest_effect_flavor_texts=ContestEffectFlavorText.objects.count(),
|
||||
egg_groups=EggGroup.objects.count(),
|
||||
egg_group_names=EggGroupName.objects.count(),
|
||||
encounter_methods=EncounterMethod.objects.count(),
|
||||
encounter_method_names=EncounterMethodName.objects.count(),
|
||||
encounter_conditions=EncounterCondition.objects.count(),
|
||||
encounter_condition_names=EncounterConditionName.objects.count(),
|
||||
encounter_condition_values=EncounterConditionValue.objects.count(),
|
||||
encounter_condition_value_names=EncounterConditionValueName.objects.count(),
|
||||
encounter_condition_value_maps=EncounterConditionValueMap.objects.count(),
|
||||
encounter_slots=EncounterSlot.objects.count(),
|
||||
encounters=Encounter.objects.count(),
|
||||
evolution_chains=EvolutionChain.objects.count(),
|
||||
evolution_triggers=EvolutionTrigger.objects.count(),
|
||||
evolution_trigger_names=EvolutionTriggerName.objects.count(),
|
||||
experiences=Experience.objects.count(),
|
||||
generations=Generation.objects.count(),
|
||||
generation_names=GenerationName.objects.count(),
|
||||
genders=Gender.objects.count(),
|
||||
growth_rates=GrowthRate.objects.count(),
|
||||
growth_rate_descriptions=GrowthRateDescription.objects.count(),
|
||||
items=Item.objects.count(),
|
||||
item_names=ItemName.objects.count(),
|
||||
item_effect_texts=ItemEffectText.objects.count(),
|
||||
item_categories=ItemCategory.objects.count(),
|
||||
item_category_names=ItemCategoryName.objects.count(),
|
||||
item_attributes=ItemAttribute.objects.count(),
|
||||
item_attribute_maps=ItemAttributeMap.objects.count(),
|
||||
item_attribute_descriptions=ItemAttributeDescription.objects.count(),
|
||||
item_flavor_texts=ItemFlavorText.objects.count(),
|
||||
item_fling_effects=ItemFlingEffect.objects.count(),
|
||||
item_fling_effect_effect_texts=ItemFlingEffectEffectText.objects.count(),
|
||||
item_pockets=ItemPocket.objects.count(),
|
||||
item_pocket_names=ItemPocketName.objects.count(),
|
||||
item_game_indexes=ItemGameIndex.objects.count(),
|
||||
languages=Language.objects.count(),
|
||||
language_names=LanguageName.objects.count(),
|
||||
locations=Location.objects.count(),
|
||||
location_game_indexes=LocationGameIndex.objects.count(),
|
||||
location_names=LocationName.objects.count(),
|
||||
location_areas=LocationArea.objects.count(),
|
||||
location_area_names=LocationAreaName.objects.count(),
|
||||
location_area_encounter_rates=LocationAreaEncounterRate.objects.count(),
|
||||
machines=Machine.objects.count(),
|
||||
moves=Move.objects.count(),
|
||||
move_names=MoveName.objects.count(),
|
||||
move_changes=MoveChange.objects.count(),
|
||||
move_flavor_text=MoveFlavorText.objects.count(),
|
||||
move_effects=MoveEffect.objects.count(),
|
||||
move_effect_changes=MoveEffectChange.objects.count(),
|
||||
move_effect_change_effect_texts=MoveEffectChangeEffectText.objects.count(),
|
||||
move_effect_effect_texts=MoveEffectEffectText.objects.count(),
|
||||
move_attributes=MoveAttribute.objects.count(),
|
||||
move_attribute_names=MoveAttributeName.objects.count(),
|
||||
move_attribute_maps=MoveAttributeMap.objects.count(),
|
||||
move_attribute_descriptions=MoveAttributeDescription.objects.count(),
|
||||
move_metas=MoveMeta.objects.count(),
|
||||
move_ailments=MoveMetaAilment.objects.count(),
|
||||
move_ailment_names=MoveMetaAilmentName.objects.count(),
|
||||
move_battle_styles=MoveBattleStyle.objects.count(),
|
||||
move_battle_style_names=MoveBattleStyleName.objects.count(),
|
||||
move_categories=MoveMetaCategory.objects.count(),
|
||||
move_damage_classes=MoveDamageClass.objects.count(),
|
||||
move_damage_class_descriptions=MoveDamageClassDescription.objects.count(),
|
||||
move_learn_methods=MoveLearnMethod.objects.count(),
|
||||
move_learn_method_names=MoveLearnMethodName.objects.count(),
|
||||
move_targets=MoveTarget.objects.count(),
|
||||
move_target_descriptions=MoveTargetDescription.objects.count(),
|
||||
move_state_changes=MoveMetaStatChange.objects.count(),
|
||||
natures=Nature.objects.count(),
|
||||
nature_names=NatureName.objects.count(),
|
||||
nature_pokeathlon_stats=NaturePokeathlonStat.objects.count(),
|
||||
nature_battle_style_preference=NatureBattleStylePreference.objects.count(),
|
||||
pal_park_areas=PalParkArea.objects.count(),
|
||||
pal_park_area_names=PalParkAreaName.objects.count(),
|
||||
pal_parks=PalPark.objects.count(),
|
||||
pokeathlon_stat_names=PokeathlonStatName.objects.count(),
|
||||
pokeathlon_stats=PokeathlonStat.objects.count(),
|
||||
pokedexes=PokedexVersionGroup.objects.count(),
|
||||
pokedex_descriptions=PokedexDescription.objects.count(),
|
||||
pokedex_version_groups=PokedexVersionGroup.objects.count(),
|
||||
pokemon=Pokemon.objects.count(),
|
||||
pokemon_abilities=PokemonAbility.objects.count(),
|
||||
pokemon_colors=PokemonColor.objects.count(),
|
||||
pokemon_names=PokemonColorName.objects.count(),
|
||||
pokemon_dex_numbers=PokemonDexNumber.objects.count(),
|
||||
pokemon_egg_groups=PokemonEggGroup.objects.count(),
|
||||
pokemon_evolutions=PokemonEvolution.objects.count(),
|
||||
pokemon_forms=PokemonForm.objects.count(),
|
||||
pokemon_form_names=PokemonFormName.objects.count(),
|
||||
pokemon_form_generations=PokemonFormGeneration.objects.count(),
|
||||
pokemon_game_indices=PokemonGameIndex.objects.count(),
|
||||
pokemon_habitats=PokemonHabitat.objects.count(),
|
||||
pokemon_habitat_names=PokemonHabitatName.objects.count(),
|
||||
pokemon_items=PokemonItem.objects.count(),
|
||||
pokemon_moves=PokemonMove.objects.count(),
|
||||
pokemon_shapes=PokemonShape.objects.count(),
|
||||
pokemon_shape_names=PokemonShapeName.objects.count(),
|
||||
pokemon_species=PokemonSpecies.objects.count(),
|
||||
pokemon_species_names=PokemonSpeciesName.objects.count(),
|
||||
pokemon_descriptions=PokemonSpeciesDescription.objects.count(),
|
||||
pokemon_flavor_texts=PokemonSpeciesFlavorText.objects.count(),
|
||||
pokemon_stat=PokemonStat.objects.count(),
|
||||
pokemon_type=PokemonType.objects.count(),
|
||||
regions=Region.objects.count(),
|
||||
region_names=RegionName.objects.count(),
|
||||
stats=Stat.objects.count(),
|
||||
stat_names=StatName.objects.count(),
|
||||
super_contest_effects=SuperContestEffect.objects.count(),
|
||||
super_contest_combos=SuperContestCombo.objects.count(),
|
||||
super_contest_effect_flavor_texts=SuperContestEffectFlavorText.objects.count(),
|
||||
types=Type.objects.count(),
|
||||
type_names=TypeName.objects.count(),
|
||||
type_game_indices=TypeGameIndex.objects.count(),
|
||||
type_efficacy=TypeEfficacy.objects.count(),
|
||||
versions=Version.objects.count(),
|
||||
version_names=VersionName.objects.count(),
|
||||
version_groups=VersionGroup.objects.count(),
|
||||
version_group_move_learn_methods=VersionGroupMoveLearnMethod.objects.count(),
|
||||
version_group_regions=VersionGroupRegion.objects.count(),
|
||||
)
|
||||
|
||||
t = 0
|
||||
lines = 0
|
||||
for i in data.iteritems():
|
||||
t += i[1]
|
||||
lines += i[1]
|
||||
|
||||
data['total_items'] = t
|
||||
resources = 0
|
||||
resources += data['abilities'];
|
||||
resources += data['berries'];
|
||||
resources += data['berry_flavors'];
|
||||
resources += data['berry_firmnesses'];
|
||||
resources += data['characteristics'];
|
||||
resources += data['contest_types'];
|
||||
resources += data['contest_effects'];
|
||||
resources += data['egg_groups'];
|
||||
resources += data['encounter_methods'];
|
||||
resources += data['encounter_conditions'];
|
||||
resources += data['encounter_condition_values'];
|
||||
resources += data['evolution_chains'];
|
||||
resources += data['evolution_triggers'];
|
||||
resources += data['generations'];
|
||||
resources += data['genders'];
|
||||
resources += data['growth_rates'];
|
||||
resources += data['items'];
|
||||
resources += data['item_attributes'];
|
||||
resources += data['item_categories'];
|
||||
resources += data['item_fling_effects'];
|
||||
resources += data['item_pockets'];
|
||||
resources += data['languages'];
|
||||
resources += data['locations'];
|
||||
resources += data['location_areas'];
|
||||
resources += data['moves'];
|
||||
resources += data['move_ailments'];
|
||||
resources += data['move_categories'];
|
||||
resources += data['move_battle_styles'];
|
||||
resources += data['move_damage_classes'];
|
||||
resources += data['move_learn_methods'];
|
||||
resources += data['move_targets'];
|
||||
resources += data['natures'];
|
||||
resources += data['pal_park_areas'];
|
||||
resources += data['pokedexes'];
|
||||
resources += data['pokemon'];
|
||||
resources += data['pokemon_colors'];
|
||||
resources += data['pokemon_forms'];
|
||||
resources += data['pokemon_habitats'];
|
||||
resources += data['pokemon_shapes'];
|
||||
resources += data['pokemon_species'];
|
||||
resources += data['pokeathlon_stats'];
|
||||
resources += data['regions'];
|
||||
resources += data['stats'];
|
||||
resources += data['super_contest_effects'];
|
||||
resources += data['types'];
|
||||
resources += data['versions'];
|
||||
resources += data['version_groups'];
|
||||
|
||||
|
||||
data['total_lines'] = lines
|
||||
data['total_resources'] = resources
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@login_required
|
||||
def moderate(request):
|
||||
|
||||
return render_to_response(
|
||||
'pages/moderate.html',
|
||||
{}, context_instance=RequestContext(request))
|
||||
|
||||
|
||||
def about(request):
|
||||
|
||||
site_data = _total_site_data()
|
||||
|
||||
total_views = ResourceView.objects.total_count()
|
||||
total_v1_views = ResourceView.objects.total_count(version=1)
|
||||
total_v2_views = ResourceView.objects.total_count(version=2)
|
||||
|
||||
average_day = int(round(total_views / ResourceView.objects.count()))
|
||||
|
||||
|
@ -61,6 +252,8 @@ def about(request):
|
|||
'pages/about.html',
|
||||
{
|
||||
'total': total_views,
|
||||
'total_v1': total_v1_views,
|
||||
'total_v2': total_v2_views,
|
||||
'average_day': average_day,
|
||||
'site_data': site_data,
|
||||
},
|
||||
|
@ -82,10 +275,3 @@ def home(request):
|
|||
},
|
||||
context_instance=RequestContext(request)
|
||||
)
|
||||
|
||||
|
||||
def twilio(request):
|
||||
|
||||
return render_to_response(
|
||||
'pages/twilio.html',
|
||||
{}, context_instance=RequestContext(request))
|
||||
|
|
BIN
data/pokemon_sprites/10001.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
data/pokemon_sprites/10002.png
Normal file
After Width: | Height: | Size: 949 B |
BIN
data/pokemon_sprites/10003.png
Normal file
After Width: | Height: | Size: 950 B |
BIN
data/pokemon_sprites/10004.png
Normal file
After Width: | Height: | Size: 609 B |
BIN
data/pokemon_sprites/10005.png
Normal file
After Width: | Height: | Size: 530 B |
|
@ -1 +1,5 @@
|
|||
<<<<<<< Updated upstream
|
||||
from .build import *
|
||||
=======
|
||||
from build import *
|
||||
>>>>>>> Stashed changes
|
||||
|
|
109
gulpfile.js
Normal file
|
@ -0,0 +1,109 @@
|
|||
|
||||
var gulp = require('gulp'),
|
||||
plumber = require('gulp-plumber'),
|
||||
jshint = require('gulp-jshint'),
|
||||
stylish = require('jshint-stylish'),
|
||||
concat = require('gulp-concat'),
|
||||
flatten = require('gulp-flatten'),
|
||||
browserSync = require('browser-sync').create(),
|
||||
sass = require('gulp-sass'),
|
||||
nano = require('gulp-cssnano'),
|
||||
uglify = require('gulp-uglify');
|
||||
|
||||
var client = {
|
||||
|
||||
html: {
|
||||
|
||||
'partials': 'pokemon_v2/client/components/**/views/*.html'
|
||||
},
|
||||
|
||||
scripts: [
|
||||
'pokemon_v2/client/app.js',
|
||||
'pokemon_v2/client/components/**/scripts/*-module.js',
|
||||
'pokemon_v2/client/components/**/scripts/*-routes.js',
|
||||
'pokemon_v2/client/components/**/scripts/*-filters.js',
|
||||
'pokemon_v2/client/components/**/scripts/*-service.js',
|
||||
'pokemon_v2/client/components/**/scripts/*-directive.js',
|
||||
'pokemon_v2/client/components/**/scripts/*-controller.js'
|
||||
],
|
||||
|
||||
styles : {
|
||||
|
||||
src: [
|
||||
'pokemon_v2/client/components/core/styles/core.scss',
|
||||
'pokemon_v2/client/components/core/styles/!(core).scss',
|
||||
'pokemon_v2/client/components/!(core)/styles/*.scss'
|
||||
],
|
||||
|
||||
includes: [
|
||||
'pokemon_v2/client/components/core/styles'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
var out = {
|
||||
|
||||
all: 'assets/pokemon_v2/**/*.*',
|
||||
scripts: 'assets/pokemon_v2/js',
|
||||
styles: 'assets/pokemon_v2/css',
|
||||
partials: 'assets/pokemon_v2/partials'
|
||||
}
|
||||
|
||||
|
||||
gulp.task('html', function () {
|
||||
|
||||
return gulp.src(client.html.partials)
|
||||
.pipe(flatten())
|
||||
.pipe(gulp.dest(out.partials));
|
||||
});
|
||||
|
||||
|
||||
gulp.task('scripts', function () {
|
||||
|
||||
return gulp.src(client.scripts)
|
||||
.pipe(plumber())
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter(stylish))
|
||||
.pipe(uglify())
|
||||
.pipe(concat('app.min.js'))
|
||||
.pipe(gulp.dest(out.scripts));
|
||||
});
|
||||
|
||||
|
||||
gulp.task('styles', function () {
|
||||
|
||||
return gulp.src(client.styles.src)
|
||||
.pipe(plumber())
|
||||
.pipe(sass({
|
||||
outputStyle: 'expanded',
|
||||
includePaths: client.styles.includes
|
||||
}))
|
||||
.pipe(nano())
|
||||
.pipe(concat('app.min.css'))
|
||||
.pipe(gulp.dest(out.styles))
|
||||
});
|
||||
|
||||
|
||||
gulp.task('watch', function () {
|
||||
|
||||
gulp.watch(client.styles.src, ['styles']);
|
||||
gulp.watch(client.html.partials, ['html']);
|
||||
gulp.watch(client.scripts, ['scripts']);
|
||||
});
|
||||
|
||||
|
||||
gulp.task('sync', function () {
|
||||
|
||||
browserSync.init({
|
||||
|
||||
port : 3000,
|
||||
files : out.all,
|
||||
logLevel : 'info', // info, debug, warn ,silent
|
||||
// middleware : [fallback],
|
||||
proxy : 'localhost:8000'
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
gulp.task('default', ['html', 'scripts', 'styles']);
|
||||
gulp.task('start', ['default', 'watch', 'sync']);
|
20
hits/migrations/0002_resourceview_version.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('hits', '0001_squashed_0005_auto_20160107_0231'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='resourceview',
|
||||
name='version',
|
||||
field=models.IntegerField(default=1, max_length=1),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
|
@ -5,20 +5,28 @@ from datetime import date, timedelta
|
|||
|
||||
class ViewManager(models.Manager):
|
||||
|
||||
def increment_view_count(self):
|
||||
def increment_view_count(self, version):
|
||||
|
||||
view, _ = ResourceView.objects.get_or_create(
|
||||
version=version,
|
||||
date=date.today()
|
||||
)
|
||||
|
||||
view.count = view.count + 1
|
||||
|
||||
print view
|
||||
|
||||
view.save()
|
||||
|
||||
def total_count(self):
|
||||
def total_count(self, version=0):
|
||||
|
||||
if version:
|
||||
objects = ResourceView.objects.filter(version=version)
|
||||
else:
|
||||
objects = ResourceView.objects.all()
|
||||
|
||||
t = 0
|
||||
for v in ResourceView.objects.all():
|
||||
for v in objects:
|
||||
t += v.count
|
||||
|
||||
return t
|
||||
|
@ -32,5 +40,6 @@ class ResourceView(models.Model):
|
|||
return str(self.date) + ' - ' + str(self.count)
|
||||
|
||||
count = models.IntegerField(max_length=1000, default=0)
|
||||
|
||||
version = models.IntegerField(max_length=1, default=1)
|
||||
date = models.DateField(auto_now=True)
|
||||
|
||||
|
|
18
package.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "pokeapi",
|
||||
"version": "2.0.0",
|
||||
"description": "A RESTful api for pokemon data",
|
||||
"dependencies": {
|
||||
"browser-sync": "^2.10.1",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-concat": "^2.6.0",
|
||||
"gulp-cssnano": "^2.0.0",
|
||||
"gulp-flatten": "^0.2.0",
|
||||
"gulp-jshint": "^2.0.0",
|
||||
"gulp-plumber": "^1.0.1",
|
||||
"gulp-sass": "^2.1.1",
|
||||
"gulp-uglify": "^1.5.1",
|
||||
"jshint": "^2.8.0",
|
||||
"jshint-stylish": "^2.1.0"
|
||||
}
|
||||
}
|
|
@ -56,7 +56,7 @@ class PokemonResource(ModelResource):
|
|||
return lst
|
||||
|
||||
def dehydrate(self, bundle):
|
||||
ResourceView.objects.increment_view_count()
|
||||
ResourceView.objects.increment_view_count(version=1)
|
||||
bundle.data['name'] = bundle.obj.name.capitalize()
|
||||
bundle.data['abilities'] = bundle.obj.ability_list
|
||||
bundle.data['types'] = bundle.obj.type_list
|
||||
|
@ -93,7 +93,7 @@ class TypeResource(ModelResource):
|
|||
cache = SimpleCache(timeout=360)
|
||||
|
||||
def dehydrate(self, bundle):
|
||||
ResourceView.objects.increment_view_count()
|
||||
ResourceView.objects.increment_view_count(version=1)
|
||||
bundle.data['name'] = bundle.obj.name.capitalize()
|
||||
bundle.data['weakness'] = bundle.obj.weaknesses
|
||||
bundle.data['resistance'] = bundle.obj.resistances
|
||||
|
@ -113,7 +113,7 @@ class AbilityResource(ModelResource):
|
|||
cache = SimpleCache(timeout=360)
|
||||
|
||||
def dehydrate(self, bundle):
|
||||
ResourceView.objects.increment_view_count()
|
||||
ResourceView.objects.increment_view_count(version=1)
|
||||
bundle.data['name'] = bundle.obj.name.capitalize()
|
||||
bundle.data['description'] = unicode(bundle.obj.description)
|
||||
return bundle
|
||||
|
@ -129,7 +129,7 @@ class GameResource(ModelResource):
|
|||
cache = SimpleCache(timeout=360)
|
||||
|
||||
def dehydrate(self, bundle):
|
||||
ResourceView.objects.increment_view_count()
|
||||
ResourceView.objects.increment_view_count(version=1)
|
||||
bundle.data['name'] = bundle.obj.name.capitalize()
|
||||
return bundle
|
||||
|
||||
|
@ -144,7 +144,7 @@ class SpriteResource(ModelResource):
|
|||
cache = SimpleCache(timeout=360)
|
||||
|
||||
def dehydrate(self, bundle):
|
||||
ResourceView.objects.increment_view_count()
|
||||
ResourceView.objects.increment_view_count(version=1)
|
||||
bundle.data['name'] = bundle.obj.name.capitalize()
|
||||
bundle.data['pokemon'] = bundle.obj.pokemon
|
||||
return bundle
|
||||
|
@ -160,7 +160,7 @@ class DescriptionResource(ModelResource):
|
|||
cache = SimpleCache(timeout=360)
|
||||
|
||||
def dehydrate(self, bundle):
|
||||
ResourceView.objects.increment_view_count()
|
||||
ResourceView.objects.increment_view_count(version=1)
|
||||
bundle.data['name'] = bundle.obj.name.capitalize()
|
||||
bundle.data['games'] = bundle.obj.n_game
|
||||
bundle.data['pokemon'] = bundle.obj.pokemon
|
||||
|
@ -177,7 +177,7 @@ class EggResource(ModelResource):
|
|||
cache = SimpleCache(timeout=360)
|
||||
|
||||
def dehydrate(self, bundle):
|
||||
ResourceView.objects.increment_view_count()
|
||||
ResourceView.objects.increment_view_count(version=1)
|
||||
bundle.data['name'] = bundle.obj.name.capitalize()
|
||||
bundle.data['pokemon'] = bundle.obj.pokemon
|
||||
return bundle
|
||||
|
@ -193,6 +193,6 @@ class MoveResource(ModelResource):
|
|||
cache = SimpleCache(timeout=360)
|
||||
|
||||
def dehydrate(self, bundle):
|
||||
ResourceView.objects.increment_view_count()
|
||||
ResourceView.objects.increment_view_count(version=1)
|
||||
bundle.data['name'] = bundle.obj.name.capitalize()
|
||||
return bundle
|
||||
|
|
39
pokemon/urls.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf.urls import patterns, include, url
|
||||
|
||||
|
||||
from django.contrib import admin
|
||||
admin.autodiscover()
|
||||
|
||||
##################################
|
||||
#
|
||||
# V1 API setup using Tastypie
|
||||
#
|
||||
##################################
|
||||
|
||||
from tastypie.api import Api
|
||||
|
||||
from pokemon.api import (
|
||||
PokemonResource, TypeResource, AbilityResource, GameResource,
|
||||
SpriteResource, DescriptionResource, EggResource, MoveResource,
|
||||
PokedexResource
|
||||
)
|
||||
|
||||
api_resources = Api()
|
||||
api_resources.register(PokemonResource())
|
||||
api_resources.register(AbilityResource())
|
||||
api_resources.register(TypeResource())
|
||||
api_resources.register(GameResource())
|
||||
api_resources.register(SpriteResource())
|
||||
api_resources.register(DescriptionResource())
|
||||
api_resources.register(EggResource())
|
||||
api_resources.register(MoveResource())
|
||||
api_resources.register(PokedexResource())
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
url(r'^api/', include(api_resources.urls)),
|
||||
]
|
3189
pokemon_v2/README.md
|
@ -5,6 +5,7 @@ from django.shortcuts import get_object_or_404
|
|||
from .models import *
|
||||
from .serializers import *
|
||||
import re
|
||||
from hits.models import ResourceView
|
||||
|
||||
|
||||
###########################
|
||||
|
@ -50,8 +51,14 @@ class NameOrIdRetrieval():
|
|||
|
||||
return resp
|
||||
|
||||
class IncrementingReadOnlyModelViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
|
||||
class PokeapiCommonViewset(ListOrDetailSerialRelation, NameOrIdRetrieval, viewsets.ReadOnlyModelViewSet):
|
||||
def retrieve(self, request, *args, **kwargs):
|
||||
ResourceView.objects.increment_view_count(version=2)
|
||||
return super(IncrementingReadOnlyModelViewSet, self).retrieve(self, request, *args, **kwargs)
|
||||
|
||||
|
||||
class PokeapiCommonViewset(ListOrDetailSerialRelation, NameOrIdRetrieval, IncrementingReadOnlyModelViewSet):
|
||||
pass
|
||||
|
||||
|
||||
|
@ -219,20 +226,13 @@ class LocationResource(PokeapiCommonViewset):
|
|||
list_serializer_class = LocationSummarySerializer
|
||||
|
||||
|
||||
class LocationAreaResource(ListOrDetailSerialRelation, viewsets.ReadOnlyModelViewSet):
|
||||
class LocationAreaResource(ListOrDetailSerialRelation, IncrementingReadOnlyModelViewSet):
|
||||
|
||||
queryset = LocationArea.objects.all()
|
||||
serializer_class = LocationAreaDetailSerializer
|
||||
list_serializer_class = LocationAreaSummarySerializer
|
||||
|
||||
|
||||
# class MachineResource(PokeapiCommonViewset):
|
||||
|
||||
# queryset = Machine.objects.all()
|
||||
# serializer_class = MachineDetailSerializer
|
||||
# list_serializer_class = MachineSummarySerializer
|
||||
|
||||
|
||||
class MoveResource(PokeapiCommonViewset):
|
||||
|
||||
queryset = Move.objects.all()
|
|
@ -1,7 +1,6 @@
|
|||
from __future__ import unicode_literals
|
||||
from django.db import models
|
||||
|
||||
|
||||
#####################
|
||||
# ABSTRACT MODELS #
|
||||
#####################
|
||||
|
|
81
pokemon_v2/urls.py
Normal file
|
@ -0,0 +1,81 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
#####################################
|
||||
#
|
||||
# V2 API setup using Django Rest
|
||||
#
|
||||
#####################################
|
||||
|
||||
from rest_framework import routers
|
||||
from pokemon_v2.api import *
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
|
||||
router.register(r"ability", AbilityResource)
|
||||
router.register(r"berry", BerryResource)
|
||||
router.register(r"berry-firmness", BerryFirmnessResource)
|
||||
router.register(r"berry-flavor", BerryFlavorResource)
|
||||
router.register(r"characteristic", CharacteristicResource)
|
||||
router.register(r"contest-type", ContestTypeResource)
|
||||
router.register(r"contest-effect", ContestEffectResource)
|
||||
router.register(r"egg-group", EggGroupResource)
|
||||
router.register(r"encounter-method", EncounterMethodResource)
|
||||
router.register(r"encounter-condition", EncounterConditionResource)
|
||||
router.register(r"encounter-condition-value", EncounterConditionValueResource)
|
||||
router.register(r"evolution-chain", EvolutionChainResource)
|
||||
router.register(r"evolution-trigger", EvolutionTriggerResource)
|
||||
router.register(r"generation", GenerationResource)
|
||||
router.register(r"gender", GenderResource)
|
||||
router.register(r"growth-rate", GrowthRateResource)
|
||||
router.register(r"item", ItemResource)
|
||||
router.register(r"item-category", ItemCategoryResource)
|
||||
router.register(r"item-attribute", ItemAttributeResource)
|
||||
router.register(r"item-fling-effect", ItemFlingEffectResource)
|
||||
router.register(r"item-pocket", ItemPocketResource)
|
||||
router.register(r"language", LanguageResource)
|
||||
router.register(r"location", LocationResource)
|
||||
router.register(r"location-area", LocationAreaResource)
|
||||
router.register(r"move", MoveResource)
|
||||
router.register(r"move-ailment", MoveMetaAilmentResource)
|
||||
router.register(r"move-battle-style", MoveBattleStyleResource)
|
||||
router.register(r"move-category", MoveMetaCategoryResource)
|
||||
router.register(r"move-damage-class", MoveDamageClassResource)
|
||||
router.register(r"move-learn-method", MoveLearnMethodResource)
|
||||
router.register(r"move-target", MoveTargetResource)
|
||||
router.register(r"nature", NatureResource)
|
||||
router.register(r"pal-park-area", PalParkAreaResource)
|
||||
router.register(r"pokedex", PokedexResource)
|
||||
router.register(r"pokemon", PokemonResource)
|
||||
router.register(r"pokemon-color", PokemonColorResource)
|
||||
router.register(r"pokemon-form", PokemonFormResource)
|
||||
router.register(r"pokemon-habitat", PokemonHabitatResource)
|
||||
router.register(r"pokemon-shape", PokemonShapeResource)
|
||||
router.register(r"pokemon-species", PokemonSpeciesResource)
|
||||
router.register(r"pokeathlon-stat", PokeathlonStatResource)
|
||||
router.register(r"region", RegionResource)
|
||||
router.register(r"stat", StatResource)
|
||||
router.register(r"super-contest-effect", SuperContestEffectResource)
|
||||
router.register(r"type", TypeResource)
|
||||
router.register(r"version", VersionResource)
|
||||
router.register(r"version-group", VersionGroupResource)
|
||||
|
||||
|
||||
###########################
|
||||
#
|
||||
# Gotta Get Em' All
|
||||
#
|
||||
###########################
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
url(r'^api/v2/', include(router.urls)),
|
||||
|
||||
# url(r'^.*$',
|
||||
# TemplateView.as_view(template_name='home.html'),
|
||||
# name="home"
|
||||
# )
|
||||
]
|
|
@ -8,8 +8,10 @@ django-cors-headers==1.0.0
|
|||
django-discover-runner==0.4
|
||||
django-imagekit==3.2.4
|
||||
django-tastypie==0.12.1
|
||||
django-markdown-deux==1.0.5
|
||||
djangorestframework>=3.0.0
|
||||
gunicorn==0.17.0
|
||||
markdown2==2.3.0
|
||||
mimeparse==0.1.3
|
||||
pilkit==1.1.12
|
||||
psycopg2==2.5.4
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block mainbody %}
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class=""><a href="/about/">About</a></li>
|
||||
<li><a href="/docs/">Documentation</a></li>
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="/about/">About</a></li>
|
||||
<li><a href="/docsv2/">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h1>This is not the page you're looking for </h1>
|
||||
<h1 class="text-center">This is not the page you're looking for </h1>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
|
|
|
@ -5,24 +5,24 @@
|
|||
{% block page_title %}Page Not found{% endblock page_title %}
|
||||
|
||||
{% block mainbody %}
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class=""><a href="/about/">About</a></li>
|
||||
<li><a href="/docs/">Documentation</a></li>
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="/about/">About</a></li>
|
||||
<li><a href="/docsv2/">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h1>Whoops! That's not allowed!</h1>
|
||||
<h1 class="text-center">Whoops! That's not allowed!</h1>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
|
|
|
@ -10,16 +10,16 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Pokeapi The Pokemon RESTful API">
|
||||
<meta name="author" content="Paul Hallett">
|
||||
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/css/custom.css" rel="stylesheet">
|
||||
<link href="/static/pokemon/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/pokemon/css/custom.css" rel="stylesheet">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js">
|
||||
</script>
|
||||
<![endif]-->
|
||||
<link rel="shortcut icon" href="/static/favicon.ico">
|
||||
<script src="/static/js/jquery.js">
|
||||
<script src="/static/pokemon/js/jquery.js">
|
||||
</script>
|
||||
<script src="/static/js/bootstrap.min.js">
|
||||
<script src="/static/pokemon/js/bootstrap.min.js">
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
184
templates/base_docs.html
Normal file
|
@ -0,0 +1,184 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block mainbody %}
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/about/">About</a></li>
|
||||
<li class="active"><a href="#">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section id="docs">
|
||||
|
||||
<div class="header">
|
||||
|
||||
{% block docstitle %}
|
||||
|
||||
{% endblock docstitle %}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row pad_top">
|
||||
|
||||
<div class="col-sm-3 side-nav">
|
||||
|
||||
<div class="nav-group">
|
||||
|
||||
<ul class="version-select">
|
||||
|
||||
{% block docsversionstate %}
|
||||
|
||||
{% endblock docsversionstate %}
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="doc-select hidden-xs">
|
||||
|
||||
{% block docsnav %}
|
||||
|
||||
{% endblock docsnav %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 docs-body">
|
||||
|
||||
<h2 id="info">Information</h2>
|
||||
|
||||
<p class="lead">Please take note when using this API:</p>
|
||||
|
||||
<ul>
|
||||
<li>This is a <b>consumption-only</b> API - only the HTTP GET method is available on resources.</li>
|
||||
<li><b>No authentication</b> is required to access this API. All resources are fully open and available.</li>
|
||||
<ul>
|
||||
<li>There is, however, a daily rate limit of 300 requests <b>per resource</b> per IP address. So a single IP address can call the <i>bulbasaur</i> resource 300 times a day. Not 300 requests across the entire dataset! This is to stop our database from falling over under heavy load.</li>
|
||||
</ul>
|
||||
<li>If you are going to be regularly using the API, I recommend caching data on your service.</li>
|
||||
<ul>
|
||||
<li>Luckily, we provide <b>modified/created datetime stamps</b> on every single resource so you can check for updates (and thus make your caching efficient).</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
{% block docsbody %}
|
||||
|
||||
{% endblock docsbody %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<script>
|
||||
|
||||
var sticky = $('.nav-group');
|
||||
var docSelect = $('.doc-select');
|
||||
var offset = sticky.offset();
|
||||
var sideNav = $('.side-nav');
|
||||
var navParents = $('.doc-select').children('ul').children('li');
|
||||
var doc = $(document);
|
||||
var win = $(window);
|
||||
|
||||
function navOps () {
|
||||
|
||||
//check sticky
|
||||
if (doc.scrollTop() >= (offset.top - 65)) {
|
||||
|
||||
console.log(window.innerHeight - offset.top);
|
||||
|
||||
sticky.addClass('stick');
|
||||
sticky.css({
|
||||
width: sideNav.width() + 'px',
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
sticky.removeClass('stick');
|
||||
sticky.css({ width: '' });
|
||||
}
|
||||
|
||||
navParents.removeClass('active');
|
||||
var parent;
|
||||
var target;
|
||||
var activeParent = $(navParents[0]);
|
||||
var scrollTop = win.scrollTop();
|
||||
|
||||
for (var i = 0; i < navParents.length; i++) {
|
||||
|
||||
parent = $(navParents[i]);
|
||||
|
||||
target = $(parent.find('a').attr('href'));
|
||||
|
||||
if (scrollTop >= target.offset().top) {
|
||||
activeParent = parent;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
activeParent.addClass('active');
|
||||
|
||||
var children = activeParent.find('li');
|
||||
var child;
|
||||
var activeChild;
|
||||
|
||||
children.removeClass('active');
|
||||
|
||||
for (i = 0; i < children.length; i++) {
|
||||
|
||||
child = $(children[i]);
|
||||
target = $(child.find('a').attr('href'));
|
||||
|
||||
if (scrollTop >= target.offset().top) {
|
||||
activeChild = child;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (activeChild) {
|
||||
|
||||
activeChild.addClass('active');
|
||||
}
|
||||
}
|
||||
|
||||
doc.scroll(function () {
|
||||
|
||||
navOps();
|
||||
});
|
||||
|
||||
win.resize(function () {
|
||||
|
||||
navOps();
|
||||
});
|
||||
|
||||
navOps();
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
|
@ -2,167 +2,174 @@
|
|||
{% load humanize %}
|
||||
{% block mainbody %}
|
||||
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active"><a href="#">About</a></li>
|
||||
<li><a href="/docs/">Documentation</a></li>
|
||||
<li><a href="/docsv2/">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section id="about">
|
||||
|
||||
<div class="header">
|
||||
|
||||
<h1>The RESTful Pokémon Data API</h1>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="header col-md-8">
|
||||
<h1>Pokéapi - The Pokémon RESTful API</h1>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!-- /.header row -->
|
||||
<div class="row pad_top">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<p class="lead">
|
||||
What is this?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
This website provides a RESTful API interface to <b>{{ site_data.total_items|intcomma }}</b> objects
|
||||
related to <a href="https://en.wikipedia.org/wiki/Pokemon">Pokémon</a>. We specifically cover the video game franchise, though we'd like to cover the card game too. Using this website you can consume information on Pokémon, their moves, abilities, types, egg groups and much much more.
|
||||
<div class="row pad_top">
|
||||
|
||||
<div class="col-md-10 center-block">
|
||||
|
||||
<p class="lead">
|
||||
What is this?
|
||||
</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
What exactly is an API?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
This is probably worth clearing up very quickly for those who don't know.<br />
|
||||
An API (Application Programming Interface) is a set of interfaces (in this case, url links)
|
||||
that are publicly available, that allow developers to interact with an application.<br />
|
||||
In this instance; the application is a database of <b>{{ site_data.total_items|intcomma }}</b> pokemon-related objects.
|
||||
</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
Isn't there 101 other Pokémon websites already?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
Yes and that's exactly the problem!
|
||||
</p>
|
||||
<p>
|
||||
101 instances of the same website means 101 instances of the <b>same data</b>.
|
||||
</p>
|
||||
<p>
|
||||
We aim to provide a <b>single database</b> that any number of other websites
|
||||
can consume and use.
|
||||
</p>
|
||||
<p>
|
||||
Often, and especially when new Pokémon games or updates are released, the 101+ websites
|
||||
take <b>weeks</b> to update as people have to enter the same information in all those different places.
|
||||
<div class="well">
|
||||
<p>
|
||||
This website provides a RESTful API interface to <b>{{ site_data.total_resources|intcomma }}</b> highly detailed objects built from <b>{{ site_data.total_lines|intcomma }}</b> lines of data
|
||||
related to <a href="https://en.wikipedia.org/wiki/Pokemon">Pokémon</a>. We specifically cover the video game franchise, though we'd like to cover the card game too. Using this website you can consume information on Pokémon, their moves, abilities, types, egg groups and much much more.
|
||||
</p>
|
||||
<p>This solves that problem.
|
||||
</div>
|
||||
<p class="lead">
|
||||
What exactly is an API?
|
||||
</p>
|
||||
<p>
|
||||
If all those sites consumed their data from here, they would have the exact same information that is updated at exactly the same time, with no errors between each website.
|
||||
<div class="well">
|
||||
<p>
|
||||
This is probably worth clearing up very quickly for those who don't know.<br />
|
||||
An API (Application Programming Interface) is a set of interfaces (in this case, url links)
|
||||
that are publicly available, that allow developers to interact with an application.<br />
|
||||
In this instance; the application is a database of <b>{{ site_data.total_items|intcomma }}</b> pokemon-related objects.
|
||||
</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
Isn't there 101 other Pokémon websites already?
|
||||
</p>
|
||||
<p>
|
||||
The overall benefit is a better collaboration and consistency across all the different Pokémon
|
||||
websites and applications. It's good for all!
|
||||
<div class="well">
|
||||
<p>
|
||||
Yes and that's exactly the problem!
|
||||
</p>
|
||||
<p>
|
||||
101 instances of the same website means 101 instances of the <b>same data</b>.
|
||||
</p>
|
||||
<p>
|
||||
We aim to provide a <b>single database</b> that any number of other websites
|
||||
can consume and use.
|
||||
</p>
|
||||
<p>
|
||||
Often, and especially when new Pokémon games or updates are released, the 101+ websites
|
||||
take <b>weeks</b> to update as people have to enter the same information in all those different places.
|
||||
</p>
|
||||
<p>This solves that problem.
|
||||
</p>
|
||||
<p>
|
||||
If all those sites consumed their data from here, they would have the exact same information that is updated at exactly the same time, with no errors between each website.
|
||||
</p>
|
||||
<p>
|
||||
The overall benefit is a better collaboration and consistency across all the different Pokémon
|
||||
websites and applications. It's good for all!
|
||||
</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
How much information is stored here?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
We're glad you asked because we've got an impressive amount of data!
|
||||
</p>
|
||||
<p>
|
||||
We currently have <b>{{ site_data.total_items|intcomma }}</b> individual items in our database:
|
||||
</p>
|
||||
<ul>
|
||||
<li>{{ site_data.moves }} Moves</li>
|
||||
<li>{{ site_data.abilities }} Abilities</li>
|
||||
<li>{{ site_data.types }} Types</li>
|
||||
<li>{{ site_data.egg_groups }} Egg groups</li>
|
||||
<li>{{ site_data.versions }} Versions </li>
|
||||
<li>{{ site_data.items }} Items</li>
|
||||
<li>{{ site_data.pokedexes }} Pokedexes</li>
|
||||
<li>{{ site_data.pokemon }} Pokémon (includes various forms)</li>
|
||||
</ul>
|
||||
<p>And that's just scratching the surface!</p>
|
||||
<p class="lead">The server has processed <b>{{ total|intcomma }}</b> api calls at an average of <b>{{ average_day|intcomma }}</b> calls per day.</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
The API is missing stuff!
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
We know! Feel free to contribute to open issues on <a href="https://github.com/phalt/pokeapi/">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
So who built this?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
Pokémon V1 was created by <a href="http://github.com/phalt">Paul Hallett</a> as a weekend project but it quickly became more than a weekend's
|
||||
worth of work. In <a href="http://phalt.co/if-you-have-data-they-will-consume-it/" target="none">December of 2014</a> Paul deprecated V1 in favor of working on V2.
|
||||
This is where <a href="http://github.com/zaneadix">Zane Adickes</a> jumped in. Zane thought the original project was a fantastic idea and wanted to help it grow.
|
||||
With direction from Paul, Zane created the V2 api using an exact mirror of <a href="http://github.com/eevee">Veekun's</a> data related to the main series of games.
|
||||
</p>
|
||||
<p>
|
||||
This is not to say there hasn't been any help from others. Don't shy away from jumping in and helping the project in any way you can. We're sure there are plenty of ways we can improve the api that haven't been thought of yet!
|
||||
<br><br>
|
||||
Contributors:
|
||||
</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
Whered you get all of this data?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
We gathered the information on this site from various resources:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/eevee" target="none">Veekun</a> has a fantastic <a href="http://veekun.com/dex" target="none">Pokedex</a> which is also an open source <a href="https://github.com/veekun/pokedex" target="none">project</a> containing a ton of csv data. We used this to flesh out the database that powers Pokeapi.</li>
|
||||
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Main_Page" target="none">Bulbapedia</a> has a tonne of extra information that proved useful when designing models and documenting resources.</li>
|
||||
</ul>
|
||||
<p>
|
||||
I'd also like to thank:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Laven Pillay, who scraped together most of the sprites used on the site.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p class="lead">
|
||||
What's the technology stack?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
The website framework is <a href="http://djangoproject.com" target="none">Django</a>,
|
||||
a super awesome framework built around <a hre="http://python.org" target="none">Python</a>.<br />
|
||||
We use a <a href="http://www.postgresql.org" target="none">Postgres</a> database to store all our data.<br />
|
||||
We use <a href="http://www.django-rest-framework.org/" target="none">Django REST Framework</a> to expose our data through a RESTful API.<br />
|
||||
We're hosted on <a href="https://www.digitalocean.com/?refcode=eab2fea41bc6" target="none">DigitalOcean</a> servers, click the link to help keep the site running!.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="lead">
|
||||
How much information is stored here?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
I'm glad you asked because we've got an impressive amount of data!
|
||||
</p>
|
||||
<p>
|
||||
We currently have <b>{{ site_data.total_items|intcomma }}</b> individual items in our database:
|
||||
</p>
|
||||
<ul>
|
||||
<li>{{ site_data.pokemon }} Pokémon</li>
|
||||
<li>{{ site_data.moves }} Moves</li>
|
||||
<li>{{site_data.move_pokes|intcomma }} Pokémon<->move links</li>
|
||||
<li>{{ site_data.abilities }} Abilities</li>
|
||||
<li>{{ site_data.types }} Types</li>
|
||||
<li>{{ site_data.egg_groups }} Egg groups</li>
|
||||
<li>{{ site_data.descriptions }} Descriptions</li>
|
||||
<li>{{ site_data.sprites }} Sprites</li>
|
||||
<li>{{ site_data.games }} Games</li>
|
||||
</ul>
|
||||
<p class="lead">The server has processed <b>{{ total|intcomma }}</b> api calls at an average of <b>{{ average_day|intcomma }}</b> calls per day.</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
The API is missing stuff!
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
I know! Feel free to contribute to open issues on <a href="https://github.com/phalt/pokeapi/">GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
<p class="lead">
|
||||
So who built this?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
I'm Paul Hallett, a software engineer obsessed with creating things
|
||||
that benefit people. This was a weekend project of mine that has since grown
|
||||
beyond a single weekend's worth of work.
|
||||
<br />
|
||||
Find out more about me <a href="http://phalt.co">here</a>
|
||||
</p>
|
||||
<p>
|
||||
I gathered the information on this site from various resources:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="https://github.com/veekun">Veekun</a> had a huge bunch of CSV's that
|
||||
I used to build most of the data on the site.</li>
|
||||
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Main_Page">Bulbapedia</a> has a tonne of extra information that proved useful when designing the data model.</li>
|
||||
</ul>
|
||||
<p>
|
||||
I'd also like to thank:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Laven Pillay, who scraped together most of the sprites used on the site.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p class="lead">
|
||||
What's the technology stack?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
The website framework is <a href="http://djangoproject.com">Django</a>,
|
||||
a super awesome framework built around <a hre="http://python.org">Python</a>.<br />
|
||||
We use a <a href="www.postgresql.org">Postgres</a> database to store all our data.<br />
|
||||
We use <a href="http://django-tastypie.readthedocs.org/en/latest/">Django-tastypie</a> to expose our data through a RESTful API.<br />
|
||||
We're hosted on <a href="https://www.digitalocean.com/?refcode=eab2fea41bc6
|
||||
">DigitalOcean</a> servers, click the link to help keep the site running!.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!--row-->
|
||||
</div><!--row-->
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,540 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block mainbody %}
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/about/">About</a></li>
|
||||
<li class="active"><a href="#">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container bs-docs">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="header col-md-8">
|
||||
<h1>Pokéapi Documentation</h1>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!-- /.header row -->
|
||||
<div class="row pad_top">
|
||||
<div class="col-md-3">
|
||||
<div class="affix visible-md visible-lg" data-spy="affix" data-offset="200" style="position: fixed">
|
||||
<ul class="nav">
|
||||
<li><a href="#info">Information</a></li>
|
||||
<li><a href="#wrap">Wrappers</a></li>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div id="info" style="padding-top:30px"></div>
|
||||
<hr>
|
||||
<h1>Information</h1>
|
||||
<p class="lead">Please take note when using this API:</p>
|
||||
<ul>
|
||||
<li>This is a <b>consumption-only</b> API - only the HTTP GET method is available on resources.</li>
|
||||
<li><b>No authentication</b> is required to access this API. All resources are fully open and available.</li>
|
||||
<ul>
|
||||
<li>There is, however, a daily rate limit of 300 requests <b>per resource</b> per IP address. So a single IP address can call the <i>bulbasaur</i> resource 300 times a day. Not 300 requests across the entire dataset! This is to stop our database from falling over under heavy load.</li>
|
||||
</ul>
|
||||
<li>If you are going to be regularly using the API, I recommend caching data on your service.</li>
|
||||
<ul>
|
||||
<li>Luckily, we provide <b>modified/created datetime stamps</b> on every single resource so you can check for updates (and thus make your caching efficient).</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<div id="wrap" style="padding-top:30px"></div>
|
||||
<hr>
|
||||
<h1>Wrappers</h1>
|
||||
<p class="lead">Wrappers for these languages have been made:</p>
|
||||
<ul>
|
||||
<li><b>Python</b> - <a href="http://github.com/phalt/pykemon">Pykemon</a> by Paul Hallett.</li>
|
||||
<li><b>.NET</b> - <a href="https://github.com/PoroCYon/PokeApi.NET">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>
|
||||
</ul>
|
||||
<p>Written a wrapper? Let us know and we'll add it to the list here.</p>
|
||||
<div id="pokedex" style="padding-top:30px"></div>
|
||||
<hr>
|
||||
<h1>Pokedex</h1>
|
||||
<p>A Pokedex returns the names and resource_uri for all pokemon</p>
|
||||
<p class="lead"> GET pokedex/1/</p>
|
||||
<p>Note: This is a special resource call. Always call <b>/api/v1/pokedex/1/</b>.</p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/pokedex/1/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
"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>
|
||||
<div id="pokemon" style="padding-top:30px"></div>
|
||||
<hr>
|
||||
<h1>Pokemon</h1>
|
||||
<p>A Pokemon resource represent a single Pokémon</p>
|
||||
<p class="lead"> GET pokemon/</p>
|
||||
<p class="lead"> GET pokemon/ID/ </p>
|
||||
<p>Note: the ID for Pokémon is special. Use the <b>National pokédex</b> number as the ID to return the desired resource.</p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/pokemon/1/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
"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>
|
||||
<p>Fields:</p>
|
||||
<ul>
|
||||
<li><b>name</b> - the resource name e.g. <i>Bulbasaur</i>.</li>
|
||||
<li><b>national_id</b> - the id of the resource, this is the <b>National pokedex</b> number of the pokemon.</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>abilities</b> - the abilities this pokemon can have.</li>
|
||||
<li><b>egg_groups</b> - the egg groups this pokemon is in.</li>
|
||||
<li><b>evolutions</b> - the evolutions this pokemon can evolve into.</li>
|
||||
<li><b>descriptions</b> - the pokedex descriptions this pokemon has.</li>
|
||||
<li><b>moves</b> - the moves this pokemon can learn.</li>
|
||||
<li><b>types</b> - the types this pokemon is.</li>
|
||||
<li><b>catch_rate</b> - this pokemon's catch rate.</li>
|
||||
<li><b>species</b></li>
|
||||
<li><b>hp</b></li>
|
||||
<li><b>attack</b></li>
|
||||
<li><b>defense</b></li>
|
||||
<li><b>sp_atk</b></li>
|
||||
<li><b>sp_def</b></li>
|
||||
<li><b>speed</b></li>
|
||||
<li><b>total</b> - the total of the above attributes.</li>
|
||||
<li><b>egg_cycles</b> - number of egg cycles needed.</li>
|
||||
<li><b>ev_yield</b> - the ev yield for this pokemon.</li>
|
||||
<li><b>exp</b> - the exp yield from this pokemon.</li>
|
||||
<li><b>growth_rate</b> - the growth rate of this pokemon.</li>
|
||||
<li><b>height</b></li>
|
||||
<li><b>weight</b></li>
|
||||
<li><b>happiness</b> - base happiness for this pokemon.</li>
|
||||
<li><b>male_femal_ratio</b> - in the format M / F</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div id="types" style="padding-top:30px"></div>
|
||||
<h1>Type</h1>
|
||||
<p>A Type resource represent a single Pokémon type</p>
|
||||
<p class="lead"> GET type/</p>
|
||||
<p class="lead"> GET type/ID/ </p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/type/1/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
"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>
|
||||
<p>Fields:</p>
|
||||
<ul>
|
||||
<li><b>name</b> - the resource name e.g. <i>Water</i>.</li>
|
||||
<li><b>id</b> - the id of the resource.</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>ineffective</b> - the types this type is ineffective against.</li>
|
||||
<li><b>no_effect</b> - the types this type has no effect against.</li>
|
||||
<li><b>resistance</b> - the types this type is resistant to.</li>
|
||||
<li><b>super_effective</b> - the types this type is super effective against.</li>
|
||||
<li><b>weakness</b> - the types this type is weak to.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div id="moves" style="padding-top:30px"></div>
|
||||
<h1>Move</h1>
|
||||
<p>A Move resource represent a single move</p>
|
||||
<p class="lead"> GET move/</p>
|
||||
<p class="lead"> GET move/ID/ </p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/move/1/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
"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>
|
||||
<p>Fields:</p>
|
||||
<ul>
|
||||
<li><b>name</b> - the resource name e.g. <i>Water</i>.</li>
|
||||
<li><b>id</b> - the id of the resource.</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>description</b> - a description of the move.</li>
|
||||
<li><b>power</b> - the power of the move.</li>
|
||||
<li><b>accuracy</b> - the accuracy of the move.</li>
|
||||
<li><b>category</b> - the category of the move.</li>
|
||||
<li><b>pp</b> - the pp points of the move.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div id="abilities" style="padding-top:30px"></div>
|
||||
<h1>Ability</h1>
|
||||
<p>An Ability resource represent a single Pokémon ability</p>
|
||||
<p class="lead"> GET ability/</p>
|
||||
<p class="lead"> GET ability/ID/ </p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/ability/1/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
"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>
|
||||
<p>Fields:</p>
|
||||
<ul>
|
||||
<li><b>name</b> - the resource name e.g. <i>Overgrow</i>.</li>
|
||||
<li><b>id</b> - the id of the resource.</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>description</b> - the description of this ability</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div id="eggs" style="padding-top:30px"></div>
|
||||
<h1>Egg group</h1>
|
||||
<p>An Egg group resource represent a single Pokémon egg group</p>
|
||||
<p class="lead"> GET egg/</p>
|
||||
<p class="lead"> GET egg/ID/ </p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/egg/1/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
"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>
|
||||
<p>Fields:</p>
|
||||
<ul>
|
||||
<li><b>name</b> - the resource name e.g. <i>Monster</i>.</li>
|
||||
<li><b>id</b> - the id of the resource.</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 list of all the pokemon in that egg group.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div id="description" style="padding-top:30px"></div>
|
||||
<h1>Description</h1>
|
||||
<p>A Description resource represent a single Pokémon pokédex description</p>
|
||||
<p class="lead"> GET description/</p>
|
||||
<p class="lead"> GET description/ID/ </p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/description/2/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
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>
|
||||
<p>Fields:</p>
|
||||
<ul>
|
||||
<li><b>name</b> - the resource name.</li>
|
||||
<li><b>id</b> - the id of the resource.</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>games</b> - a list of games this description is in.</li>
|
||||
<li><b>pokemon</b> - the pokemon this sprite is for.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div id="sprites" style="padding-top:30px"></div>
|
||||
<h1>Sprite</h1>
|
||||
<p>A Sprite resource represent a single Pokémon Sprite</p>
|
||||
<p class="lead"> GET sprite/</p>
|
||||
<p class="lead"> GET sprite/ID/ </p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/sprite/1/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
"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>
|
||||
<p>Fields:</p>
|
||||
<ul>
|
||||
<li><b>name</b> - the resource name.</li>
|
||||
<li><b>id</b> - the id of the resource.</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> - the pokemon this sprite is for.</li>
|
||||
<li><b>image</b> - the uri for the sprite image</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div id="game" style="padding-top:30px"></div>
|
||||
<h1>Game</h1>
|
||||
<p>A Game resource represent a single Pokémon game</p>
|
||||
<p class="lead"> GET game/</p>
|
||||
<p class="lead"> GET game/ID/ </p>
|
||||
<h4>Example request</h4>
|
||||
<pre>GET http://pokeapi.co/api/v1/game/1/</pre>
|
||||
<p>Result:</p>
|
||||
<pre class="pre-scrollable">
|
||||
{
|
||||
"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>
|
||||
<p>Fields:</p>
|
||||
<ul>
|
||||
<li><b>name</b> - the resource name e.g. <i>Pokemon red</i>.</li>
|
||||
<li><b>id</b> - the id of the resource.</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>release_year</b> - the year the game was released</li>
|
||||
<li><b>generation</b> - the generation this game belongs to.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div><!--row-->
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
{% endblock %}
|
910
templates/pages/docsv1.html
Normal file
|
@ -0,0 +1,910 @@
|
|||
{% 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="#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/phalt/pykemon">Pykemon</a> by Paul Hallett.</li>
|
||||
<li><b>.NET</b> - <a href="https://github.com/PoroCYon/PokeApi.NET">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>
|
||||
</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 %}
|
149
templates/pages/docsv2.html
Normal file
|
@ -0,0 +1,149 @@
|
|||
{% extends "base_docs.html" %}
|
||||
{% load markdown_deux_tags %}
|
||||
|
||||
{% block docstitle %}
|
||||
|
||||
<h1>Pokeapi V2 Documentation</h1>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block docsversionstate %}
|
||||
|
||||
<li><a href="/docsv1/">V1</a></li>
|
||||
<li class="active"><a href="#">V2</a></li>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block docsnav %}
|
||||
|
||||
<ul>
|
||||
<li><a href="#info">Information</a></li>
|
||||
<li><a href="#wrap">Wrappers</a></li>
|
||||
|
||||
<hr>
|
||||
|
||||
<li><a href="#resource-lists">Resource Lists</a></li>
|
||||
|
||||
<hr>
|
||||
|
||||
<li class="parent"><a href="#berries-section">Berries</a>
|
||||
<ul>
|
||||
<li><a href="#berries">Berries</a></li>
|
||||
<li><a href="#berry-firmnesses">Berry Firmnesses</a></li>
|
||||
<li><a href="#berry-flavors">Berry Flavors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="parent"><a href="#contests-section">Contests</a>
|
||||
<ul>
|
||||
<li><a href="#contest-types">Contest Types</a></li>
|
||||
<li><a href="#contest-effects">Contest Effects</a></li>
|
||||
<li><a href="#super-contest-effects">Super Contest Effects</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="parent"><a href="#encounters-section">Encounters</a>
|
||||
<ul>
|
||||
<li><a href="#encounter-methods">Encounter Methods</a></li>
|
||||
<li><a href="#encounter-conditions">Encounter Conditions</a></li>
|
||||
<li><a href="#encounter-condition-values">Encounter Condition Values</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="parent"><a href="#evolution-section">Evolution</a>
|
||||
<ul>
|
||||
<li><a href="#evolution-chains">Evolution Chains</a></li>
|
||||
<li><a href="#evolution-triggers">Evolution Triggers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="parent"><a href="#games-section">Games</a>
|
||||
<ul>
|
||||
<li><a href="#generations">Generations</a></li>
|
||||
<li><a href="#pokedexes">Pokedexes</a></li>
|
||||
<li><a href="#versions">Versions</a></li>
|
||||
<li><a href="#version-groups">Version Groups</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="parent"><a href="#items-section">Items</a>
|
||||
<ul>
|
||||
<li><a href="#items">Items</a></li>
|
||||
<li><a href="#item-attributes">Item Attributes</a></li>
|
||||
<li><a href="#item-categories">Item Categories</a></li>
|
||||
<li><a href="#item-fling-effects">Item Fling Effects</a></li>
|
||||
<li><a href="#item-pockets">Item Pockets</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="parent"><a href="#moves-section">Moves</a>
|
||||
<ul>
|
||||
<li><a href="#moves">Moves</a></li>
|
||||
<li><a href="#move-ailments">Move Ailments</a></li>
|
||||
<li><a href="#move-battle-styles">Move Battle Styles</a></li>
|
||||
<li><a href="#move-categories">Move Categories</a></li>
|
||||
<li><a href="#move-damage-classes">Move Damage Classes</a></li>
|
||||
<li><a href="#move-learn-methods">Move Learn Methods</a></li>
|
||||
<li><a href="#move-targets">Move Targets</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="parent"><a href="#locations-section">Locations</a>
|
||||
<ul>
|
||||
<li><a href="#locations">Locations</a></li>
|
||||
<li><a href="#location-areas">Location Areas</a></li>
|
||||
<li><a href="#pal-park-areas">Pal Park Areas</a></li>
|
||||
<li><a href="#regions">Regions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="parent"><a href="#pokemon-section">Pokemon</a>
|
||||
<ul>
|
||||
<li><a href="#abilities">Abilities</a></li>
|
||||
<li><a href="#characteristics">Characteristics</a></li>
|
||||
<li><a href="#egg-groups">Egg Groups</a></li>
|
||||
<li><a href="#genders">Genders</a></li>
|
||||
<li><a href="#growth-rates">Growth Rates</a></li>
|
||||
<li><a href="#natures">Natures</a></li>
|
||||
<li><a href="#pokeathlon-stats">Pokeathlon Stats</a></li>
|
||||
<li><a href="#pokemon">Pokemon</a></li>
|
||||
<li><a href="#pokemon-colors">Pokemon Colors</a></li>
|
||||
<li><a href="#pokemon-forms">Pokemon Forms</a></li>
|
||||
<li><a href="#pokemon-habitats">Pokemon Habitats</a></li>
|
||||
<li><a href="#pokemon-shapes">Pokemon Shapes</a></li>
|
||||
<li><a href="#pokemon-species">Pokemon Species</a></li>
|
||||
<li><a href="#stats">Stats</a></li>
|
||||
<li><a href="#types">Types</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="parent"><a href="#utility-section">Utility</a>
|
||||
<ul>
|
||||
<li><a href="#languages">Languages</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<hr>
|
||||
|
||||
<li><a href="#common-models">Common Models</a></li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block docsbody %}
|
||||
|
||||
<h2 id="wrap">Wrappers</h2>
|
||||
|
||||
<p class="lead">V2 Doesn't have any wrappers yet!</p>
|
||||
|
||||
<p>Building something using the API? Help us out! Build a wrapper and let us know. We'll post it right here.</p>
|
||||
|
||||
{% markdown %}
|
||||
|
||||
{% include "pages/docsv2.md" %}
|
||||
|
||||
{% endmarkdown %}
|
||||
|
||||
{% endblock %}
|
3067
templates/pages/docsv2.md
Normal file
|
@ -5,221 +5,273 @@
|
|||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="/about/">About</a></li>
|
||||
<li><a href="/docs/">Documentation</a></li>
|
||||
<li><a href="/docsv2/">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section id="home">
|
||||
|
||||
<div class="header">
|
||||
<h1>Pokéapi</h1>
|
||||
<h2>The RESTful Pokémon API</h2>
|
||||
<h4>Over <span class="count">{{ total_views|intcomma }}</span> API calls received!</h4>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
{% if update %}
|
||||
<div class="row" style="padding-top:80px;text-align:center;">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="alert alert-success">{{update.content|safe}}</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!-- /.header row -->
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="{% if not update %}header{% endif %} col-md-8">
|
||||
<h1>Pokéapi - The Pokémon RESTful API</h1>
|
||||
<p class="lead center">Finally; all the Pokémon data you'll ever need, in one place,<br /> and easily accessible through a modern RESTful API.</p>
|
||||
<p class="center">Over <b>{{ total_views|intcomma }}</b> API calls received!</p>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!-- /.header row -->
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="center">
|
||||
<h1>
|
||||
Try it now!
|
||||
</h1>
|
||||
<div class="input-group pad_top">
|
||||
<span class="input-group-addon">http://pokeapi.co/api/v1/</span>
|
||||
<input id="interactive" type="text" class="form-control" placeholder="pokemon/1/">
|
||||
<span class="input-group-btn"><button onClick="interactive_call();return false;" class="btn btn-primary">submit</button></span>
|
||||
<div class="row" style="padding-top:80px;text-align:center;">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div>
|
||||
<small>Need a hint? try <a href="#" onClick="update('pokemon/1/');return false;"><i>pokemon/1/</i></a> or <a href="#" onClick="update('type/3/');return false;"><i>type/3/</i></a> or <a href="#" onClick="update('ability/4/');return false;"><i>ability/4/</i></a></small>
|
||||
<p class="lead pad_top">Resource for <span id="interactive_name">Bulbasaur</span></p>
|
||||
<div class="well">
|
||||
<pre id="interactive_output" class="pre-scrollable">
|
||||
<div class="col-md-8">
|
||||
<div class="alert alert-success">{{update.content|safe}}</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!-- /.header row -->
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="cta">
|
||||
<p>Finally; all the Pokémon data you'll ever need, in one place,<br /> and easily accessible through a modern RESTful API.</p>
|
||||
<p>Whats new in V2? Check out the <a href="/docsv2/">docs</a>!</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-10 center-block">
|
||||
|
||||
<div class="center">
|
||||
<h1>
|
||||
Try it now!
|
||||
</h1>
|
||||
<div class="input-group pad_top">
|
||||
<span class="input-group-addon url">http://pokeapi.co/api/v2/</span>
|
||||
<input id="interactive" type="text" class="form-control" placeholder="pokemon/1/">
|
||||
<span class="input-group-btn"><button onClick="interactive_call();return false;" class="btn btn-primary">submit</button></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<small>Need a hint? try <a href="#" onClick="update('pokemon/1/');return false;"><i>pokemon/1/</i></a> or <a href="#" onClick="update('type/3/');return false;"><i>type/3/</i></a> or <a href="#" onClick="update('ability/4/');return false;"><i>ability/4/</i></a></small>
|
||||
<p class="lead pad_top">Resource for <span id="interactive_name">Bulbasaur</span></p>
|
||||
|
||||
<pre id="interactive_output" class="pre-scrollable">
|
||||
{
|
||||
"id": 1,
|
||||
"name": "bulbasaur",
|
||||
"base_experience": 64,
|
||||
"height": 7,
|
||||
"is_default": true,
|
||||
"order": 1,
|
||||
"weight": 69,
|
||||
"abilities": [
|
||||
{
|
||||
"name": "overgrow",
|
||||
"resource_uri": "/api/v1/ability/1/"
|
||||
},
|
||||
{
|
||||
"name": "chlorophyll",
|
||||
"resource_uri": "/api/v1/ability/2/"
|
||||
"is_hidden": true,
|
||||
"slot": 3,
|
||||
"ability": {
|
||||
"name": "chlorophyll",
|
||||
"url": "http://localhost:8000/api/v2/ability/34/"
|
||||
}
|
||||
}
|
||||
],
|
||||
"attack": 49,
|
||||
"catch_rate": 45,
|
||||
"created": "2013-11-02T12:08:25.745455",
|
||||
"defense": 49,
|
||||
"egg_cycles": 21,
|
||||
"egg_groups": [
|
||||
"forms": [
|
||||
{
|
||||
"name": "Monster",
|
||||
"resource_uri": "/api/v1/egg/1/"
|
||||
},
|
||||
{
|
||||
"name": "Grass",
|
||||
"resource_uri": "/api/v1/egg/8/"
|
||||
"name": "bulbasaur",
|
||||
"url": "http://localhost:8000/api/v2/pokemon-form/1/"
|
||||
}
|
||||
],
|
||||
"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",
|
||||
"game_indices": [
|
||||
{
|
||||
"game_index": 1,
|
||||
"version": {
|
||||
"name": "white-2",
|
||||
"url": "http://localhost:8000/api/v2/version/22/"
|
||||
}
|
||||
}
|
||||
],
|
||||
"held_items": [],
|
||||
"location_area_encounters": [],
|
||||
"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/"
|
||||
"move": {
|
||||
"name": "captivate",
|
||||
"url": "http://localhost:8000/api/v2/move/445/"
|
||||
},
|
||||
"version_group_details": [
|
||||
{
|
||||
"level_learned_at": 0,
|
||||
"version_group": {
|
||||
"name": "heartgold-soulsilver",
|
||||
"url": "http://localhost:8000/api/v2/version-group/10/"
|
||||
},
|
||||
"move_learn_method": {
|
||||
"name": "machine",
|
||||
"url": "http://localhost:8000/api/v2/move-learn-method/4/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"level_learned_at": 0,
|
||||
"version_group": {
|
||||
"name": "platinum",
|
||||
"url": "http://localhost:8000/api/v2/version-group/9/"
|
||||
},
|
||||
"move_learn_method": {
|
||||
"name": "machine",
|
||||
"url": "http://localhost:8000/api/v2/move-learn-method/4/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"level_learned_at": 0,
|
||||
"version_group": {
|
||||
"name": "diamond-pearl",
|
||||
"url": "http://localhost:8000/api/v2/version-group/8/"
|
||||
},
|
||||
"move_learn_method": {
|
||||
"name": "machine",
|
||||
"url": "http://localhost:8000/api/v2/move-learn-method/4/"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"species": {
|
||||
"name": "bulbasaur",
|
||||
"url": "http://localhost:8000/api/v2/pokemon-species/1/"
|
||||
},
|
||||
"stats": [
|
||||
{
|
||||
"base_stat": 45,
|
||||
"effort": 0,
|
||||
"stat": {
|
||||
"name": "speed",
|
||||
"url": "http://localhost:8000/api/v2/stat/6/"
|
||||
}
|
||||
}
|
||||
],
|
||||
"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/"
|
||||
"slot": 2,
|
||||
"type": {
|
||||
"name": "poison",
|
||||
"url": "http://localhost:8000/api/v2/type/4/"
|
||||
}
|
||||
}
|
||||
],
|
||||
"weight": "15.2lbs"
|
||||
]
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!--interactive row-->
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="lead center">
|
||||
What is this?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
This is a full RESTful API linked to an extensive database
|
||||
detailing everything about the Pokémon main game series.</p><p>
|
||||
We've covered Pokémon, types, abilities, moves, egg groups and more.
|
||||
</p>
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<p class="lead center">
|
||||
How can I start using the API?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
We have awesome <a href="/docs/">documentation</a> on
|
||||
how to use this API. It takes minutes to get started.
|
||||
</p>
|
||||
<p>
|
||||
This API will always be publicly available and will
|
||||
never require any extensive setup process to consume.
|
||||
</p>
|
||||
|
||||
</div><!--interactive row-->
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-10 center-block">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<p class="lead center">
|
||||
What is this?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
This is a full RESTful API linked to an extensive database
|
||||
detailing everything about the Pokémon main game series.
|
||||
</p>
|
||||
<p>
|
||||
We've covered everything from Pokémon, Berry Flavors.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<p class="lead center">
|
||||
Where do I start?
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>
|
||||
We have awesome <a href="/docsv2/">documentation</a> on
|
||||
how to use this API. It takes minutes to get started.
|
||||
</p>
|
||||
<p>
|
||||
This API will always be publicly available and will
|
||||
never require any extensive setup process to consume.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<p class="lead center">
|
||||
I want to help.
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>Amazing!</p>
|
||||
<p>Head over to <a href="https://github.com/phalt/pokeapi">GitHub</a> and read some of the issues and feature requests. If you can contribute then go ahead and start making pull requests :)</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="lead center">
|
||||
I want to help.
|
||||
</p>
|
||||
<div class="well">
|
||||
<p>Amazing!</p>
|
||||
<p>Head over to <a href="https://github.com/phalt/pokeapi">GitHub</a> and read some of the issues and feature requests. If you can contribute then go ahead and start making pull requests :)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
</div><!-- end bottom -->
|
||||
<script>
|
||||
function update(call){
|
||||
</div><!-- end bottom -->
|
||||
</div><!-- /.container -->
|
||||
|
||||
</section>
|
||||
|
||||
<script>
|
||||
|
||||
function update (call) {
|
||||
|
||||
jQuery('#interactive').val(call);
|
||||
interactive_call();
|
||||
}
|
||||
function interactive_call(){
|
||||
var content = jQuery('#interactive').val()
|
||||
if(content == ''){
|
||||
content = 'pokemon/1/';
|
||||
}
|
||||
var call_url = 'api/v1/' + content;
|
||||
jQuery.ajax({
|
||||
dataType: 'json',
|
||||
url: call_url,
|
||||
context: document.body
|
||||
}).complete(function(data) {
|
||||
if(data['status'] == 200){
|
||||
var d = jQuery.parseJSON(data['responseText']);
|
||||
jQuery('#interactive_name').html(d['name']);
|
||||
jQuery('#interactive_output').text(JSON.stringify(d, null, '\t'));
|
||||
}
|
||||
else if (data['status'] == 404) {
|
||||
jQuery('#interactive_output').text(data['status'] + ' ' + data['statusText']);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</div><!-- /.container -->
|
||||
function interactive_call() {
|
||||
|
||||
var content = jQuery('#interactive').val() || 'pokemon/1/';;
|
||||
|
||||
var call_url = 'api/v2/' + content;
|
||||
|
||||
jQuery.ajax({
|
||||
|
||||
dataType: 'json',
|
||||
url: call_url,
|
||||
context: document.body
|
||||
|
||||
}).complete( function(data) {
|
||||
|
||||
if(data['status'] == 200){
|
||||
|
||||
var d = jQuery.parseJSON(data['responseText']);
|
||||
jQuery('#interactive_name').html(d['name']);
|
||||
jQuery('#interactive_output').text(JSON.stringify(d, null, '\t'));
|
||||
|
||||
} else if (data['status'] == 404) {
|
||||
|
||||
jQuery('#interactive_output').text(data['status'] + ' ' + data['statusText']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% load humanize %}
|
||||
{% block mainbody %}
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/about/">About</a></li>
|
||||
<li><a href="/docs/">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="header col-md-8">
|
||||
<h1>PokeAPI moderation</h1>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!-- /.header row -->
|
||||
<div class="row pad_top">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<ul>
|
||||
<li><a href="/moderate/pokemon/">Pokemon</a></li>
|
||||
<li>Moves</li>
|
||||
<li>Descriptions</li>
|
||||
<li>Games</li>
|
||||
<li>Items</li>
|
||||
<li>Berries</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!--row-->
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
{% endblock %}
|
|
@ -1,55 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% load humanize %}
|
||||
{% block mainbody %}
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/about/">About</a></li>
|
||||
<li><a href="/docs/">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="header col-md-8">
|
||||
<h1>PokeAPI moderation - Pokemon</h1>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!-- /.header row -->
|
||||
<div class="row pad_top">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<ul>
|
||||
{% for p in pokemon %}
|
||||
<li><a href="/moderate/pokemon/{{ p.pkdx_id }}/">{{ p.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!--row-->
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
{% endblock %}
|
|
@ -1,51 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% load humanize %}
|
||||
{% block mainbody %}
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://pokeapi.co" data-text="Pokéapi - the Pokémon RESTful API " data-via="phalt_" data-related="phalt_">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/about/">About</a></li>
|
||||
<li><a href="/docs/">Documentation</a></li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="header col-md-8">
|
||||
<h1>PokeAPI moderation - {{pokemon.name}}</h1>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!-- /.header row -->
|
||||
<div class="row pad_top">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{form.as_p}}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
</div><!--row-->
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
{% endblock %}
|