Coder Social home page Coder Social logo

fortnite-api-wrapper's People

Contributors

jake-ruston avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fortnite-api-wrapper's Issues

403 Forbidden

getting 403 forbidden when trying to get info from api

.get is not a function

const FortniteAPI = require('fortnite');
const Fortnite = new FortniteAPI('key');

Fortnite.get('user', 'pc').then(console.log);

Fortnite.get is not a function

We'd love to merge!

Hey there, I'm from @F0rtnite and we'd love to have your package under the community name! Of course, you would still have push access and such but it would be viewed more. Let me know if you are interested!

SyntaxError: Unexpected token (

My script:

const fortnite = require('fortnite');

fortnite('NickCannonn', 'pc').then((data) => {
    console.log(data);
});

Error:

/Users/Meldiron/Desktop/fornite/node_modules/fortnite/src/Client.js:14
  return new Promise(async (resolve, reject) => {
                           ^
SyntaxError: Unexpected token (
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/Meldiron/Desktop/fornite/node_modules/fortnite/index.js:1:80)

NodeJS version: v6.10.3
NPM version: 5.5.1
Fornite (your library) version: ^2.0.1

Error

                                return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
                                                           ^
FetchError: invalid json response body at https://api.fortnitetracker.com/v1/profile/platform%20[pc,%20xbl,%20psn]/ninja reason: Unexpected token < in JSON at position 1
    at /home/mrtuxa/Documents/fortnite/node_modules/node-fetch/lib/index.js:273:32
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Client.user (/home/mrtuxa/Documents/fortnite/node_modules/fortnite/src/Client.js:37:18) {
  type: 'invalid-json'
}

Node.js v17.8.0

Accessing Individual Data

Hi, I don't know if this is where I put this message, but I need help. I'm making a Discord bot and I'd love to use your package. But, how do I access the data individually? Could you make the results of "fortnite.user" into a variable and use objects to reference them? For example, "data.stats.solo.kills" could reference the amount of solo kills the given user has. If this is already a thing, please tell me how to reference in my code. If you need further information, please tell me and I'll get you anything you need to know.

Update the URL to use v2

Since fortnite tracker has stopped the support for v1 stats can you please update the URL to v2 and update the package.
Check fortnite tracker for more info.

Store.forEach is not a function

I'm trying to log the shop
const FNClient = require('fortnite') const fortnite = new FNClient("apikey")

 const Store =  fortnite.store()

        const Embedsz = new Discord.MessageEmbed()
        .setColor('#f47fff')
        
        Store.forEach(el => {
            Embedsz.addField(el.name, stripIndents`**- Rarity:** ${el.rarity}
            **- Price:** ${el.vbucks} V-Bucks
            **- Image:** [Click Me](${el.image})`, true)
        });

It simply says `Store.forEach is not a function

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.