GithubHelp home page GithubHelp logo

allow2 / allow2php Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 1.25 MB

Allow2 PHP SDK for OpenSource Parental Freedom

Home Page: https://Allow2.github.io

License: Other

PHP 100.00%
control children freedom child controls quota parental-control parental parent family composer social-network social gaming time limit limits time-limit

allow2php's Introduction

Allow2php

Join the chat at https://gitter.im/Allow2/Allow2php

pip: https://pypi.org/project/allow2/ composer: https://packagist.org/packages/allow2/allow2php

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

todo: Port https://github.com/Allow2/Allow2node to a PHP library (NOTE: Allow2WP wordpress plugin has an embedded implementation, so we can use that to extract the necessary parts into the library, but then also should have that plugin leverage this library - tease it out)

Oh, and we should build this library to be easy to install via composer, packagist, etc

Curl examples

to get you started:

1. Pairing

First, pair with Allow2 (this is using the username/password method):

curl -H "Content-Type: application/json" -X POST -d '{"user": "ALLOW2_ACCOUNT_EMAIL", "pass":"ALLOW2_ACCOUNT_PASS", "deviceToken": "jJ5GOIaJ028Ywt6K", "name":"Test Device 1" }' https://app.allow2.com:8443/api/pairDevice

this returns a payload with information that you pass back to the app to persist for future use against the service:

{
  "status":"success",
  "pairId":12345,
  "token":"6742b233-de46-4c86-2ac9-7b9e5729f999",
  "name":"Test Device 1",
  "userId": 1234,
  "children":[
    { "id":682, "name":"Bob" },
    { "id":691, "name":"Grace" },
    { "id":1795,"name":"Fred"}
  ]
}

2. Checking and Logging Usage

curl -H "Content-Type: application/json" -X POST -d '{"userId": 1234, "pairToken":"6742b2f3-de46-4c86-8ac9-7b9e532cf999", "deviceToken": "jJ5GOIaJ028Ywt6K", "tz": "Australia/Brisbane", "childId": "682", "activities": [{ "id": 7, "log": true }] }' https://api.allow2.com:9443/serviceapi/check

}

allow2php's People

Contributors

allow2ceo avatar gitter-badger avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.