Skip to content

Commit

Permalink
Setting Version to 0.9.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lost Carrier committed Jul 19, 2023
1 parent 8d0c499 commit 9220303
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Netatmo Java API (unofficial)

Small adaption of the original [Netatmo Android API][1] that can be used with plain Java (>=v8) instead of Android. Nothing special, but might help you getting started as some parsing and the OAuth2 stuff is already handled (many thanks to those folks at [Apache Oltu][2]!).

Documentation of their API is available at https://dev.netatmo.com/doc/.
Documentation of their API is available at https://dev.netatmo.com/apidocumentation/general.

Installation
--------
Expand All @@ -14,18 +14,19 @@ Now available at Maven Central, so just add the dependency to your ```pom.xml```
<dependency>
<groupId>org.losty.netatmo</groupId>
<artifactId>netatmo-api</artifactId>
<version>0.8.0</version>
<version>0.9.0</version>
</dependency>
[...]
</dependencies>

Usage
--------

You'll get CLIENT_ID and CLIENT_SECRET at https://dev.netatmo.com/dev/createapp.
You'll get CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN and ACCESS_TOKEN at https://dev.netatmo.com/apps/.

NetatmoHttpClient client = new NetatmoHttpClient(CLIENT_ID, CLIENT_SECRET);
client.login(E_MAIL, PASSWORD);
OAuthTokenStore tokenStore = new TransientOAuthTokenStore();
tokenStore.setTokens(REFRESH_TOKEN, ACCESS_TOKEN, 0);
NetatmoHttpClient client = new NetatmoHttpClient(CLIENT_ID, CLIENT_SECRET, tokenStore);

List<String> types = Arrays.asList(Params.TYPE_TEMPERATURE, Params.TYPE_PRESSURE, Params.TYPE_HUMIDITY);
ZonedDateTime dateBegin = ZonedDateTime.parse("2015-09-10T00:00Z");
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.losty.netatmo</groupId>
<artifactId>netatmo-api</artifactId>
<version>0.9.0-SNAPSHOT</version>
<version>0.9.0</version>
<packaging>jar</packaging>

<name>Netatmo API (unofficial)</name>
Expand Down

0 comments on commit 9220303

Please sign in to comment.