Skip to content

Commit

Permalink
Add MFA support via gmail.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwalter1-quest committed Aug 4, 2021
1 parent 4d4a9e7 commit b99d908
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 7 deletions.
25 changes: 22 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ the License.

## Classes

` class Arlo (username, password) `
` class Arlo (username, password, google_credential_file=None) `

### Class variables

`var AUTH_URL`

`var BASE_URL`

`var TRANSID_PREFIX`

### Methods
Expand Down Expand Up @@ -475,6 +479,15 @@ Returns something like the following: { "userId": "XXX-XXXXXXX", "email":
"countryCode": "US", "tocUpdate": false, "policyUpdate": false, "validEmail":
true, "arlo": true, "dateCreated": 1463975008658 }

` def GetSessionV2(self) `

Returns something like the following: { "userId": "XXX-XXXXXXX", "email":
"jeffreydwalter@gmail.com", "token":
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "paymentId":
"XXXXXXXX", "accountStatus": "registered", "serialNumber": "XXXXXXXXXXXXXX",
"countryCode": "US", "tocUpdate": false, "policyUpdate": false, "validEmail":
true, "arlo": true, "dateCreated": 1463975008658 }

` def GetSmartAlerts(self, camera) `

` def GetSmartFeatures(self) `
Expand All @@ -499,6 +512,8 @@ Wnt9F7D82uN1f4cXXXXX-FMUsWF_6tMBqwn6DpzOaIB7ciJrnr2QJyKewbQouGM6",
"countryCode":"US", "tocUpdate":false, "policyUpdate":false, "validEmail":true
}

` def LoginMFA(self, username, password, google_credential_file) `

` def Logout(self) `

` def Notify(self, basestation, body) `
Expand Down Expand Up @@ -670,7 +685,7 @@ mode: rainbow or rgb.

` def SetNightLightTimerOff(self, basestation, time=0, timediff=300) `

` def SetNightLightTimerOn(self, basestation, time=1628114781, timediff=0) `
` def SetNightLightTimerOn(self, basestation, time=1628115456, timediff=0) `

` def SetOCProfile(self, firstName, lastName, country='United States',
language='en', spam_me=0) `
Expand Down Expand Up @@ -701,7 +716,7 @@ watch the schema that gets sent.

` def SetSleepTimerOff(self, basestation, time=0, timediff=300) `

` def SetSleepTimerOn(self, basestation, time=1628114781, timediff=0) `
` def SetSleepTimerOn(self, basestation, time=1628115456, timediff=0) `

` def SetTempAlertOff(self, basestation) `

