dajk / hltv-api

DEPRECATED: An unofficial JSON api for popular CS:GO website hltv.org. Check available methods on https://hltv-api.vercel.app/
http://npm.im/hltv-api
MIT License
277 stars 59 forks source link

Get matches not Working i guess #13

Closed sampad789 closed 5 years ago

sampad789 commented 5 years ago

hi , i am trying to use this api for school project but the get matches feature is just giving an empty array as response , i'll post the picture below .!! let me know if i'm doing something wrong .

image

image

api/match is my own defined path so nvm on that !!!

dajk commented 5 years ago

Hi @sampad789 , thanks for opening the issue. I will check that this week.

dajk commented 5 years ago

Hi again!

After quick checking I can notice couple of mistakes, so req.params object has the param from url (which is in your case matchId), so instead, you should define as following:

const {matchId} = req.params;

And the url has to be the full url path from hltv.org, which is what is wildcard (*) for. For example in your case this would be: localhost:8000/matches/2330203/euronics-vs-valiance-united-masters-league