Update README.md

This commit is contained in:
Simon Nishi McCorkindale 2021-06-04 00:42:25 +08:00
parent 0af0f5e79a
commit ed41b19998

View file

@ -20,30 +20,36 @@ Usage Example
### REST API ### REST API
http://localhost:<port>/api/randint32 http://localhost:<port>/api/devices
< QWR4E002,QWR4E001
http://localhost:<port>/api/randint32?deviceId=QWR4E001
< -1741405968 < -1741405968
http://localhost:<port>/api/randuniform http://localhost:<port>/api/randuniform?deviceId=QWR4E001
< 0.20340009994 < 0.20340009994
http://localhost:<port>/api/randnormal http://localhost:<port>/api/randnormal?deviceId=QWR4E001
< 1.02206840644 < 1.02206840644
http://localhost:<port>/api/randbytes?length=16 http://localhost:<port>/api/randbytes?length=16&deviceId=QWR4E001
< <20><><EFBFBD>E<EFBFBD><45>s_<73>b<EFBFBD><62><EFBFBD><EFBFBD>G<EFBFBD> < <20><><EFBFBD>E<EFBFBD><45>s_<73>b<EFBFBD><62><EFBFBD><EFBFBD>G<EFBFBD>
### REST JSON API ### REST JSON API
http://localhost:<port>/api/json/randint32?length=3 http://localhost:<port>/api/json/randint32?length=3&deviceId=QWR4E001
< {"devices":['QWR4E002|MED100KX8 100 kHz', 'QWR4E001|MED100KX8 100 kHz']}
http://localhost:<port>/api/json/randint32?length=3&deviceId=QWR4E001
< {"server": "<servername>", "type": "string", "format": "int32", "length": 3, "data": [1524492492, -1194151004, 1365408501], "success": "true"} < {"server": "<servername>", "type": "string", "format": "int32", "length": 3, "data": [1524492492, -1194151004, 1365408501], "success": "true"}
http://localhost:<port>/api/json/randuniform?length=2 http://localhost:<port>/api/json/randuniform?length=2&deviceId=QWR4E001
< {"server": "<servername>", "type": "string", "format": "uniform", "length": 2, "data": [0.07230273403292031, 0.733570206706375], "success": "true"} < {"server": "<servername>", "type": "string", "format": "uniform", "length": 2, "data": [0.07230273403292031, 0.733570206706375], "success": "true"}
http://localhost:<port>/api/json/randnormal?length=1 http://localhost:<port>/api/json/randnormal?length=1&deviceId=QWR4E001
< {"server": "<servername>", "type": "string", "format": "normal", "length": 1, "data": [0.6430985466029758], "success": "true"} < {"server": "<servername>", "type": "string", "format": "normal", "length": 1, "data": [0.6430985466029758], "success": "true"}
http://localhost:<port>/api/json/randhex?length=2&size=5 http://localhost:<port>/api/json/randhex?length=2&size=5&deviceId=QWR4E001
< {"server": "<servername>", "type": "string", "format": "hex", "length": 2, "size": 5, "data": ["b90e1b01bc", "b59374fc0e"], "success": "true"} < {"server": "<servername>", "type": "string", "format": "hex", "length": 2, "size": 5, "data": ["b90e1b01bc", "b59374fc0e"], "success": "true"}
### WebSocket API ### WebSocket API
@ -98,6 +104,7 @@ License
Copyright (c) 2020 Andika Wasisto Copyright (c) 2020 Andika Wasisto
Modified by Tobias Raayoni Last / Randonauts Co. Modified by Tobias Raayoni Last / Randonauts Co.
Modified by soliax / fp2.dev
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal