l-robinson / netusageextension

Automatically exported from code.google.com/p/netusageextension
0 stars 0 forks source link

Support for Internode #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Support for Internode would be great.  I've done some digging around in the 
existing NetUsage extension and found the 
following:

1. Username and Password is required.  Service number is also required, but is 
also not likely to be known by the 
user, so can be recovered by a one-time web-service call:

curl -u username:password 
https://customer-webtools-api.internode.on.net/api/v1.5/

Response:

<?xml version="1.0" encoding="UTF-8"?>
<internode>
  <api>
    <services count="1">
      <service type="Personal_ADSL" href="/api/v1.5/SERVICENUMBER">SERVICENUMBER</service>
    </services>
  </api>
</internode>

(SERVICENUMBER) is the value you will need.  I'd recommend you store that in an 
(optional) service number field, so 
that users can type it directly if they know it.

2. Once you have the service number, the usage call looks like this:

curl -u username:password 
https://customer-webtools-api.internode.on.net/api/v1.5/SERVICENUMBER/usage

<?xml version="1.0" encoding="UTF-8"?>
<internode>
  <api>
    <service type="Personal_ADSL" request="usage">SERVICENUMBER</service>
    <traffic name="total" rollover="2010-05-08" plan-interval="Monthly" quota="90000000000" 
unit="bytes">63359957625</traffic>
  </api>
</internode>

Which should be self explanatory...

3. Additional service information can be found here:

curl -u username:password 
https://customer-webtools-api.internode.on.net/api/v1.5/SERVICENUMBER/service

<?xml version="1.0" encoding="UTF-8"?>
<internode>
  <api>
    <service type="Personal_ADSL" request="service">
      <id>SERVICENUMBER</id>
      <username>username@adsl.on.net</username>
      <quota units="bytes">90000000000</quota>
      <plan>HOME-Extreme-90</plan>
      <carrier>Agile</carrier>
      <speed>24 Mbits/sec</speed>
      <usage-rating>down</usage-rating>
      <rollover>2010-05-08</rollover>
      <excess-charged>no</excess-charged>
      <excess-shaped>yes</excess-shaped>
      <excess-restrict-access>no</excess-restrict-access>
      <plan-interval>Monthly</plan-interval>
      <plan-cost units="aud">79.95</plan-cost>
    </service>
  </api>
</internode>

Which gives plan details.

Hopefully, this is enough to allow for an implementation.  I have an Internode 
account and am happy to test alpha/beta 
builds if you let me know how :)

Cheers,

Jamie.

PS:  This looks very promising.  The separation of provides into separate 
modules is a much cleaner way than the 
original code.  Nice work!

Original issue reported on code.google.com by majelbst...@gmail.com on 18 Apr 2010 at 11:09

GoogleCodeExporter commented 9 years ago
By the way, you've almost certainly seen this already if it's a port from the 
original, 
but the attached Javascript file contains the code on how to connect to loads 
of 
different ISPs.  It's pulled directly out of the original Net Usage XPI.

Cheers,

Jamie.

Original comment by majelbst...@gmail.com on 19 Apr 2010 at 1:07

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by lukerossrobinson on 19 Apr 2010 at 9:50

GoogleCodeExporter commented 9 years ago
Looks interesting thanks, I plan on doing a pretty large refactor soon so I can 
start 
adding some extra ISP support.  I'll be working through them top to bottom but 
as this 
one already has the xml I need to test with (and many others don't), it'll 
probably 
make it higher in the list.

Original comment by lukerossrobinson on 19 Apr 2010 at 9:58

GoogleCodeExporter commented 9 years ago

Original comment by lukerossrobinson on 17 Jun 2010 at 9:22

GoogleCodeExporter commented 9 years ago

Original comment by lukerossrobinson on 21 Jul 2010 at 7:12

GoogleCodeExporter commented 9 years ago
hooray!  internode net usage support coming soon!  Thanks guys.  :)

Original comment by omega...@gmail.com on 29 Jul 2010 at 11:13