forked from cimlabs/hypermedia-client-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Java library for building clients for XHTML-based hypermedia APIs
License
helaar/hypermedia-client-java
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This code builds on https://github.com/cimlabs/hypermedia-client-java to give a concrete example of how to build a client against https://api.demosteinkjer.no This package contains example-code for DemoSteinkjer Rest-API, to get you starting. You need: java and maven installed How to run: mvn clean install cd target java -jar restapi-generic-client-0.1-SNAPSHOT-executable.jar -u <username> -p <password> -K d6d01d193a0a4b07ac835e9c67f16b8e -f 2014-03-02 -t 2014-03-02 -F application/json Username and password can be obtained from https://demosteinkjer.no The output is the meterreading in jsonformat for meter "d6d01d193a0a4b07ac835e9c67f16b8e", on 2014-03-02. For more possible parameters, see ApiExampleDownloader.java The basis-class is the HypermediaClient, which is a general purpose client, that has methods to click links and submit forms (i.e act as an (xhtml)-browser). This is used by the DownloadMeterReadingClient to order a specific timeseries with readings for a meter or set of meters, depending on given parameters. ApiExampleDownloader is just the main class, with parameter parsing and parameter defaults. It just prints out the data obtained. Feel free to use this as a starting point for your own client.
About
Java library for building clients for XHTML-based hypermedia APIs
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published