没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > pondskum |
pondskum
|
0 | 0 | 175 |
贡献者 | 讨论 | 代码提交 |
AboutPondskum provides a simple API that allows you to log into your Bigpond account and retrieve your Internet usage data (IUD). Why not use the website? I wanted something simple to give me my IUD at a glance by clicking one button.
Bigpond does not expose a webservice with this information (to my knowledge). The API does the painful job of parsing a couple of web pages and returning only the IUD. As such this solution is quite brittle. If the website changes this API will stop working.
Whether I update this API when the bigpond website changes is dependent on a few things such as time as well as contributors.
In the mean time enjoy the API.
RequirementsJDK/JRE 1.6 or greater Linux/Windows A Bigpond Internet account ScreenshotsHere's a sample screenshot of the type of output you can expect:
The Tablet GUI
Progression GUI
Obviously since you have an API you can create any type of interface you like in front of it.
ConfigurationAll that needs to be configured is the bigpond_config.properties file with your user details. A sample configuration file is found in the etc directory, named bigpond_config.sample. Simply rename this file (or make a copy of it to) bigpond_config.properties. Add your username and password and uncomment #log entry to enable logging. Once you have done that head over to the bin directory. Depending on your OS, you can run any executable whose name starts with "run".
Eg. on linux you could run ./runSimpleCMD.sh
There are currently a few front-ends to the API.
A simple commandline (runSimpleCMD) A dialog with a progress bar (runProgression) A table with the usage information (runTablet) An MVC GUI with dialog and trayicon (runMVC) ProblemsHave a look at the logs/ps.log file. See if there are any obvious errors.
Possible causes could be:
A firewall blocking the program. Insufficient privileges to write the log and temp files. APIThe API can be used as such:
BigpondUsageInformation usageInformation = new BigpondConnectorImpl(loadProperties()).connect();Where loadProperties() simply returns a java.util.Properties object with the user information populated. To load a named configuration file as a system property you could use:
new ConfigFileLoaderImpl(new SystemPropertyRetrieverImpl()).loadProperties("your_sys_property_name");The names of the properties required can be found in the bigpond_config.properties file.
If you are happy with the defaults you can use:
ClientBuilder builder = new ClientBuilder();
BigpondUsageInformation usageInformation = new BigpondConnectorImpl(builder.getConfig()).connect();For further examples on usage see the SimpleCMD and TabletRunner classes.
Connecting to Bigpond to test the API can be cumbersome. I've created 2 builder classes StubbyBigpondUsageInformationBuilder and StubbyNewMonthBigpondUsageInformationBuilder to build 2 stub versions of the API which returns canned data.They each return a BigpondUsageInformation implement when the build() method is called.
The API returns the following information:
public interface BigpondUsageInformation {
BigpondAccountInformation getAccountInformation();
List getMonthlyUsageList();
BigpondUsage getTotalUsage();
}public interface BigpondAccountInformation {
String getAccountName();
String getAccountNumber();
String getCurrentPlan();
String getMonthlyAllowance();
String getMonthlyPlanFee();
}public interface BigpondMonthlyUsage {
String getMonth();
BigpondUsage getBigpondUsage();
}public interface BigpondUsage {
String getDownloadUsage();
String getUploadUsage();
String getTotalUsage();
String getUnmeteredUsage();
}
CodeThe is provided "as is" as per the Apache V2 license.
If you would like to join the project or have some feedback drop me a line.