I would like to...

Getting started

This Sandbox documents and executes RESTful Network API calls. It can be used to test and does not involve a live network. To use it, select a function to test from the buttons above. Then either execute the HTTP requests documented in the sections via your preferred coding tool (including browser or curl); or download the jQuery plugin and jQuery to follow the jQuery examples.
<head>
<script type="text/javascript" src="jquery-1.7.0.js"></script>
<script type="text/javascript" src="jquery.oneapi.js"></script>
</head>

Charge to a mobile user's bill

For in-app billing direct from a browser, Web app or native app. Uses the jQuery plugin to create the charge, and access the response transaction object to determine the transaction status.
var billableItem = 
{"address":"acr:12345", // Mandatory, string - user MSISDN or ACR
"amount":"0.70",// Mandatory, currency - amount to charge
"referenceCode":"myRef",// Mandatory, string - your own transaction reference
"contentName":"Supergame level 2",//optional, string - readable title of content
"description":"New level",}// optional, string - readable description of content
Now you can charge the item to the user's bill:
var myCharge = new $.fn.oneapi.charge(billableItem);
...and you will have a handle on the transaction status and ID. That's it - done!
alert(myCharge.transactionStatus + ' ' + myCharge.transactionID);
Other libraries need to bind to the following HTTP POST and JSON payload -

Get a mobile user's location

Query a user's location by passing their MSISDN or ACR, plus a name label, to the location function.
var userLoc = new $.fn.oneapi.location("12345", "Me");
Further users can be located the same way, make sure to give each a name:
var elvis = new $.fn.oneapi.location("23456", "Elvis");
var jerrylee = new $.fn.oneapi.location("34567", "Jerry Lee");
var johnny = new $.fn.oneapi.location("45678", "Johnny");
You now have a handle on each located user's name, longitude and latitude via the object properties. For example, you can use these to initialise a Google Map showing the user's location relative to other friends, and the pubs nearest to them all.The map is a good example of a Network APIs mashup with Web APIs - and if the service was launched from a smartphone, the primary user's location could be obtained from device GPS.   

Other libraries need to bind to the following HTTP POST and JSON payload -

Send an SMS

Send an SMS from your web application to one or more end users.
var mySMS = $.fn.oneapi.sms('myphonenumber', 'targetphonenumber', 'Hello world');

The initial response will populate the messageURL value of the pointer. This allows you to query the SMS status:
var status = $.fn.oneapi.sms.status(mySMS.messageURL);
/*
Status values returned will be one of:
DeliveredToTerminal
DeliveryUncertain
DeliveryImpossible (try again)
MessageWaiting (queued for delivery)
DeliveredToNetwork
*/
Other libraries need to bind to the following HTTP POST and JSON payload -

Design inspired by Bundler

Fork me on GitHub