API CGS¶
Diccionario¶
Recursos¶
- Frecuencias:
f0: Output 0
f1: Output 1
f2: Output 2
f3: Output 3
Verbos¶
- urls:
- GET: muestra las frecuencias actuales
user@IGP:~$ curl -XGET http://10.10.10.175:8080/frequencies/
Respuesta:
user@IGP:~$ curl -XGET http://10.10.10.175:8080/frequencies/
{"Frequencias": {"f0": 125000000, "f3": 125000000, "f2": 62500000, "f1": 62500000}}
Respuesta con Header:
user@IGP:~$ curl -i -XGET http://10.10.10.175:8080/frequencies/
HTTP/1.0 200 OK
Date: Wed, 28 Jan 2015 21:34:30 GMT
Server: WSGIServer/0.2 CPython/3.4.2
Content-Type: application/json
Content-Length: 83
{"Frequencias": {"f0": 125000000, "f3": 125000000, "f2": 62500000, "f1": 62500000}}
user@IGP:~$
- POST: configura nuevas frecuencias
user@IGP:~$ curl -XPOST -F f0=125000000 -F f1=62500000 -F f2=62500000 -F f3=125000000 http://10.10.10.175:8080/frequencies/
Respuesta:
user@IGP:~$ curl -XPOST -F f0=125000000 -F f1=62500000 -F f2=62500000 -F f3=125000000 http://10.10.10.175:8080/frequencies/
{"Frecuencias": {"f0": 125000000, "f3": 125000000, "f2": 62500000}, "f1":62500000}}
Respuesta con Header:
user@IGP:~$ curl -i -XPOST -F f0=125000000 -F f1=62500000 -F f2=62500000 -F f3=125000000 http://10.10.10.175:8080/frequencies/
HTTP/1.0 200 OK
Date: Wed, 28 Jan 2015 21:35:35 GMT
Server: WSGIServer/0.2 CPython/3.4.2
Content-Type: application/json
Content-Length: 83
{"Frequencias": {"f0": 125000000, "f3": 125000000, "f2": 62500000, "f1": 62500000}}
user@IGP:~$