This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I'm trying to write an API so someone independent of me could write software for use with my site (created of course with October). The idea being that they would create a game that would take points from a user and spit out funny money (like a slot machine). Only the software will be hosted elsewhere (and called in via iframe), and so it won't fall under the October umbrella. The issue is, how do I take points and give the reward to the right user?
Right now I have two API URI. One gets the user's data (name, point balance, etc.), the other posts the amount points played and money won. The GET API works fine. I'm unsure of the POST API since I don't know how to test it due to this authentication issue.
Bonus Question:
To retrieve data sent via a POST request, do I set it up something like $points = Request::get('points')
?
qspec said:
I'm trying to write an API so someone independent of me could write software for use with my site (created of course with October). The idea being that they would create a game that would take points from a user and spit out funny money (like a slot machine). Only the software will be hosted elsewhere (and called in via iframe), and so it won't fall under the October umbrella. The issue is, how do I take points and give the reward to the right user?
Right now I have two API URI. One gets the user's data (name, point balance, etc.), the other posts the amount points played and money won. The GET API works fine. I'm unsure of the POST API since I don't know how to test it due to this authentication issue.
Bonus Question: To retrieve data sent via a POST request, do I set it up something like
$points = Request::get('points')
?
1-4 of 4