Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eiriksm/user_temp
Make users able to register temperatures for themselves.
https://github.com/eiriksm/user_temp
Last synced: about 2 months ago
JSON representation
Make users able to register temperatures for themselves.
- Host: GitHub
- URL: https://github.com/eiriksm/user_temp
- Owner: eiriksm
- Created: 2015-05-10T17:18:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-26T05:31:01.000Z (over 9 years ago)
- Last Synced: 2024-10-12T01:46:33.977Z (3 months ago)
- Language: PHP
- Size: 168 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# user_temp
[![Build Status](https://travis-ci.org/eiriksm/user_temp.svg)](https://travis-ci.org/eiriksm/user_temp)Make users able to register temperatures for themselves.
This module is an "attachment" to the blog post about the subject, found at [https://orkjern.com/drupal-iot-code-part-2](https://orkjern.com/drupal-iot-code-part-2).
The module creates a new tab on the user page, for all users with the permission to view own temperatures.
From there you can get your API key, and POST temperatures to the endpoint, located at `/user/{uid}/user_temp_post`
The endpoint expects a JSON body formatted like so:
```
{
"temp": "21.6"
}
```Or to put as a CURL command:
```
curl -H "x-user-temp: yourapikey" http://example.com/user/1/user_temp_post -d '{"temp": "21.6"}'
```