Aller au fichier
Simon Vieille d64f5ad1cd Merge branch 'release/v1.0.0' 2018-01-16 11:43:58 +01:00
bin Init of propel for SMS database 2018-01-15 13:24:54 +01:00
etc/security User example 2018-01-16 09:16:55 +01:00
src/App Moving routes and functions to controller 2018-01-16 09:14:43 +01:00
var Git ignore for propel 2018-01-15 13:26:33 +01:00
web Moving routes and functions to controller 2018-01-16 09:14:43 +01:00
.gitignore SMS API 2018-01-15 16:36:15 +01:00
Makefile Makefile tasks 2018-01-15 16:37:08 +01:00
README.md Documentation 2018-01-16 11:43:33 +01:00
composer.json Init of propel for SMS database 2018-01-15 13:24:54 +01:00
propel-dist.yaml Init of propel for SMS database 2018-01-15 13:24:54 +01:00

README.md

Automate Android API

Installation

$ git clone https://gitnet.fr/deblan/android-automate-api.git
$ cd android-automate-api
$ make
$ cp propel-dist.yaml propel.yaml # Edit propel.yaml
$ cp etc/security/users.json-dist etc/security/users.json # Edit users.json
$ make propel

API

HTTP Response status

  • 200: Resource found
  • 201: Resource created
  • 204: Resource removed
  • 404: Resource not found
  • 500: Internal error

When a resource is created or deleted, the response will be like:

{
    "status": true|false,
    "code": 200|201|204|404|500,
    "message": "A message"
}

Create a SMS

POST /api/sms/create with MIME media type application/json

Body

{"sender": "+33611223344", "message": "Hello, World!", "time": "1516031177"}

Delete a SMS

DELETE /api/sms/delete/{id}

Get all SMS

GET /api/sms/list

The response contains an collection of SMS:

[
    {
        "id": 1234,
        "sender": "+33611223344",
        "message": "Hello, World!",
        "received_at": 1516031177,
        "notified_at": 1516031179
    },
    ...
]