Compare commits
19 commits
issue-50-u
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a6b52804e | ||
|
|
96d1685a41 | ||
|
|
2b820602e4 | ||
|
|
30bff79e17 | ||
|
|
7d97b17e8b | ||
|
|
ffc0e7c72e | ||
|
|
658236e4ea | ||
|
|
30cf3a8891 | ||
|
|
6a64b40038 | ||
|
|
add1bd9242 | ||
|
|
628bb91e9a | ||
|
|
3ada13e6f9 | ||
|
|
67d3176588 | ||
|
|
f9ed8381c1 | ||
|
|
2f8e67aa61 | ||
|
|
47d2ddb964 | ||
|
|
47837d08b4 | ||
|
|
2f8db6bc91 | ||
|
|
27db9847df |
8 changed files with 23 additions and 22 deletions
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
with:
|
||||
ruby-version: ${{ env.ruby-version }}
|
||||
|
||||
- uses: actions/cache@v2
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
|
||||
|
|
|
|||
4
Gemfile
4
Gemfile
|
|
@ -7,8 +7,8 @@ gem 'middleman', '~> 4.5.0'
|
|||
gem 'middleman-autoprefixer', '~> 3.0.0'
|
||||
gem 'middleman-sprockets', '~> 4.1.1'
|
||||
gem 'middleman-syntax', '~> 3.2.0'
|
||||
gem 'nokogiri', '~> 1.16.5'
|
||||
gem 'rack', '~> 2.2.8'
|
||||
gem 'nokogiri', '~> 1.18.8'
|
||||
gem 'rack', '~> 2.2.13'
|
||||
gem 'redcarpet', '~> 3.6.0'
|
||||
gem 'rouge', '~> 3.30.0'
|
||||
|
||||
|
|
|
|||
16
Gemfile.lock
16
Gemfile.lock
|
|
@ -79,9 +79,9 @@ GEM
|
|||
middleman-syntax (3.2.0)
|
||||
middleman-core (>= 3.2)
|
||||
rouge (~> 3.2)
|
||||
mini_portile2 (2.8.6)
|
||||
mini_portile2 (2.8.8)
|
||||
minitest (5.20.0)
|
||||
nokogiri (1.16.5)
|
||||
nokogiri (1.18.8)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
padrino-helpers (0.15.3)
|
||||
|
|
@ -92,14 +92,13 @@ GEM
|
|||
parallel (1.23.0)
|
||||
parslet (2.0.0)
|
||||
public_suffix (5.0.3)
|
||||
racc (1.7.3)
|
||||
rack (2.2.8.1)
|
||||
racc (1.8.1)
|
||||
rack (2.2.13)
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.6.0)
|
||||
rexml (3.3.6)
|
||||
strscan
|
||||
rexml (3.3.9)
|
||||
rouge (3.30.0)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
|
|
@ -107,7 +106,6 @@ GEM
|
|||
sprockets (4.0.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
strscan (3.1.0)
|
||||
temple (0.10.3)
|
||||
thor (1.2.2)
|
||||
tilt (2.0.11)
|
||||
|
|
@ -129,8 +127,8 @@ DEPENDENCIES
|
|||
middleman-autoprefixer (~> 3.0.0)
|
||||
middleman-sprockets (~> 4.1.1)
|
||||
middleman-syntax (~> 3.2.0)
|
||||
nokogiri (~> 1.16.5)
|
||||
rack (~> 2.2.8)
|
||||
nokogiri (~> 1.18.8)
|
||||
rack (~> 2.2.13)
|
||||
redcarpet (~> 3.6.0)
|
||||
rouge (~> 3.30.0)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ Error Code | Meaning
|
|||
403 | Forbidden -- This action is not permitted.
|
||||
404 | Not Found -- The specified record could not be found.
|
||||
406 | Not Acceptable -- You requested a format that we don't serve.
|
||||
422 | Unprocessable Entity -- You've sent data we can't accept/understand. Is the value field (string/number) missing?
|
||||
429 | Too Many Requests -- You're sending or requesting data too quickly! Slow down!
|
||||
500 | Internal Server Error -- We had a problem with our server. Try again later.
|
||||
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
|
||||
|
|
|
|||
|
|
@ -88,4 +88,4 @@ atob("eyJzb21ldGhpbmciOiJoZXJlIn0=")
|
|||
```
|
||||
<% end %>
|
||||
|
||||
This solution is also ideal if you want to store or send binary data with Adafruit IO. You won't get to see any pretty charts, but your data will remain exactly the way you left it.
|
||||
This solution is also ideal if you want to store or send binary data with Adafruit IO. You won't get to see any pretty charts (although we do display base64 encoded images), but your data will remain exactly the way you left it.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ You can create, read, update, or delete data records. Every **CREATE**, **UPDATE
|
|||
|
||||
Data points belong to feeds, so every Data API call starts with a Feed URL.
|
||||
|
||||
|
||||
Note that there are endpoints for submitting multiple data points to a feed, and multiple feed values to a group, see **feeds/{feed_key}/batch** and **groups/{groupname}/data** endpoints.
|
||||
|
||||
## Create Data
|
||||
|
||||
|
|
@ -14,8 +14,8 @@ Data points belong to feeds, so every Data API call starts with a Feed URL.
|
|||
> <div class="http"><span class="method-post">POST</span><code class="path">/api/v2/{username}/feeds/{feed_key}/data</code></div>
|
||||
|
||||
```shell
|
||||
# Send new data with a value of 42
|
||||
$ curl -F 'value=42' -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/feeds/{feed_key}/data
|
||||
# Send new data with a value of 42 (note: using single quotes instead prevents variable expansion etc in bash)
|
||||
$ curl -F "value=42" -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/feeds/{feed_key}/data
|
||||
|
||||
# Send new data with a value of 42 and include optional location metadata
|
||||
curl -H "Content-Type: application/json" -d '{"value": 42, "lat": 23.1, "lon": "-73.3"}' -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/feeds/{feed_key}/data
|
||||
|
|
@ -76,7 +76,7 @@ feed_key | string | true | a valid feed key
|
|||
|
||||
Parameter | Type | Required | Description
|
||||
--------- | ------- | --------- | -----------------------
|
||||
datum | object | true | Data record including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
|
||||
<b>Request Body</b> | object | true | Data record (datum) including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
|
||||
|
||||
|
||||
|
||||
|
|
@ -562,7 +562,7 @@ id | string | true |
|
|||
|
||||
Parameter | Type | Required | Description
|
||||
--------- | ------- | --------- | -----------------------
|
||||
datum | object | true | Data record including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
|
||||
<b>Request Body</b> | object | true | Data record (datum) including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
|
||||
|
||||
|
||||
|
||||
|
|
@ -655,8 +655,8 @@ Example for `group_feed_data` in the body is as follows: `{ feeds: [ { key: stri
|
|||
> <div class="http"><span class="method-get">GET</span><code class="path">/api/v2/{username}/groups/{group_key}/feeds/{feed_key}/data</code></div>
|
||||
|
||||
```shell
|
||||
# Send new data with a value of 42 to the group's feeds as json
|
||||
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/groups/{group_key}/data.json -d '{"feeds":[{"key":"{feed_key}","value":42}]}'
|
||||
# Get data from the given Feed in the given Group
|
||||
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/groups/{group_key}/feeds/{feed_key}/data
|
||||
```
|
||||
|
||||
```python
|
||||
|
|
@ -724,7 +724,7 @@ feed_key | string | true | a valid feed key
|
|||
|
||||
Parameter | Type | Required | Description
|
||||
--------- | ------- | --------- | -----------------------
|
||||
datum | object | true | Data record including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
|
||||
<b>Request Body</b> | object | true | Data record (datum) including a `value` field (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
|
||||
|
||||
|
||||
|
||||
|
|
@ -767,4 +767,3 @@ feed_key | string | true | a valid feed key
|
|||
Parameter | Type | Required | Description
|
||||
--------- | ------- | --------- | -----------------------
|
||||
data | array | true | A collection of data records including `value` (required) and optionally including: `lat`, `lon`, `ele` (latitude, longitude, and elevation values), and `created_at` (a date/time string).
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ You will need to create one feed for each unique source of data you send to Adaf
|
|||
|
||||
You can create, read, update, or delete feeds. Every **CREATE**, **UPDATE**, or **DELETE** action on a feed record counts against your rate limit.
|
||||
|
||||
There are also endpoints for submitting multiple data points to a feed, or multiple feed values to a group, see **feeds/{feed_key}/batch** and **groups/{groupname}/data** endpoints.
|
||||
|
||||
## All Feeds
|
||||
|
||||
> HTTP Request
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ For example, if you are building a weather station, you would add feeds for `hum
|
|||
|
||||
You can create, read, update, or delete group records. Every **CREATE**, **UPDATE**, or **DELETE** action on a group record counts against your rate limit.
|
||||
|
||||
There is also an endpoint for submitting multiple feed values to a group, see the **groups/{groupname}/data** endpoint.
|
||||
|
||||
## Get All Groups
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue