Code Monkey home page Code Monkey logo

fortnite-stats-wrapper's Introduction

Fortnite-Stats-Wrapper

This API wrapper was developed for developers to help simplify retrieving Fortnite user statistics. This wrapper is easy to install, as well as easy to use.

Installing The Wrapper

Installing the wrapper is easy; just install it as a zip file and then place the extracted folder into your code repository/folder. The require line of code.

Before-Hand Requirements

Before using this wrapper, it is required that all three of these node-modules are both called and installed; the url, http, as well as the request modules are required (the request module is the only one that requires an npm install.)

Using The Wrapper To Find Statistics

Once again, this wrapper was developed to be simple to use, so getting it working should not be too much of a hassle. After making sure that all required node-modules are installed, we can call the wrapper and also use it's features.

/* This is the file that will use the wrapper. The 'statistics' folder of 
the wrapper should be in the same directory as this code file!
*/

var fortnite = require("./statistics/fortnite.js");

/* This line of code logs the number of kills of a player depending
on the gamemode, platform etc. PC is the only supported platform 
(as of 3/14/2018.) Since this wrapper uses the API from 
https://fortnite.y3n.co/, you must get an API-Key from their bot.
*/

fortnite.printKills("API-Key", "solo", "pc", "Gisgar3");

// Console Output --> 'Gisgar3 Total Kills (Solo): 122'

List Of Commands

printKills: Print the number of kills.
printMatches: Print the number of played matches.
printLastMatch: Print the date of last match played.
printTotalPlaytime: Print total playtime.
printWins: Print the number of wins.
printTop10: Print the number of 'Top 10' placements.
printTop25: Print the number of 'Top 25' placements.
printDeaths: Print the number of deaths.
printScore: Print total player score.
printWinRate: Print win rate.

Notice

This API-Wrapper uses the API from https://fortnite.y3n.co/; you will need to retrieve an API key from them (you can Direct Message their Discord bot for an instant key.)

fortnite-stats-wrapper's People

Contributors

gisgar3 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

fredrikberg112

fortnite-stats-wrapper's Issues

Add More Platform Statistics

I am going to be working on adding support for numerous platforms other than just PC. This might be present in the next release.

Resolve Statistics To An Object

I am working on making it possible to format the statistics to a variable, instead of making it only log it to the console. This will hopefully be possible soon.

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.