Giter Club home page Giter Club logo

allow2python's Introduction

Allow2

pip install allow2

refer to https://github.com/Allow2/Allow2.github.io/wiki for more details.

Before the app/device can log any actions or check permissions/etc, you need to first "pair" the device or app:

>>> import allow2 >>> >>> userId, pairId, children = allow2.pair(user, password, deviceToken, deviceName)

The userId and pairId are used for all subsequent requests to the API and will work only while the device/app remains paired, so these values should be persisted.

If the parent that owns that account deletes the pairing, then the userId / pairId credentials will no longer work.

The "children" return value is an array of all current children definitions in that account when it is paired. You can use this to show the parent an interface to nominate the one permanent child who will use this device/app. Alternately, you can present a selector and use the PIN on each account to allow the child to directly select and unlock their account prior to using the device or app.

Then, to record usage and get permissions and blocks/etc, use the following:

>>> import allow2 >>> >>> ???? = allow2.log(userId, pairId, [activityId, ...], childId)

That will.... (TBC)

allow2python's People

Contributors

allow2ceo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

codedchaos

allow2python's Issues

Switch to pair tokens

PairId is deprecated, pair call now returns a token, use that in place of the pairid in check calls.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.