dapnetapisendcall
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| dapnetapisendcall [2018/01/08 12:24] – [Example for python] dh3wr | dapnetapisendcall [2026/01/30 13:06] (aktuell) – Fix urls dj7lc | ||
|---|---|---|---|
| Zeile 3: | Zeile 3: | ||
| ===== Example for curl from linux console ===== | ===== Example for curl from linux console ===== | ||
| - | General example: | + | ===== HAMNET ===== |
| < | < | ||
| - | curl -H " | + | curl -H " |
| </ | </ | ||
| + | ===== INTERNET ===== | ||
| - | Example with real user data (login credentials not working; they have to be replaced by the real ones): | ||
| < | < | ||
| - | curl -H " | + | curl -H " |
| </ | </ | ||
| - | ===== Example for python ===== | ||
| - | For a python example, have a look on the implementation from Philipp DL7FL: | ||
| - | [[https:// | ||
| + | ===== Example for python3 ===== | ||
| + | < | ||
| + | import requests | ||
| + | # HAMNET | ||
| + | url = ' | ||
| + | |||
| + | # INTERNET | ||
| + | #url = ' | ||
| + | |||
| + | headers = {' | ||
| + | |||
| + | data = '{ " | ||
| + | |||
| + | data = data.encode(' | ||
| + | |||
| + | response = requests.post(url, | ||
| + | |||
| + | print(response) | ||
| + | </ | ||
| + | |||
| + | ===== make sure to select the correct DAPNET server ===== | ||
| + | When you are connected to HAMNET (either through the air or via VPN) you can use the HAMNET node http:// | ||
| + | |||
| + | If you're not connected to HAMNET please use the server connected to the public internet http:// | ||
| + | |||
| + | ===== calls to more than one callsign ===== | ||
| + | |||
| + | It is also possible to hand over more than one call sign to the API. The call signs then have to be comma separated and quoted. | ||
| + | |||
| + | < | ||
| + | [" | ||
| + | </ | ||
| + | |||
| + | But be aware: If one call sign fails (not registered, typo), the whole call is discarded. | ||
| + | |||
| + | ===== calls to more than one tx group ===== | ||
| + | |||
| + | The tx groups have to be comma separated and quoted. | ||
| + | |||
| + | < | ||
| + | [" | ||
| + | </ | ||
| + | But be aware: If one group is invalid (does not exist, typo), the whole call is discarded. | ||
dapnetapisendcall.1515414293.txt.gz · Zuletzt geändert: 2018/01/08 12:24 von dh3wr