Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/driebit/mod_ginger_tagger
RFID interactions for Zotonic
https://github.com/driebit/mod_ginger_tagger
Last synced: 2 days ago
JSON representation
RFID interactions for Zotonic
- Host: GitHub
- URL: https://github.com/driebit/mod_ginger_tagger
- Owner: driebit
- License: mit
- Created: 2015-04-20T12:05:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-15T10:57:01.000Z (over 9 years ago)
- Last Synced: 2023-08-03T20:12:03.287Z (over 1 year ago)
- Language: Erlang
- Size: 184 KB
- Stars: 1
- Watchers: 21
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mod_ginger_tagger
=================Ginger module for performing actions as a result of scanning RFID tags.
Usage
-----You need to be authenticated with an OAuth2 client access token to perform API
calls. See [mod_oauth2](https://github.com/driebit/mod_oauth2) on how to obtain
such a token.### Get user RFID
Get user that an RFID belongs to:
```http
GET /rfids/{id} HTTP/1.1
Authorization: Bearer {Client OAuth2 token}
```### Add RFID to user
Attach a RFID to a user. This requires a [user access token](https://github.com/driebit/mod_oauth2#authorization-code-grant):
```http
POST /me/rfids HTTP/1.1
Authorization: Bearer {User OAuth2 token}
Content-Type: application/json
Accept: application/json{
"rfids": [
"AB123456",
"XZ987654"
]
}
```### Report an RFID action
When an RFID tag has been scanned, report that action to the Tagger API. You
can attach any file contents either as a base64-encoded string in a JSON body
or as a multipart/form element.As JSON body:
```http
POST /tagger/actions
Authorization: Bearer {Client OAuth2 token}
Content-Type: application/json
Accept: application/json{
"rfids": [
"ABC12345",
"DEF78901"
],
"attachment": "base64-encoded image contents"
}
```You also override the default object by specifying its id or URI:
```http
POST /tagger/actions
Authorization: Bearer {Client OAuth2 token}
Content-Type: application/json
Accept: application/json{
"rfids": [
"ABC12345"
],
"object_id": "http://yoursite.com/
}
```