This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

API Get help
#1
I'm trying to get some data from an API, I managed to connect to the API and get the result in the log, but I'm having trouble understanding how to add the data to virtual group addresses.

Code:
http = require('socket.http')
ltn12 = require('ltn12')

res, code = http.request({
url = 'https://horsensvej.rokum.ro/api/v1/entries?token=https%3A%2F%2Fhorsensvej.rokum.ro%2F%3Ftoken%3Dknx-2e4b5b25355f26bb',
method = 'GET',
})
log(res, code)

The result I get in log is:
Code:
* arg: 1
  * string: "2023-11-27T21:26:49.676Z"    1701120409676    219    "SingleUp"    "xDrip-LimiTTer"
"2023-11-27T21:21:49.215Z"    1701120109215    207    "SingleUp"    "xDrip-LimiTTer"
"2023-11-27T21:16:47.774Z"    1701119807774    195    "SingleUp"    "xDrip-LimiTTer"
"2023-11-27T21:11:46.145Z"    1701119506145    184    "Flat"    "xDrip-LimiTTer"
"2023-11-27T21:06:44.795Z"    1701119204795    183    "Flat"    "xDrip-LimiTTer"
"2023-11-27T21:01:43.307Z"    1701118903307    183    "SingleUp"    "xDrip-LimiTTer"
"2023-11-27T20:56:42.074Z"    1701118602074    168    "SingleUp"    "xDrip-LimiTTer"
"2023-11-27T20:51:40.281Z"    1701118300281    153    "SingleUp"    "xDrip-LimiTTer"
"2023-11-27T20:46:38.060Z"    1701117998060    139    "SingleUp"    "xDrip-LimiTTer"
"2023-11-27T20:41:37.989Z"    1701117697989    128    "FortyFiveUp"    "xDrip-LimiTTer"
* arg: 2
  * number: 200

What now? I need to get the data sorted or something? 
I would prefer NOT to get the result, but some pointers so I can understand/learn it.
Reply


Messages In This Thread
API Get help - by Novodk - 27.11.2023, 21:45
RE: API Get help - by admin - 28.11.2023, 06:56
RE: API Get help - by Novodk - 29.01.2024, 10:53
RE: API Get help - by admin - 29.01.2024, 10:58
RE: API Get help - by Novodk - 29.01.2024, 12:17
RE: API Get help - by admin - 29.01.2024, 12:54
RE: API Get help - by Novodk - 29.01.2024, 13:37
RE: API Get help - by admin - 29.01.2024, 13:58

Forum Jump: