Comments (7)
the returning json contains html tags. how can i retrieve the correct json result? thank you
from boxrec.
So those are private variables, there should be getters that should be used. Depending on the method you are using, the documentation might help out - https://boxing.github.io/boxrec/classes/boxrec.html
There are examples of each method being used in the E2E test file located here - https://github.com/boxing/boxrec/blob/master/src/boxrec.class.spec.e2e.ts
If the above doesn't help, let me know what method you're using and what parameters.
from boxrec.
Hi, thank you for your fast reply.
This is my code (i've copied it from your examples):
app.get('/byId', function (req, res) {
boxrec.login("user", "pass")
.then(() => {
boxrec.getPersonById(468841)
.then(boxer => {
console.log(boxer);
res.end(boxer.name);
});
})
.catch(error => {res.end("error logging")});
})
Here boxer.name is OK, also boxer.record.win and so on...
But I want to get JSON with all the data for the boxer.
Thank you!
from boxrec.
{ id: 352, name: 'Floyd Mayweather Jr', alias: 'Money / Pretty Boy', record: { draw: 0, loss: 0, win: 50 }, last6: ['win', 'win', 'win', 'win', 'win', 'win'], division: 'welterweight', career: [1996, 2017], residence: { id: 20388, town: 'Las Vegas', region: 'NV', country: 'US' } } });
This is output from your example, but I can't get this result :)
from boxrec.
Your code above looks correct. In the first few versions there was a way to output all the data. I left the examples to show what data can be retrieved but currently there is not a way to output all the data like what you have. I haven't decided if it should be added back in. It's nice to have to show what all data there is, but I removed it because to use the data you still have to access it the same way as a getter.
from boxrec.
OK, I understand, it was my misunderstanding. Thank you very much! You've done great work! Keep it going. If I have time I would like to help with your project!
from boxrec.
No problem. Thanks for the compliments. Any help is appreciated.
from boxrec.
Related Issues (20)
- getDate has weight on some event tables when it has data HOT 1
- Enrollment section
- getSchedule returning null data HOT 4
- Have to manually import Country enum HOT 2
- Duplicates when iterating through a list of global_ids HOT 3
- Cannot get round GDPR error HOT 5
- What's the recommended way to use this with the frontend? HOT 3
- BoxRec schedule page supports media
- BoxRec supports female champions
- Data came in strange format HOT 5
- Add proxy HOT 4
- Example project HOT 10
- Get error when trying to log in HOT 13
- An error when using Quick start example - Uncaught TypeError: $ is not a function HOT 10
- Can't login with provided credentials HOT 17
- Uncaught TypeError TypeError: $ is not a function When trying to get "output" or "links" HOT 17
- BoxRec getEventById breaks when trying to parse table with extra header row HOT 2
- Location is always empty under bouts HOT 1
- Bout location country is missing
- Can't login with credentials HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxrec.