Testing a gadget which requires the osapi feature on our container we found that when loaded the gadget it makes an RPC call to the container to an RPC registered handler:
osapi._handleGadgetRpcMethod The call is being made from features/osapi/gadgetsrpctransport.js where a comment states: The container is expected to implement * the method osapi._handleGadgetRpcMethod(<JSON-RPC batch>) It *looks* like it is trying to query the container for supported methods. In our case we had not registered or implemented this and we were getting a warning in the browser console. We found a file which does register and implement this method namely features/shindig.container/osapi.js which has a comment: Container-side binding for the gadgetsrpctransport used by osapi. Containers * add services to the client-side osapi implementation by defining them in the osapi * namespace My confusion is around - what services would these be? Our test osapi gadget seems to use the normal JSON-RPC mechanism directly (from the iframe to the gadget server) to make say people.get requests. So - what services might we add to the osapi namespace in the container and can someone point me to an example of such a service? We are using Shindig 2.0 PHP Version. with thanks Justin WyllieEmail: [email protected]
