instinct / GameFroot

GameFroot iOS and Bundlenator
www.gamefroot.com
5 stars 0 forks source link

API Calls for Brett #219

Closed marsh0lion closed 12 years ago

marsh0lion commented 12 years ago

The following calls are needed for Robot editor:

done

marsh0lion commented 12 years ago

get list of levels owned by the user - use the get_user_levels API call

marsh0lion commented 12 years ago

save new robot script/save existing script - use the save_script API call

marsh0lion commented 12 years ago

get List of robots on the current level use the robots.getLevelRobots() function call. This returns a list of id's that can be feed to load script to get the actual script (Let me know if you'd like this padded out a little).

InstinctBrett commented 12 years ago

To give the robot editor something to preload into its panel, load the robot editor with this URL: /roboteditor/?initialScript= and use something like JavaScript's encodeURIComponent() function to encode a complete Robot JSON object.

If you wish me to load an existing robot in the database, load this URL:

/roboteditor/?robotID=1234 I will parseInt(robotID,10) it for security.

InstinctBrett commented 12 years ago

If as part of the above you pass an item_id=abcd (string or number) I will pass it back to whatever 'updatedRobot' JS callback the level editor provides.

InstinctBrett commented 12 years ago

@marsh0lion Some of these API commands might need _NOT_LOGGEDIN as a response - if the robot editor tries to request levels owned by a user not logged in.

marsh0lion commented 12 years ago

To get the list of available music use bgMusic.getAvailableBackgroundMusic()

InstinctBrett commented 12 years ago

Moving on hold API calls to new ticket. closing this one.