add the api for rps.js