Giter Club home page Giter Club logo

godex's Introduction

godex.js

The godex is a javascript library full of Pokemon Go data.
Note: v1.3.3 and below will break when upgraded to v1.4.1+.
This is due to all get methods being absorbed into get.


Build

Requirements: gulp, gulp-concat, gulp-minify. If you have these installed globally, you're set. If not, run npm install inside the root directory.

To build:

$ cd /path/to/godex
$ gulp

Install

Bower
$ cd your/app/directory
$ bower install godex --save
NPM
$ cd your/app/directory
$ npm install godex --save
Download

Alternatively, download the repo and use the files that way!


Useage

Browser
<script src="/path/to/godex.min.js"></script>

Add script before your other scripts in your HTML. Exports as dex.

Node

var dex = require('godex');


Methods

Variables passed in [] are optional.

dex.get([location], thing)

This is the master fetch function. It will get you anything! You can pass a pokemon id, name, or key to get a pokemon. Alternatively, specify the thing you're looking for to retrieve that as well. You can also use the "all" specifier to retrieve all of whatever it is you're looking for.

// Fetch pokemon
dex.get("Bulbasaur");
dex.get(1);
dex.get("1");
dex.get(001);
dex.get("001");

// Fetch other data
dex.get("type", "bug");
dex.get("move", "Twister");

// Fetch nested data!
dex.get("pokemon.type", "bug");

// Note: nested data only works
// if the subproperty exists!!
dex.appraise(options)

This method returns the IV's of your pokemon!

dex.appraise({
  pokemon: 'Aerodactyl',
  cp: 1495,
  hp: 113,
  dust: 3500,
  powered: true,    // powered up?
  strongAtk: false, // Gym Leader says "x" is
  strongDef: true,  // your poke's best stat,
  strongHP: false   // send that as true.
})

Gym Methods

You can initiate a new gym with var gym = new dex.gym();

gym.add('Bulbasaur')

Adds a pokemon to the gym.

gym.remove('Bulbasaur')

Removes a pokemon from the gym.

gym.types()

Returns all the types for the pokemon in the gym

gym.unmodified()

Returns the types that aren't affected by the gym.

gym.offense(sort)

Returns the offensive capabilities of the gym. sort = true to reverse

gym.defense(sort)

Returns the defensive capabilities of the gym. sort = true to reverse


Contribute

Fork me and open up a pull request, or just shoot me an email - me [at] yayramen.com - I'd love the help!
Version guide:

  • +0.0.1 for patches/minor things
  • +0.1.0 for new feature
  • +1.0.0 for something drastic!

Contributors


Built with godex

  • pogoto - gym information tool

godex's People

Contributors

oldramen avatar xssc avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.