dapnetapisendcall
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| dapnetapisendcall [2019/08/11 08:38] – calls to more than one callsign oe7bsh | 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: | + | ===== Example for python3 |
| - | [[https://github.com/DL7FL/DAPNET/blob/master/DAPNET/ | + | |
| + | < | ||
| + | import requests | ||
| + | |||
| + | # HAMNET | ||
| + | url = 'http://dapnet.db0sda.hamnet.radio: | ||
| + | |||
| + | # INTERNET | ||
| + | #url = 'http://hampager.de/api/calls' | ||
| + | |||
| + | headers = {' | ||
| + | |||
| + | data = '{ " | ||
| + | |||
| + | data = data.encode(' | ||
| + | |||
| + | response = requests.post(url, | ||
| + | |||
| + | print(response) | ||
| + | </code> | ||
| + | |||
| + | ===== make sure to select the correct | ||
| + | When you are connected to HAMNET (either through the air or via VPN) you can use the HAMNET node http://www.hampager.de: | ||
| + | |||
| + | If you're not connected to HAMNET please use the server connected to the public internet http://www.hampager.de: | ||
| ===== calls to more than one callsign ===== | ===== 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 . | + | It is also possible to hand over more than one call sign to the API. The call signs then have to be comma separated |
| + | |||
| + | < | ||
| + | [" | ||
| + | </ | ||
| But be aware: If one call sign fails (not registered, typo), the whole call is discarded. | 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.1565512735.txt.gz · Zuletzt geändert: 2019/08/11 08:38 von oe7bsh