oh well nevermind

This commit is contained in:
Zane Adickes 2016-01-04 19:39:50 -05:00
parent f9e528dd38
commit 90a0066f33
27 changed files with 4009 additions and 108 deletions

View file

@ -1,8 +1,8 @@
body{font-family:Lato,Sans-Serif;color:#212121;padding-top:53px}h1,h2,h3,h4,h5,h6{margin-top:0}ul{list-style:none}ul li{padding:0}pre.scroll{max-height:360px;overflow:scroll}.standard-pad{padding-top:40px}.hero{text-align:center;padding-bottom:40px}.center-block{float:none;margin:0 auto}.btn,.input-group-addon{border-radius:0}
html{position:relative}body,html{height:100%}body{font-family:Lato,Sans-Serif;color:#212121}h1,h2,h3,h4,h5,h6{margin-top:0}ul{list-style:none}ul li{padding:0}a{color:#0288d1}pre{max-height:360px;overflow:scroll;border-color:#ccc}td,th{border:1px solid #ccc;padding:10px}code{background-color:#e0f2f1;color:#00695c}.content{float:right;width:80%}.standard-pad{padding-top:40px}.hero{text-align:center;padding-bottom:40px}.hero h1{font-weight:900}.center-block{float:none;margin:0 auto}.btn,.input-group-addon{border-radius:0}
ul[side-nav]{padding:0}ul[side-nav] ul{padding-left:10px}
.pokespinner{height:80px;width:80px;border-radius:50%;border:4px solid #00838f;background-color:#fff;overflow:hidden;position:relative;box-sizing:border-box;-webkit-animation:a 1.5s infinite linear;animation:a 1.5s infinite linear}.pokespinner:after,.pokespinner:before{display:block;content:""}.pokespinner:before{width:100%;height:40px;margin-top:-6px;background-color:#26c6da;border-bottom:4px solid #00838f}.pokespinner:after{width:10px;height:10px;background-color:#fff;position:absolute;top:40px;left:40px;margin:-10px 0 0 -10px;border-radius:50%;border:1px solid #00838f;box-shadow:0 0 0 2px #fff,0 0 0 6px #00838f}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
#contributors .contributor{position:relative;margin-bottom:30px}#contributors .contributor .avatar{width:100%;height:auto}
#docs{padding-top:40px}#docs table{width:100%;margin-bottom:20px}#docs table td,#docs table th{border:1px solid #ccc;padding:10px}#docs section{margin-bottom:60px}#docs h2{font-weight:900}#docs .request{font-size:1.4em;font-weight:300}#docs .models-tag,#docs .response-tag{font-style:italic;margin-bottom:3px;font-weight:300}#docs .models-tag:before,#docs .response-tag:before{display:inline-block;content:"example response"}#docs .models-tag:before{content:"response models"}
header{background-color:#d9d9d9}header .title{font-size:2em;padding-top:6px;display:inline-block;font-weight:900}header .pokenav{float:right;padding:16px 0;margin:0}header .pokenav li{display:inline-block;margin-left:30px;font-size:1.1em}header .pokenav li a{cursor:pointer;color:#212121;font-weight:600}header .pokenav li a:hover{text-decoration:none}
#home .title{font-weight:900}#home .v{font-size:.5em;font-weight:300}#home .try{font-weight:600}#home .request{width:100%;margin-bottom:30px}#home .request .endpoint button{border-right-style:none}#home .json-body{border:1px solid #d9d9d9;padding:20px;min-height:360px;max-height:360px;overflow:scroll}
header{background-color:#00838f;height:53px;color:#fff}header .title{font-size:2em;padding-top:6px;display:inline-block;font-weight:900}header .pokenav{float:right;padding:16px 0;margin:0}header .pokenav li{display:inline-block;margin-left:30px;font-size:1.1em}header .pokenav li a{cursor:pointer;color:#212121;font-weight:600}header .pokenav li a:hover{text-decoration:none}.web-nav{background-color:#212121;width:20%;float:left;position:fixed;left:0;height:100%;z-index:1;padding-top:40px;color:#fff}.web-nav h1{text-align:center;margin-bottom:10px;font-weight:900}.web-nav ul{padding:0;font-size:1.2em;text-align:center;margin:0 auto}.web-nav ul li a{color:#fff;text-decoration:none;padding:6px 0;display:block}.web-nav ul li ul{background-color:#009688;font-size:.9em;padding:10px}.web-nav ul li.active{background-color:#00796b}.web-nav .v1{position:absolute;bottom:20px;left:10%;margin-left:-1%}.web-nav .v1 a{margin:0 auto}
#docs{padding-top:40px}#docs table{width:100%}#docs table th:first-child,#docs table th:last-child,#docs table tr:first-child,#docs table tr:last-child{width:140px}#docs div[markdown] p,#docs div[markdown] pre,#docs div[markdown] table{margin-bottom:30px}#docs div[markdown] h1:first-of-type,#docs div[markdown] pre:first-of-type{display:none}#docs div[markdown] h2,#docs div[markdown] h4{font-weight:900;margin-top:-40px;padding-top:40px}#docs div[markdown] h2:after,#docs div[markdown] h4:after{font-size:14px;font-style:italic;font-weight:500;display:inline-block;content:"\00a0 endpoint";color:#00695c}#docs div[markdown] h3{font-weight:300;color:#00695c}#docs div[markdown] h4{font-weight:500}#docs div[markdown] h4:after{content:"\00a0 model"}#docs div[markdown] h6{display:none}#docs div[markdown] pre{position:relative}#docs div[markdown] pre:before{font-size:12px;font-style:italic;font-weight:300;display:inline-block;content:"example response";position:absolute;top:5px;right:10px;color:#00695c}
#home .title{font-weight:900}#home .v{font-size:.5em;font-weight:300}#home .hero{margin-bottom:40px;background-color:#00838f}#home .try{font-weight:600;margin-bottom:40px}#home .request{width:100%;margin-bottom:30px}#home .request .endpoint button{border-right-style:none}#home .json-body{border:1px solid #d9d9d9;padding:20px;min-height:360px;max-height:360px;overflow:scroll}

View file

@ -0,0 +1,16 @@
/*
AngularJS v1.4.8
(c) 2010-2015 Google, Inc. http://angularjs.org
License: MIT
*/
(function(n,h,p){'use strict';function E(a){var f=[];r(f,h.noop).chars(a);return f.join("")}function g(a,f){var d={},c=a.split(","),b;for(b=0;b<c.length;b++)d[f?h.lowercase(c[b]):c[b]]=!0;return d}function F(a,f){function d(a,b,d,l){b=h.lowercase(b);if(s[b])for(;e.last()&&t[e.last()];)c("",e.last());u[b]&&e.last()==b&&c("",b);(l=v[b]||!!l)||e.push(b);var m={};d.replace(G,function(b,a,f,c,d){m[a]=q(f||c||d||"")});f.start&&f.start(b,m,l)}function c(b,a){var c=0,d;if(a=h.lowercase(a))for(c=e.length-
1;0<=c&&e[c]!=a;c--);if(0<=c){for(d=e.length-1;d>=c;d--)f.end&&f.end(e[d]);e.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,e=[],m=a,l;for(e.last=function(){return e[e.length-1]};a;){l="";k=!0;if(e.last()&&w[e.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+e.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");f.chars&&f.chars(q(b));return""}),c("",e.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",
b)===b&&(f.comment&&f.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(x.test(a)){if(b=a.match(x))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(y))a=a.substring(b[0].length),b[0].replace(y,c),k=!1}else K.test(a)&&((b=a.match(z))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(z,d)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),f.chars&&f.chars(q(l)))}if(a==m)throw L("badparse",a);m=a}c()}function q(a){if(!a)return"";A.innerHTML=
a.replace(/</g,"&lt;");return A.textContent}function B(a){return a.replace(/&/g,"&amp;").replace(M,function(a){var d=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(d-55296)+(a-56320)+65536)+";"}).replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(a,f){var d=!1,c=h.bind(a,a.push);return{start:function(a,k,e){a=h.lowercase(a);!d&&w[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(k,function(d,e){var k=h.lowercase(e),g="img"===a&&"src"===k||
"background"===k;!0!==O[k]||!0===D[k]&&!f(d,g)||(c(" "),c(e),c('="'),c(B(d)),c('"'))}),c(e?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||c(B(a))}}}var L=h.$$minErr("$sanitize"),z=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,y=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^</,J=/^<\//,H=/\x3c!--(.*?)--\x3e/g,x=/<!DOCTYPE([^>]*?)>/i,
I=/<!\[CDATA\[(.*?)]]\x3e/g,M=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N=/([^\#-~| |!])/g,v=g("area,br,col,hr,img,wbr");n=g("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");p=g("rp,rt");var u=h.extend({},p,n),s=h.extend({},n,g("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),t=h.extend({},p,g("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var"));
n=g("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use");var w=g("script,style"),C=h.extend({},v,s,t,u,n),D=g("background,cite,href,longdesc,src,usemap,xlink:href");n=g("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width");
p=g("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",
!0);var O=h.extend({},D,p,n),A=document.createElement("pre");h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(f){var d=[];F(f,r(d,function(c,b){return!/^unsafe/.test(a(c,b))}));return d.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var f=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i;return function(c,b){function k(a){a&&g.push(E(a))}function e(a,
c){g.push("<a ");h.isDefined(b)&&g.push('target="',b,'" ');g.push('href="',a.replace(/"/g,"&quot;"),'">');k(c);g.push("</a>")}if(!c)return c;for(var m,l=c,g=[],n,p;m=l.match(f);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),e(n,m[0].replace(d,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular);
//# sourceMappingURL=angular-sanitize.min.js.map

View file

@ -2,17 +2,18 @@
!function(){"use strict";angular.module("pokeapi-about",["pokeapi-core"])}();
!function(){"use strict";angular.module("pokeapi-contributors",["pokeapi-core"])}();
!function(){"use strict";angular.module("pokeapi-core",["ui.router","jsonFormatter"])}();
!function(){"use strict";angular.module("pokeapi-header",[])}();
!function(){"use strict";angular.module("pokeapi-docs",["pokeapi-core"])}();
!function(){"use strict";angular.module("pokeapi-header",[])}();
!function(){"use strict";angular.module("pokeapi-home",["pokeapi-core"])}();
!function(){"use strict";angular.module("pokeapi-about").config(["$stateProvider",function(t){t.state("about",{url:"/about",templateUrl:"static/pokemon_v2/partials/about.html"})}])}();
!function(){"use strict";angular.module("pokeapi-contributors").config(["$stateProvider",function(t){t.state("contributors",{url:"/contributors",templateUrl:"static/pokemon_v2/partials/contributors.html",controller:"ContributorsController"})}])}();
!function(){"use strict";angular.module("pokeapi-docs").config(["$stateProvider",function(o){o.state("docs",{url:"/documentation",templateUrl:"static/pokemon_v2/partials/docs.html",controller:"DocsController"})}])}();
!function(){"use strict";angular.module("pokeapi-docs").config(["$stateProvider",function(o){o.state("docs",{url:"/documentation",templateUrl:"static/pokemon_v2/partials/docs2.html",controller:"DocsController"})}])}();
!function(){"use strict";angular.module("pokeapi-home").config(["$stateProvider",function(o){o.state("home",{url:"/",templateUrl:"static/pokemon_v2/partials/home.html",controller:"HomeController"})}])}();
"use strict";angular.module("pokeapi-core").factory("APIService",["$http",function(e){var r="api/v2/",t={};return t.getResource=function(t,n){var u=e.get(r+t+n).then(function(e){return e});return u},t}]);
"use strict";angular.module("pokeapi-core").factory("APIService",["$http",function(e){var r="api/v2/",t={};return t.getResource=function(t,n){n&&(n+="/");var u=e.get(r+t+n).then(function(e){return e});return u},t}]);
"use strict";angular.module("pokeapi-core").factory("RepoService",["$http",function(t){var r="http://api.github.com/repos/phalt/pokeapi/",e=r+"contributors",o={};return o.getContributors=function(){var r=t.get(e).then(function(t){return t});return r},o}]);
"use strict";angular.module("pokeapi-core").directive("sideNav",["$window",function(e){return{restrict:"EA",templateUrl:"static/pokemon_v2/partials/side-nav.html",replace:!0,link:function(t){function n(){console.log("scroll")}function r(e){return e.getAttribute("side-nav-title")||e.textContent}t.nav=[];for(var l=null,a=angular.element(document.querySelectorAll("[side-nav-parent], [side-nav-child]")),i=0;i<a.length;i++){var o=a[i];o.hasAttribute("side-nav-parent")?(l={},l.anchorText=r(o),l.children=[],t.nav.push(l)):l.children.push({anchorText:r(o)})}angular.element(e).bind("scroll",n)}}}]);
"use strict";angular.module("pokeapi-header").directive("pokeapiHeader",function(){return{restrict:"A",templateUrl:"static/pokemon_v2/partials/header.html",replace:!0}});
"use strict";angular.module("pokeapi-core").directive("markdown",["$window",function(t){return{restrict:"EA",link:function(t,e){e.html(marked(e.text(),{gfm:!0,sanitize:!0}))}}}]);
"use strict";angular.module("pokeapi-core").directive("sideNav",["$window",function(e){return{restrict:"EA",templateUrl:"static/pokemon_v2/partials/side-nav.html",replace:!0,link:function(n){function t(){console.log("scroll")}function r(e){return e.getAttribute("side-nav-title")||e.textContent}n.nav=[];for(var l=null,a=angular.element(document.querySelectorAll("[side-nav-parent], [side-nav-child]")),i=0;i<a.length;i++){var o=a[i];o.hasAttribute("side-nav-parent")?(l={},l.anchorText=r(o),l.el=o,l.children=[],n.nav.push(l)):l.children.push({anchorText:r(o),el:o})}angular.element(e).bind("scroll",t)},controller:["$scope",function(e){e.anchorize=function(e){return e.replace(" ","").toLowerCase()}}]}}]);
"use strict";angular.module("pokeapi-header").directive("pokeapiHeader",function(){return{restrict:"A",templateUrl:"static/pokemon_v2/partials/header.html",replace:!0,controller:["$rootScope","$scope","$state",function(e,t,r){e.$state=r,t.active=0}]}});
"use strict";angular.module("pokeapi-contributors").controller("ContributorsController",["$scope","RepoService",function(o,t){o.failure=!1,o.contributors=[],t.getContributors().then(function(t){200===t.status?(o.contributors=t.data,console.log(t)):o.failure=!0})}]);
"use strict";angular.module("pokeapi-home").controller("DocsController",[function(){}]);
"use strict";angular.module("pokeapi-home").controller("HomeController",["$scope","APIService",function(e,o){e.loading=!1,e.failure=!1,e.dropdownExpanded=!1,e.endpointIndex=5,e.endpointOptions=["ability/","egg-group/","item/","move/","pokedex/","pokemon-species/","type/"],e.resourceID="1",e.resource=null,e.toggleDropdown=function(){e.dropdownExpanded=!e.dropdownExpanded},e.setEndpoint=function(o){e.endpointIndex=o},e.getResource=function(){e.loading=!0,o.getResource(e.endpointOptions[e.endpointIndex],e.resourceID).then(function(o){200===o.status?e.resource=o.data:e.failure=!0,e.loading=!1})},e.getResource()}]);

File diff suppressed because one or more lines are too long

6
assets/pokemon_v2/js/marked.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -2,7 +2,7 @@
<section id="contributors">
<div class="container">
<div class="container-fluid">
<div class="hero standard-pad">

View file

@ -24,10 +24,8 @@
<p>Calling any api endpoint without a resource id or name will return a paginated list of available resources for that api. By default, a list 'page' will contain up to 20 resources. If you would like to change this just add a 'limit' query param, e.g. limit=60.</p>
<p class="request">GET api/v2/{endpoint}</p>
<p class="response-tag"> (non-named resources)</p>
<pre class="scroll">
<pre class="scroll example-response">
{
"count": 365,
"next": "http://pokeapi.co/api/v2/evolution-chain/?limit=20&offset=20",
@ -38,7 +36,7 @@
}
</pre>
<p class="models-tag"></p>
<h4 class="model-title">APIResourceList</h4>
<table>
<thead>
@ -65,16 +63,14 @@
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>results</td>
<td>I list of non-named api resources</td>
<td>[<a href="#apiresource">APIResource</a>]</td>
</tr>
</tbody>
</table>
<p class="response-tag"> (named resources)</p>
<pre class="scroll">
<pre class="scroll example-response">
{
"count": 248,
"next": "http://pokeapi.co/api/v2/ability/?limit=20&offset=20",
@ -85,8 +81,8 @@
}]
}
</pre>
<p class="models-tag"></p>
<h4 class="model-title">NamedAPIResourceList</h4>
<table>
<thead>
@ -113,7 +109,7 @@
<td>string</td>
</tr>
<tr>
<td>id</td>
<td>results</td>
<td>I list of non-named api resources</td>
<td>[<a href="#namedapiresource">NamedAPIResource</a>]</td>
</tr>
@ -134,9 +130,7 @@
<p class="request">GET api/v2/ability/{id or name}</p>
<p class="response-tag"></p>
<pre class="scroll">
<pre class="scroll example-response">
{
"id": 1,
"name": "stench",
@ -195,7 +189,7 @@
}
</pre>
<p class="models-tag"></p>
<h4 class="model-title">Ability</h4>
<table>
<thead>
@ -211,13 +205,551 @@
<td>The identifier for this ability resource</td>
<td>integer</td>
</tr>
<tr>
<td>name</td>
<td>The name for this ability resource</td>
<td>string</td>
</tr>
<tr>
<td>is_main_series</td>
<td>Whether or not this ability originated in the main series of the video games</td>
<td>boolean</td>
</tr>
<tr>
<td>generation</td>
<td>The generation this ability originated in</td>
<td>NamedAPIResource(Generation)</td>
</tr>
<tr>
<td>names</td>
<td>The name of this ability listed in different languages</td>
<td>[Name]</td>
</tr>
<tr>
<td>effect_entries</td>
<td>The effect of this ability listed in different languages</td>
<td>[VerboseEffect]</td>
</tr>
<tr>
<td>effect_changes</td>
<td>The list of previous effects this ability has had across version groups</td>
<td>[AbilityEffectChange]</td>
</tr>
<tr>
<td>flavor_text_entries</td>
<td>The flavor text of this ability listed in different languages</td>
<td>[AbilityFlavorText]</td>
</tr>
<tr>
<td>pokemon</td>
<td>A list of pokemon that could potentially have this ability</td>
<td>[AbilityPokemon]</td>
</tr>
</tbody>
</table>
<h4 class="model-title">AbilityEffectChange</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>effect_entries</td>
<td>The previous effect of this ability listed in different languages</td>
<td>Effect</td>
</tr>
<tr>
<td>version_group</td>
<td>The version group in which the previous effect of this ability originated</td>
<td>NamedAPIResource (VersionGroup)</td>
</tr>
</tbody>
</table>
<h4 class="model-title">AbilityFlavorText</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>flavor_text</td>
<td>The localized name for an api resource in a specific language</td>
<td>string</td>
</tr>
<tr>
<td>language</td>
<td>The language this name is in</td>
<td>NamedAPIResource (Language)</td>
</tr>
<tr>
<td>version_group</td>
<td>The version group that uses this flavor text</td>
<td>NamedAPIResource (VersionGroup)</td>
</tr>
</tbody>
</table>
<h4 class="model-title">AbilityPokemon</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>is_hidden</td>
<td>Whether or not this a hidden ability for the referenced pokemon</td>
<td>boolean</td>
</tr>
<tr>
<td>slot</td>
<td>Pokemon have 3 ability 'slots' which hold references to possible abilities they could have. This is the slot of this ability for the referenced pokemon.</td>
<td>integer</td>
</tr>
<tr>
<td>pokemon</td>
<td>The pokemon this ability could belong to</td>
<td>NamedAPIResource (Pokemon)</td>
</tr>
</tbody>
</table>
</section>
<section>
<h2 side-nav-parent>Berries</h2>
<p>Berries are small fruits that can provide HP and status condition restoration, stat enhancement, and even damage negation when eaten by pokemon. Check out Bulbapedia for greater detail.</p>
<p class="request">GET api/v2/berry/{id or name}</p>
<pre class="scroll example-response">
{
"id": 1,
"name": "cheri",
"growth_time": 3,
"max_harvest": 5,
"natural_gift_power": 60,
"size": 20,
"smoothness": 25,
"soil_dryness": 15,
"firmness": {
"name": "soft",
"url": "http://localhost:8000/api/v2/berry-firmness/2/"
},
"flavors": [{
"potency": 10,
"flavor": {
"name": "spicy",
"url": "http://localhost:8000/api/v2/berry-flavor/1/"
}
}],
"item": {
"name": "cheri-berry",
"url": "http://localhost:8000/api/v2/item/126/"
},
"natural_gift_type": {
"name": "fire",
"url": "http://localhost:8000/api/v2/type/10/"
}
}
</pre>
<h4 class="model-title">Berry</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>The identifier for this berry resource</td>
<td>integer</td>
</tr>
<tr>
<td>name</td>
<td>The name for this berry resource</td>
<td>string</td>
</tr>
<tr>
<td>growth_time</td>
<td>Time it takes the tree to grow one stage, in hours. Berry trees go through four of these growth stages before they can be picked.</td>
<td>integer</td>
</tr>
<tr>
<td>max_harvest</td>
<td>The maximum number of these berries that can grow on one tree in Generation IV</td>
<td>integer</td>
</tr>
<tr>
<td>natural_gift_power</td>
<td>The power of the move "Natural Gift" when used with this Berry</td>
<td>integer</td>
</tr>
<tr>
<td>size</td>
<td>The size of this Berry, in millimeters</td>
<td>integer</td>
</tr>
<tr>
<td>smootheness</td>
<td>The smoothness of this Berry, used in making Pokéblocks or Poffins</td>
<td>integer</td>
</tr>
<tr>
<td>soil_dryness</td>
<td>The speed at which this Berry dries out the soil as it grows. A higher rate means the soil dries more quickly.</td>
<td>integer</td>
</tr>
<tr>
<td>firmness</td>
<td>The firmness of this berry, used in making Pokéblocks or Poffins</td>
<td>NamedAPIResource (BerryFirmness)</td>
</tr>
<tr>
<td>flavors</td>
<td>A list of references to each flavor a berry can have and the potency of each of those flavors in regard to this berry</td>
<td>[BerryFlavorMap]</td>
</tr>
<tr>
<td>item</td>
<td>Berries are actually items. This is a reference to the item specific data for this berry.</td>
<td>NamedAPIResource (Item)</td>
</tr>
<tr>
<td>natural_gift_type</td>
<td>The Type the move "Natural Gift" has when used with this Berry</td>
<td>NamedAPIResource (Type)</td>
</tr>
</tbody>
</table>
<h4 class="model-title">BerryFlavorMap</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>potency</td>
<td>How powerful the referenced flavor is for this berry</td>
<td>integer</td>
</tr>
<tr>
<td>flavor</td>
<td>The referenced berry flavor</td>
<td>NamedAPIResource (BerryFlavor)</td>
</tr>
</tbody>
</table>
</section>
<section>
<h2 side-nav-child>Berry Firmnesses</h2>
<p>Berry firmness is a fairly extraneous attribute that effects the outcome of Pokéblocks or Poffins. Check out Bulbapedia for greater detail.</p>
<p class="request">GET api/v2/berry-firmness/{id or name}</p>
<pre class="scroll example-response">
{
"id": 1,
"name": "very-soft",
"berries": [{
"name": "pecha",
"url": "http://localhost:8000/api/v2/berry/3/"
}],
"names": [{
"name": "Very Soft",
"language": {
"name": "en",
"url": "http://localhost:8000/api/v2/language/9/"
}
}]
}
</pre>
<h4 class="model-title">BerryFirmness</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>The identifier for this model resource</td>
<td>integer</td>
</tr>
<tr>
<td>name</td>
<td>The name for this berry firmness resource</td>
<td>string</td>
</tr>
<tr>
<td>berries</td>
<td>A list of the berries with this firmness</td>
<td>[NamedAPIResource (Berry)]</td>
</tr>
<tr>
<td>names</td>
<td>The name of this berry firmness listed in different languages</td>
<td>[Name]</td>
</tr>
</tbody>
</table>
</section>
<section>
<h2 side-nav-child>Berry Flavors</h2>
<p>Flavors determine whether a pokemon will benefit or suffer from eating a berry based on their nature. Check out Bulbapedia for greater detail.</p>
<p class="request">GET api/v2/berry-flavor/{id or name}</p>
<pre class="scroll example-response">
{
"id": 1,
"name": "spicy",
"berries": [{
"potency": 10,
"berry": {
"name": "rowap",
"url": "http://localhost:8000/api/v2/berry/64/"
}
}],
"contest_type": {
"name": "cool",
"url": "http://localhost:8000/api/v2/contest-type/1/"
},
"names": [{
"name": "Spicy",
"language": {
"name": "en",
"url": "http://localhost:8000/api/v2/language/9/"
}
}]
}
</pre>
<h4 class="model-title">BerryFlavor</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>The identifier for this berry flavor resource</td>
<td>integer</td>
</tr>
<tr>
<td>name</td>
<td>The name for this berry flavor resource</td>
<td>string</td>
</tr>
<tr>
<td>berries</td>
<td>A list of the berries with this flavor</td>
<td>[FlavorBerryMap]</td>
</tr>
<tr>
<td>contest_type</td>
<td>The contest type that correlates with this berry flavor</td>
<td>NamedAPIResource (ContestType)</td>
</tr>
<tr>
<td>names</td>
<td>The name of this berry flavor listed in different languages</td>
<td>[Name]</td>
</tr>
</tbody>
</table>
<h4 class="model-title">FlavorBerryMap</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>potency</td>
<td>How powerful the referenced flavor is for this berry</td>
<td>integer</td>
</tr>
<tr>
<td>berry</td>
<td>The berry with the referenced flavor</td>
<td>NamedAPIResource (Berry)</td>
</tr>
</tbody>
</table>
</section>
<section>
<h2 side-nav-parent>Characteristics</h2>
<p>Characteristics indicate which stat contains a Pokémon's highest IV. A Pokémon's Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo). Check out Bulbapedia for greater detail.</p>
<p class="request">GET api/v2/characteristic/{id}</p>
<pre class="scroll example-response">
{
"id": 1,
"gene_modulo": 0,
"possible_values": [0, 5, 10, 15, 20, 25, 30],
"highest_stat": {
"name": "hp",
"url": "http://localhost:8000/api/v2/stat/1/"
},
"descriptions": [{
"description": "Loves to eat",
"language": {
"name": "en",
"url": "http://localhost:8000/api/v2/language/9/"
}
}]
}
</pre>
<h4 class="model-title">Characteristic</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>The identifier for this characteristic resource</td>
<td>integer</td>
</tr>
<tr>
<td>gene_modulo_5</td>
<td>The remainder of the highest stat/IV divided by 5</td>
<td>integer</td>
</tr>
<tr>
<td>possible_values</td>
<td>The possible values of the highest stat that would result in a pokemon recieving this characteristic when divided by 5</td>
<td>[integer]</td>
</tr>
<tr>
<td>descriptions</td>
<td>The descriptions of this characteristic listed in different languages</td>
<td>[Description]</td>
</tr>
</tbody>
</table>
</section>
<section>
<h2 side-nav-parent>Contest Types</h2>
<p>Contest types are categories judges used to weigh a pokemons condition in pokemon contests. Check out Bulbapedia for greater detail.</p>
<p class="request">GET api/v2/contest-type/{id or name}</p>
<pre class="scroll example-response">
{
"id": 1,
"name": "cool",
"berry_flavor": {
"name": "spicy",
"url": "http://localhost:8000/api/v2/berry-flavor/1/"
},
"names": [{
"name": "Cool",
"color": "Red",
"language": {
"name": "en",
"url": "http://localhost:8000/api/v2/language/9/"
}
}]
}
</pre>
<h4 class="model-title">ContestType</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>The identifier for this contest type resource</td>
<td>integer</td>
</tr>
<tr>
<td>name</td>
<td>The name for this contest type resource</td>
<td>string</td>
</tr>
<tr>
<td>berry_flavor</td>
<td>The berry flavor that correlates with this contest type</td>
<td>NamedAPIResource (BerryFlavor)</td>
</tr>
<tr>
<td>names</td>
<td>The name of this contest type listed in different languages</td>
<td>[Name]</td>
</tr>
</tbody>
</table>
</section>
<h2 side-nav-parent>Items</h2>
@ -227,6 +759,34 @@
<h2 side-nav-child>Item Categories</h2>
<p>Item categories determine where items will be placed in the players bag.</p>
<h4 class="model-title">Model</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Data Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>The identifier for this model resource</td>
<td>integer</td>
</tr>
</tbody>
</table>
</div>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,25 @@
<section id="docs" class="standard-pad">
<!-- <div class="container"> -->
<div class="row">
<!-- <div class="col-md-2">
<div side-nav></div>
</div> -->
<div class="col-md-11 center-block">
<div markdown ng-include="'static/pokemon_v2/partials/docs.md'"></div>
</div>
<!-- </div> -->
</div>
</div>

View file

@ -1,17 +1,38 @@
<header class="navbar-fixed-top">
<div class="web-nav">
<div class="container">
<span class="title">Pokéapi</span>
<h1>Pokéapi</h1>
<ul>
<li ui-sref-active="active"><a ui-sref="home">Try It</a></li>
<li ui-sref-active="active"><a ui-sref="about">About</a></li>
<li ui-sref-active="active">
<a ui-sref="docs">Documentation</a>
<ul ng-if="$state.includes('docs')">
<li>Resource Lists</li>
<li>Abilities</li>
<li>Berries</li>
<li>Characteristics</li>
<li>Contests</li>
<li>Egg Groups</li>
<li>Encounters</li>
<li>Evolutions</li>
<li>Generations</li>
<li>Genders</li>
<li>Growth Rates</li>
<li></li>
</ul>
</li>
<li ui-sref-active="active"><a ui-sref="contributors">Contributors</a></li>
</ul>
<ul class="pokenav">
<li><a ui-sref="home">Home</a></li>
<li><a ui-sref="about">About</a></li>
<li><a ui-sref="docs">Documentation</a></li>
<li><a ui-sref="contributors">Contributors</a></li>
</ul>
<div class="v1">
<a ui-sref="v1">V1</a>
</div>
</header>
</div>

View file

@ -1,23 +1,25 @@
<section id="home">
<div class="container">
<div class="hero standard-pad">
<h1 class="title">Pokéapi <span class="v">v2</span> </h1>
<h3>The Pokémon RESTful API</h3>
<a ui-sref="v1">Looking for V1?</a>
</div>
<div class="arrow-down"></div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-10 center-block">
<div class="col-xs-11 col-md-10 center-block">
<h2 class="try text-center">Try it out!</h2>
<label class="sr-only" for="apiRequest">API Request</label>
<div class="input-group request">
<div class="input-group-addon">http://pokeapi.co/api/v2/</div>
@ -54,9 +56,9 @@
</div>
</div>
</div>
</div>
</section>

View file

@ -3,13 +3,13 @@
<li ng-repeat="parent in nav">
<a href="#">{{parent.anchorText}}</a>
<a href="#{{anchorize(parent.anchorText)}}">{{parent.anchorText}}</a>
<ul ng-if="parent.children != null">
<li ng-repeat="child in parent.children">
<a href="#">{{child.anchorText}}</a>
<a href="#{{anchorize(child.anchorText)}}">{{child.anchorText}}</a>
</li>

View file

@ -12,6 +12,11 @@ angular.module('pokeapi-core')
service.getResource = function (endpoint, id) {
if (id) {
id = id + '/';
}
var cb = $http
.get(BASE_URL + endpoint + id)
.then(function (response) {

View file

@ -3,6 +3,9 @@
'use strict';
angular.module('pokeapi-core', ['ui.router', 'jsonFormatter']);
angular.module('pokeapi-core', [
'ui.router',
'jsonFormatter'
])
})();

View file

@ -0,0 +1,21 @@
'use strict';
angular.module('pokeapi-core')
.directive('markdown', ['$window', function ($window) {
return {
restrict: 'EA',
link: function (scope, el) {
el.html(marked(el.text(), {
gfm: true,
sanitize: true
}));
}
};
}]);

View file

@ -37,6 +37,7 @@ angular.module('pokeapi-core')
parent = {};
parent.anchorText = getAnchorText(anchor);
parent.el = anchor;
parent.children = [];
scope.nav.push(parent);
@ -44,14 +45,23 @@ angular.module('pokeapi-core')
parent.children.push({
anchorText: getAnchorText(anchor)
anchorText: getAnchorText(anchor),
el: anchor
});
}
}
angular.element($window).bind('scroll', calculate);
}
},
controller: ['$scope', function ($scope) {
$scope.anchorize = function (str) {
return str.replace(' ', '').toLowerCase();
};
}]
};
}]);

View file

@ -1,4 +0,0 @@
$black: #212121;
$test-gray: #D9D9D9;

View file

@ -0,0 +1,14 @@
$test-gray: #D9D9D9;
$border-grey: #CCC;
$black: #212121;
$dark-grey: #424242;
$really-light-teal: #E0F2F1;
$light-teal: #B2DFDB;
$dark-teal: #00838F;
$really-dark-teal: #00695C;
$header-height: 53px;

View file

@ -1,15 +1,25 @@
@import 'colors';
@import 'vars';
html {
height: 100%;
position: relative;
}
body {
height: 100%;
font-family: 'Lato', Sans-Serif;
color: $black;
padding-top: 53px;
// position: relative;
// margin-top: 53px;
}
h1, h2, h3, h4, h5, h6 {
// makes sure anchors stay below the header when traveled to
// margin-top: -$header-height;
// padding-top: $header-height;
margin-top: 0;
}
@ -23,10 +33,33 @@ ul {
}
}
pre.scroll {
a {
color: #0288D1;
}
pre {
max-height: 360px;
overflow: scroll;
border-color: $border-grey;
}
th, td {
border: solid 1px $border-grey;
padding: 10px;
}
code {
background-color: $really-light-teal;
color: $really-dark-teal;
}
.content {
float: right;
width: 80%;
}
.standard-pad {
@ -38,6 +71,12 @@ pre.scroll {
text-align: center;
padding-bottom: 40px;
h1 {
font-weight: 900;
}
// color: #FFF;
}
.center-block {

View file

@ -10,7 +10,7 @@
$stateProvider.state('docs', {
url : '/documentation',
templateUrl : 'static/pokemon_v2/partials/docs.html',
templateUrl : 'static/pokemon_v2/partials/docs2.html',
controller : 'DocsController'
});

View file

@ -1,4 +1,6 @@
@import 'vars';
#docs {
padding-top: 40px;
@ -6,44 +8,95 @@
table {
width: 100%;
margin-bottom: 20px;
th, td {
border: solid 1px #CCC;
padding: 10px;
th, tr {
&:first-child, &:last-child {
width: 140px;
}
}
}
div[markdown] {
p, pre, table {
margin-bottom: 30px;
}
}
section {
h1, pre {
&:first-of-type { display: none; }
}
margin-bottom: 60px;
}
h2, h4 {
h2 {
font-weight: 900;
}
font-weight: 900;
margin-top: -40px;
padding-top: 40px;
.request {
&:after {
font-size: 1.4em;
font-weight: 300;
}
font-size: 14px;
font-style: italic;
font-weight: 500;
display: inline-block;
content: "\00a0 endpoint";
color: $really-dark-teal;
}
}
.response-tag, .models-tag {
font-style: italic;
margin-bottom: 3px;
font-weight: 300;
h3 {
font-weight: 300;
color: $really-dark-teal;
}
&:before {
h4 {
display: inline-block;
content: "example response";
font-weight: 500;
&:after {
content: "\00a0 model";
}
}
}
.models-tag {
h6 { display: none; }
&:before { content: "response models"; }
pre {
position: relative;
&:before {
font-size: 12px;
font-style: italic;
font-weight: 300;
display: inline-block;
content: "example response";
position: absolute;
top: 5px;
right: 10px;
color: $really-dark-teal;
}
}
// .request {
// font-size: 1.4em;
// font-weight: 300;
// }
// .model-title {
// &:after {
// font-size: 14px;
// font-style: italic;
// font-weight: 300;
// display: inline-block;
// content: "\00a0model";
// }
// }
}
}

View file

@ -11,7 +11,13 @@ angular.module('pokeapi-header')
templateUrl: 'static/pokemon_v2/partials/header.html',
replace: true
replace: true,
controller: ['$rootScope','$scope', '$state', function ($rootScope, $scope, $state) {
$rootScope.$state = $state;
$scope.active = 0;
}]
};
});

View file

@ -1,9 +1,11 @@
@import 'colors';
@import 'vars';
header {
background-color: $test-gray;
background-color: $dark-teal;
height: $header-height;
color: #FFF;
.title {
@ -36,3 +38,68 @@ header {
}
}
}
.web-nav {
background-color: $black;
width: 20%;
float: left;
position: fixed;
left: 0;
height: 100%;
z-index: 20;
padding-top: 40px;
color: #FFF;
// box-shadow: 2px 0px #004D40 1;
h1 {
text-align: center;
margin-bottom: 10px;
font-weight: 900;
}
ul {
padding: 0;
font-size: 1.2em;
text-align: center;
margin: 0 auto;
li {
a {
color: #FFF;
text-decoration: none;
padding: 6px 0;
display: block;
}
ul {
background-color: #009688;
font-size: .9em;
padding: 10px;
}
&.active {
background-color: #00796B;
}
}
}
.v1 {
position: absolute;
bottom: 20px;
// margin: 0 auto;
left: 10%;
margin-left: -1%;
a {
margin: 0 auto;
}
}
}

View file

@ -1,5 +1,5 @@
@import 'colors';
@import 'vars';
#home {
@ -12,8 +12,30 @@
font-weight: 300;
}
.hero {
margin-bottom: 40px;
background-color: $dark-teal;
// &:after {
// display: block;
// position: absolute;
// content: " ";
// width: 0;
// height: 0px;
// border-left: 30px solid transparent;
// border-right: 30px solid transparent;
// border-top: 30px solid $dark-teal;
// margin: 40px auto 0;
// left: 50%;
// }
}
.try {
font-weight: 600;
margin-bottom: 40px;
}
.request {

View file

@ -37,8 +37,10 @@
{% endblock mainbody %}
<script src="/static/pokemon_v2/js/marked.min.js"></script>
<script src="/static/pokemon_v2/js/angular.min.js"></script>
<script src="/static/pokemon_v2/js/angular-ui-router.min.js"></script>
<script src="/static/pokemon_v2/js/angular-sanitize.min.js"></script>
<script src="/static/pokemon_v2/js/json-formatter.min.js"></script>
<script src="/static/pokemon_v2/js/app.min.js"></script>

View file

@ -3,8 +3,22 @@
{% block mainbody %}
<div pokeapi-header></div>
<!-- <div pokeapi-header></div> -->
<!-- <div class="container"> -->
<!-- <div class="row"> -->
<ui-view></ui-view>
<div pokeapi-header></div>
<div class="content">
<ui-view></ui-view>
</div>
<!-- </div> -->
<!-- </div> -->
{% endblock %}