Football Prediction

FREEMIUM
By boggio | Updated 15日前 | Sports
Popularity

9.9 / 10

Latency

1,606ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Find API Key and Request PHP example?

Rapid account: Leandro Rodeghiero
LeandroRodeghiero
6 years ago

Hi,

Find API Key and Request PHP example?

Thanks

Rapid account: Boggio Analytics
boggio-analytics Commented 6 years ago

Hi Textbook

Iso format is partially correct, you should use - for separator instead of /
e.g predictions?iso_date=2018-06-30

Also you might want to check the error message for hints for example, you should have received the following response following the invalid iso date response:

{
  "data": [],
  "errors": {
    "iso_date": "Invalid format. Must be 'yyyy-mm-dd' (Got 2018\/06\/30 instead)"
  }
}```
Rapid account: Textbook
textbook Commented 6 years ago

Hello,
I did the MEGA subscription and i think i have access to all data including matches in the next 48 hours.
I am having one major problem with the documentation right now, i need to sort the data with the “iso_date” URL parameter, but the documentation is not specific about how the date format should be. Following the ISO 8601 format, the date should be in this form YYYY/MM/DD like today’s date is 2018/07/01 in that format. Please what is the right format for the date, because I have tried the ISO format and it is not working, i even passed the date in UNIX format, still not working?
Thanks.

Rapid account: Boggio Analytics
boggio-analytics Commented 6 years ago

Hi,

The next predictions are shown using the /predictions endpoint.
Note that you only see the matches that start in the next

  • 12 hours (for BASIC account)
  • 36 hours (for PRO)
  • 48 hours for ULTRA and MEGA.

If you have BASIC at the moment there are no games played in the next 12 hours, the first game starts 2018-06-29T15:00:00 London timezone. (15hours from now)

Rapid account: Leandro Rodeghiero
LeandroRodeghiero Commented 6 years ago

Thanks…

I’m not find query list next games, where is?

Att

Rapid account: Boggio Analytics
boggio-analytics Commented 6 years ago

Hi Leandro,

When you go to ‘Documentation’ you should have examples for CURL, JAVA, NODE, PHP etc.
The API Key is also displayed in there (‘X-Mashape-Key’).

For me PHP shows the following example.

// These code snippets use an open-source library. http://unirest.io/php
$response = Unirest\Request::get("https://football-prediction-api.p.mashape.com/api/v1/performance-stats",
  array(
    "X-Mashape-Key" => "my_api_key",
    "Accept" => "application/json"
  )
);

Let me know if this is what you are looking for

Join in the discussion - add comment below:

Login / Signup to post new comments