Skip to content

Commit 0f75ea9

Browse files
authored
Precision added for authentication change
1 parent 93716b9 commit 0f75ea9

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

usage.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ In the netatmo philosophy, both the application itself and the user have to be r
4141

4242
Copy the lnetatmo.py file in your work directory (or use pip install lnetatmo).
4343

44-
Authentication data can be supplied with 4 different methods :
44+
Authentication data can be supplied with 4 different methods (each method override any settings of previous methods) :
4545

4646
1. Some or all values can be hard coded in the library source (and default to empty strings). If you use this method, you are back to the initial suggested method. It would be nice to switch to other methods to isolate credentials and ease library upgrades.
47-
2. Some or all values can be overriden in a ~/.netatmo.credentials file containing the keys in JSON format
47+
2. Some or all values can be overriden in a ~/.netatmo.credentials (in your platform home directory) file containing the keys in JSON format
4848

4949
$ cat .netatmo.credentials # Here all values are defined but it is not mandatory
5050
{
@@ -55,7 +55,7 @@ Authentication data can be supplied with 4 different methods :
5555
}
5656
$
5757

58-
3. Some or all values can be overriden by environment variables. This is the easiest method if your are packaging your application with Docker
58+
3. Some or all values can be overriden by environment variables. This is the easiest method if your are packaging your application with Docker. It also allow you to do some testing with other accounts without touching your current ~/.netatmo.credentials file
5959

6060
$ export USERNAME=newUsername
6161
$ export PASSWORD=password
@@ -64,9 +64,9 @@ Authentication data can be supplied with 4 different methods :
6464

6565
4. Some or all values can be overriden by explicit call to initializer of ClientAuth class
6666

67-
# Example: CLIENT_ID and CLIENT_SECRET supposed to be defined by one of the previous methods
68-
authData = lnetatmo.ClientAuth( username="newUsername",
69-
password="password" )
67+
# Example: USERNAME and PASSWORD supposed to be defined by one of the previous methods
68+
authData = lnetatmo.ClientAuth( clientId="netatmo-client-id",
69+
clientSecret="secret" )
7070

7171
If you provide all the values, using any method or mix except 4, you can test that everything is working properly by simply running the package as a standalone program.
7272

@@ -79,6 +79,8 @@ $ echo $?
7979
0
8080
```
8181

82+
Whatever is your choice for the library authentication setup, your application code if you were using previous library version, will not be affected.
83+
8284

8385
### 3 Package guide ###
8486

0 commit comments

Comments
 (0)