Repository navigation
Conversation
|
Thanks for taking the time to put this together, but I've got a few concerns before I'd consider merging it.
If you can open a discussion with the use case, rebase onto 73, Peter |
|
This should have been saved as draft, not submitted. I'll finish up the PR and your concerns. |
|
1 & 2. Think I covered this in the updated description. As far as wavelog, wasn't initially for wavelog compatibility, but did end up being similar to their API endpoint of the same name. |
|
Thanks for sorting those so quickly, and for the background on cloudlog-desktop. Yes please, if you don't mind re-forking under your personal account and opening a fresh PR against 73, Peter |
|
Closing this PR, continuing in #3485 with "edits by maintainers" enabled. |
Add
api/get_contacts_adifendpoint for incremental ADIF exportSummary
Adds
POST /api/get_contacts_adif, which lets an API client download the QSOs of one station location as ADIF using a QSO-ID cursor, so new contacts can be synced without re-downloading the whole logbook.The response includes
exported_qsos,lastfetchedid(pass it asfetchfromidnext time),has_moreand theadifstring.limitdefaults to 5000, maximum 10000.Security
rorrwrights, with an owning user.station_idmust be a station location owned by the key's user. The SQL is scoped by station and owner, so changing the ID or cursor can't reach another user's data. Nonexistent and unauthorized stations return the same 403.Changes
Api.php: newget_contacts_adif()method.Adif_data.php: new scoped query.AdifHelper.php: newgetAdifHeader().Adif_export_request.phpfor request validation.docs/api_get_contacts_adif.md.No schema changes or migrations, and no existing endpoints are modified.
Tests
No unit tests have been included or written.
Active testing live against my own Cloudlog installation at v2.8.19 with no errors.
Inspiration
Developing my own unofficial desktop companion to Cloudlog, kc1mjp/cloudlog-desktop, I wanted to pull down my logbooks from Cloudlog via the API. Among other things, this allows an operator to see worked-before information using an offline local QSO cache. This would be great for the POTA/SOTA operator.
Other than the clunky method I was already using the Backup function of Cloudlog kc1mjp-tools/cloudlogBackup.sh and requires server-side cleanup of backups, I discovered there was still no proper API endpoint pulling down QSOs.
What I did find was Wavelog had implemented just the endpoint I was looking for, but I've already standardized on Cloudlog. So to scratch another itch, I implemented it here for Cloudlog.
Limitations
The cursor only detects newly added QSOs, not edits or deletions, though re-download of entire logbook is supported. Stations shared through a shared logbook are not exportable.