Expand Down Expand Up @@ -860,10 +875,12 @@ This is an example of the json you would pass in the body: {

* #### `Arlo`

* `AUTH_URL`
* `AddFriend`
* `AdjustBrightness`
* `AlertNotificationMethods`
* `Arm`
* `BASE_URL`
* `BatchDeleteRecordings`
* `Calendar`
* `CustomMode`
Expand Down Expand Up @@ -911,11 +928,13 @@ This is an example of the json you would pass in the body: {
* `GetServiceLevelV3`
* `GetServiceLevelV4`
* `GetSession`
* `GetSessionV2`
* `GetSmartAlerts`
* `GetSmartFeatures`
* `GetUpdateFeatures`
* `HandleEvents`
* `Login`
* `LoginMFA`
* `Logout`
* `Notify`
* `NotifyAndGetResponse`
Expand Down
44 changes: 41 additions & 3 deletions docs/arlo.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,20 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="arlo.Arlo"><code class="flex name class">
<span>class <span class="ident">Arlo</span></span>
<span>(</span><span>username, password)</span>
<span>(</span><span>username, password, google_credential_file=None)</span>
</code></dt>
<dd>
<div class="desc"></div>
<h3>Class variables</h3>
<dl>
<dt id="arlo.Arlo.AUTH_URL"><code class="name">var <span class="ident">AUTH_URL</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="arlo.Arlo.BASE_URL"><code class="name">var <span class="ident">BASE_URL</span></code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="arlo.Arlo.TRANSID_PREFIX"><code class="name">var <span class="ident">TRANSID_PREFIX</span></code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -903,6 +911,26 @@ <h3>Methods</h3>
"dateCreated": 1463975008658
}</p></div>
</dd>
<dt id="arlo.Arlo.GetSessionV2"><code class="name flex">
<span>def <span class="ident">GetSessionV2</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Returns something like the following:
{
"userId": "XXX-XXXXXXX",
"email": "jeffreydwalter@gmail.com",
"token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"paymentId": "XXXXXXXX",
"accountStatus": "registered",
"serialNumber": "XXXXXXXXXXXXXX",
"countryCode": "US",
"tocUpdate": false,
"policyUpdate": false,
"validEmail": true,
"arlo": true,
"dateCreated": 1463975008658
}</p></div>
</dd>
<dt id="arlo.Arlo.GetSmartAlerts"><code class="name flex">
<span>def <span class="ident">GetSmartAlerts</span></span>(<span>self, camera)</span>
</code></dt>
Expand Down Expand Up @@ -947,6 +975,12 @@ <h3>Methods</h3>
"validEmail":true
}</p></div>
</dd>
<dt id="arlo.Arlo.LoginMFA"><code class="name flex">
<span>def <span class="ident">LoginMFA</span></span>(<span>self, username, password, google_credential_file)</span>
</code></dt>
<dd>
<div class="desc"></div>
</dd>
<dt id="arlo.Arlo.Logout"><code class="name flex">
<span>def <span class="ident">Logout</span></span>(<span>self)</span>
</code></dt>
Expand Down Expand Up @@ -1201,7 +1235,7 @@ <h6 id="_4"></h6>
<div class="desc"></div>
</dd>
<dt id="arlo.Arlo.SetNightLightTimerOn"><code class="name flex">
<span>def <span class="ident">SetNightLightTimerOn</span></span>(<span>self, basestation, time=1628114781, timediff=0)</span>
<span>def <span class="ident">SetNightLightTimerOn</span></span>(<span>self, basestation, time=1628115456, timediff=0)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -1328,7 +1362,7 @@ <h6 id="_4"></h6>
<div class="desc"></div>
</dd>
<dt id="arlo.Arlo.SetSleepTimerOn"><code class="name flex">
<span>def <span class="ident">SetSleepTimerOn</span></span>(<span>self, basestation, time=1628114781, timediff=0)</span>
<span>def <span class="ident">SetSleepTimerOn</span></span>(<span>self, basestation, time=1628115456, timediff=0)</span>
</code></dt>
<dd>
<div class="desc"></div>
Expand Down Expand Up @@ -1592,10 +1626,12 @@ <h1>Index</h1>
<li>
<h4><code><a title="arlo.Arlo" href="#arlo.Arlo">Arlo</a></code></h4>
<ul class="">
<li><code><a title="arlo.Arlo.AUTH_URL" href="#arlo.Arlo.AUTH_URL">AUTH_URL</a></code></li>
<li><code><a title="arlo.Arlo.AddFriend" href="#arlo.Arlo.AddFriend">AddFriend</a></code></li>
<li><code><a title="arlo.Arlo.AdjustBrightness" href="#arlo.Arlo.AdjustBrightness">AdjustBrightness</a></code></li>
<li><code><a title="arlo.Arlo.AlertNotificationMethods" href="#arlo.Arlo.AlertNotificationMethods">AlertNotificationMethods</a></code></li>
<li><code><a title="arlo.Arlo.Arm" href="#arlo.Arlo.Arm">Arm</a></code></li>
<li><code><a title="arlo.Arlo.BASE_URL" href="#arlo.Arlo.BASE_URL">BASE_URL</a></code></li>
<li><code><a title="arlo.Arlo.BatchDeleteRecordings" href="#arlo.Arlo.BatchDeleteRecordings">BatchDeleteRecordings</a></code></li>
<li><code><a title="arlo.Arlo.Calendar" href="#arlo.Arlo.Calendar">Calendar</a></code></li>
<li><code><a title="arlo.Arlo.CustomMode" href="#arlo.Arlo.CustomMode">CustomMode</a></code></li>
Expand Down Expand Up @@ -1643,11 +1679,13 @@ <h4><code><a title="arlo.Arlo" href="#arlo.Arlo">Arlo</a></code></h4>
<li><code><a title="arlo.Arlo.GetServiceLevelV3" href="#arlo.Arlo.GetServiceLevelV3">GetServiceLevelV3</a></code></li>
<li><code><a title="arlo.Arlo.GetServiceLevelV4" href="#arlo.Arlo.GetServiceLevelV4">GetServiceLevelV4</a></code></li>
<li><code><a title="arlo.Arlo.GetSession" href="#arlo.Arlo.GetSession">GetSession</a></code></li>
<li><code><a title="arlo.Arlo.GetSessionV2" href="#arlo.Arlo.GetSessionV2">GetSessionV2</a></code></li>
<li><code><a title="arlo.Arlo.GetSmartAlerts" href="#arlo.Arlo.GetSmartAlerts">GetSmartAlerts</a></code></li>
<li><code><a title="arlo.Arlo.GetSmartFeatures" href="#arlo.Arlo.GetSmartFeatures">GetSmartFeatures</a></code></li>
<li><code><a title="arlo.Arlo.GetUpdateFeatures" href="#arlo.Arlo.GetUpdateFeatures">GetUpdateFeatures</a></code></li>
<li><code><a title="arlo.Arlo.HandleEvents" href="#arlo.Arlo.HandleEvents">HandleEvents</a></code></li>
<li><code><a title="arlo.Arlo.Login" href="#arlo.Arlo.Login">Login</a></code></li>
<li><code><a title="arlo.Arlo.LoginMFA" href="#arlo.Arlo.LoginMFA">LoginMFA</a></code></li>
<li><code><a title="arlo.Arlo.Logout" href="#arlo.Arlo.Logout">Logout</a></code></li>
<li><code><a title="arlo.Arlo.Notify" href="#arlo.Arlo.Notify">Notify</a></code></li>
<li><code><a title="arlo.Arlo.NotifyAndGetResponse" href="#arlo.Arlo.NotifyAndGetResponse">NotifyAndGetResponse</a></code></li>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def readme():
setup(
name='arlo',
py_modules=['arlo', 'request', 'eventstream'],
version='1.2.52',
version='1.2.53',
description='Python Arlo is a library written in Python 2.7/3x ' +
'which exposes the Netgear Arlo cameras via the apis that are consumed by their website.',
long_description=readme(),
Expand Down

0 comments on commit b99d908

Please sign in to comment.