circlecube / ussoccermnt-theme

WordPress Theme for https://circlecube.com/usmnt
https://circlecube.com/usmnt
GNU General Public License v3.0
1 stars 1 forks source link

JSON Endpoints? #1

Open manbeardave opened 7 years ago

manbeardave commented 7 years ago

Evan - just saw in the news last week that an agency in London built an Amazon Alexa skill for Arsenal... I want to do the same for the USMNT, answering these questions for now:

"Whens the next game [for usmnt]?" "its dd-mm-yy at XX:YY PM, in [Stadium, City] against [Opponent]" "What was the last starting XI?" "Who has the most caps this year?" "Who has the most goals this year?"

So on and so forth, but just those questions to start.

I think your database is perfect to support the questions, but I would need to be able to get an XML or JSON response back from something. I was thinking about just throwing up a quick restful Rails API on heroku... would you mind if I used your data there? Also, where do you get your data? I would probably need an ongoing feed after the initial start.

circlecube commented 7 years ago

Hey @manbeardave, sorry I missed this issue, it must have gotten lost in a flurry. I would be open to extending these api endpoints, sounds fun. I looked for an API with this data earlier, but didn't find one, so I built this site to power one. The data is entered manually, and I usually get it in within a few days. Are you still looking to build this?

circlecube commented 7 years ago

I also wanted to mention that since this is WordPress there are plenty of available endpoints already: https://circlecube.com/usmnt/wp-json/wp/v2/coach https://circlecube.com/usmnt/wp-json/wp/v2/player https://circlecube.com/usmnt/wp-json/wp/v2/match For example, it wouldn't be too complicated to create a few custom endpoints. Let me know.