famictech2000

I can not get any feeds for past information, keeps telling me that my key is invalid!? But I just got one assigned...

Frank

sully

Hey famictech2000 - the key was sitting in pending approval status for way too long. I've just approved it. Remember to post again and let us know what you did with the data when you get to work on this. :)
I'm the Senior Director of Technology for the Canadian Football League. Got technology concerns/ideas for the league? E-mail me at ssyed@cfl.ca and we'll talk.

famictech2000

Hello Sully,

Thank you for approving my key.

I have a quick question. So I am attempting to use the [filter] feature which works perfectly fine if I do one filter at a time.

I am running into issues with the following:
http://api.cfl.ca/v1/games/2018?filter[event_type_id][eq]=0&filter[week][eq]=1&key=<apiKey>

Which tries to use two filters; and does not work at all, which I don't understand why not!?

What I'm trying to retrieve is a filter with both Week 1 and "Preseason" games...


Another thing I noticed if I just do the filter [week][eq]=1 it only returns 'Regular Season' Week 1 games, and not 'Preseason' games, which I find odd... How would I get those Week 1 and Preseason games only?!


After further testing there is a bug when the event_type_id=0 and any week value (1, 2, or 3).

famictech2000

Hello Sully,

Can you confirm that you are experiencing the same issue I called out?!

Frank

famictech2000

Can someone confirm if this is the same outcome to them!? If so is someone from the CFL API Support team looking into getting this addressed?

Frank

Davan

I, too, am struggling to get multiple parameters in a single request. When I try, it then doesn't recognize my key.

But my coding skills are weak so I'm still assuming it's something I'm doing wrong.  I have one of my developers at work going to look at it shortly.

*edit* I just noticed you were specifically speaking of filters.  I haven't had issues with multiple filters, for example this runs fine: 

http://api.cfl.ca/v1/games/2017?filter[week][eq]=1&filter[team_1][eq]=HAM&key=<MyKey>

sully

Hello Sully,

Thank you for approving my key.

I have a quick question. So I am attempting to use the [filter] feature which works perfectly fine if I do one filter at a time.

I am running into issues with the following:
http://api.cfl.ca/v1/games/2018?filter[event_type_id][eq]=0&filter[week][eq]=1&key=<apiKey>

Which tries to use two filters; and does not work at all, which I don't understand why not!?

What I'm trying to retrieve is a filter with both Week 1 and "Preseason" games...


Another thing I noticed if I just do the filter [week][eq]=1 it only returns 'Regular Season' Week 1 games, and not 'Preseason' games, which I find odd... How would I get those Week 1 and Preseason games only?!


After further testing there is a bug when the event_type_id=0 and any week value (1, 2, or 3).
Unfortunately there's a bug with filter[week] when dealing with preseason weeks. That's because the database that stores all of these values actually stores preseason weeks as negative numbers: Preseason week 1 is stored as week -3, preseason week 2 is stored as week -2, preseason week 3 is stored as week -1. The database was heavily built around ease of data input with considerations of getting that data back out as a secondary concern. I don't have a ready fix for this issue.

In your case I'd just call the following:


And then filter the week with the results you get back.

famictech2000


Hello Sully,

Thanks for the info! I guess I can use the negative integer in the request call, which will return mostly the correct info. Everything is correct with the exception of the 'Week' value; currently it just returns everything as 'Week' = 1

Frank
 


Users Online

106 Guests, 15 Users (16 Spiders, 4 Hidden)

Users active in past 15 minutes:
safetyblitz, GHT120, ExPat, Grover, Corey.the.tiger, Mightygoose, jim43bob, heapbag, ticatbill, FootbalYouBet, alphamale111, Google (AdSense) (11), Google (5)

Most Online Today: 179. Most Online Ever: 489 (Nov 26 2017, 08:38 PM)