Git Product home page Git Product logo

mma-api's People

Contributors

valish 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mma-api's Issues

Error at example run

I run these cammands

var mma = require('mma');
var name = process.argv[2] + " " + process.argv[3];
mma.fighter(name, function(data){
console.log(JSON.stringify(data));
});

and I get the following error

/home/user/node_modules/request/index.js:44
throw new Error('undefined is not a valid uri or options object.')
^

Error: undefined is not a valid uri or options object.
at request (/home/user/node_modules/request/index.js:44:11)
at Object.module.exports.getFighter (/home/user/node_modules/sherdog/lib/sherdog/index.js:16:3)
at /home/user/node_modules/mma/lib/mma/index.js:105:13
at Request._callback (/home/user/node_modules/mma/node_modules/google/lib/google.js:85:7)
at Request.self.callback (/home/user/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request. (/home/user/node_modules/request/request.js:1161:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/home/user/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:273:13)

this might be probably a flaw in the API.

Missing record data.

  1. Lorenz Larkin
  2. Rick Story
  3. Colby Covington

have missing record data.

My guess is there will be more missing data. I'll use this issue to log all missing data.

Other Losses is not correct

First thing that pops out when reading the README is that the sample data for Jon Jones is incorrect.
He's got 1 total loss loss but it's not categorized as anything. It should be an "other".

"losses": { "total": 1, "knockouts": 0, "submissions": 0, "decisions": 0, "others": 0 }

The problem is that sherdog-api always returns 0 for that particular field. I've submitted a pull request that fixes the issue

Throw err on req

Hey running this code with your test

var mma = require('mma');
mma.fighter("Jon Jones", function(data) { console.log(data)});

Is returning

home/danielokita/Scripts/mma/node_modules/request/index.js:44
    throw new Error('undefined is not a valid uri or options object.')

Il try and go in and fix it but just letting you know

does not seem to create module mma

After following the steps to install from source code when I run the command:

var mma = require('mma');

the output is: "Error cannot find module 'mma'

all other module seems to be created in the node_modules folder and I can run the sherdog one fine but mma is non existent.

Anyone else experiencing this issue?

TypeError: querystring.escape is not a function

Hey,

I just tried for the first time using your api, but I could not do it correctly.
This is my code in React:

import React from "react";
import mma from "mma";

function App() {
    mma.fighter("Jon Jones", (data: any) => {
      console.log(data);
    });
  return <div className="App">ss</div>;
}

export default App;

When running the app I get the following error:
TypeError: querystring.escape is not a function

Keep in mind, I am using typescript.

Expected behavior when search returns no queries?

Forgive me if this is a dumb question, I am a node noob.

If I query for a fighter and that query returns no links (like query mma.fighter('asdfkjaskdfjaksdjf', function
...), Currently what I get back is a response that shows:

Error: undefined is not a valid uri or options object.
at request (/home/username/github/telegram/proj/node_modules/request/index.js:46:11)
at Object.module.exports.getFighter (/home/username/github/telegram/proj/node_modules/sherdog/lib/sher
dog/index.js:16:3)
at /home/username/github/telegram/proj/node_modules/mma/lib/mma/index.js:105:13
at Request._callback (/home/username/github/telegram/proj/node_modules/google/lib/google.js:85:7)
at Request.self.callback (/home/username/github/telegram/proj/node_modules/request/request.js:187:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/home/username/github/telegram/proj/node_modules/request/request.js:1044:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)

I'm just not sure if this is the expected behavior or not. Thanks :)

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.