Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - New API route - Recent QSO's #3128

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

patrickrb
Copy link
Contributor

@patrickrb patrickrb commented May 29, 2024

Resolves #3127

Added a new route to the API that returns the most recent QSO's.

There are 2 options you can pass in:

  • detailed - defaults to false and returns all the columns if set to true in the request URL
  • limit - defaults to 10 and limits the amount of QSO's returned to provided amount.
  • limit throws an error if a user sets it higher than 100. - This can change, i figured it might be good to put a hard limit to prevent bad actors trying to slog the server down or something
  • returns null if no qso's are found

Example routes:
http://localhost/index.php/api/recent_qsos?limit=5&detailed=true
http://localhost/index.php/api/recent_qsos?limit=1

Standard json return (not detailed)

[
    {
        "COL_CALL": "N0RC",
        "COL_BAND": "20m",
        "COL_FREQ": "14200000",
        "COL_MODE": "SSB",
        "COL_SUBMODE": "USB",
        "COL_NAME": "Reid Crowe",
        "COL_MY_GRIDSQUARE": "EM28NW",
        "COL_COUNTRY": "United States Of America",
        "COL_DXCC": "291",
        "COL_CONTEST_ID": null,
        "COL_FREQ_RX": "0",
        "COL_MY_CITY": "OLATHE",
        "COL_MY_CNTY": "JOHNSON",
        "COL_MY_COUNTRY": "UNITED STATES OF AMERICA",
        "COL_COMMENT": "",
        "COL_DISTANCE": "0",
        "COL_OPERATOR": "KS3CKC",
        "COL_RST_RCVD": "59",
        "COL_RST_SENT": "59",
        "COL_STATION_CALLSIGN": "KS3CKC",
        "COL_TIME_OFF": "2024-05-29 19:30:20",
        "COL_TIME_ON": "2024-05-29 19:30:20",
        "COL_TX_PWR": "100"
    }
]

@patrickrb patrickrb changed the title 3127 add api route recent qsos Feature - New API route - Recent QSO's May 29, 2024
@magicbug
Copy link
Owner

Sorry catching up with things 👍🏻

couple of things

  • Might want to be able to either request QSOs based on the logbook slug or the station profile ID
  • Above would need some checks
  • I'd strip out "COL_" :)

@patrickrb
Copy link
Contributor Author

Thanks for the feedback @magicbug, I'll see about getting it updated soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request - API route for returning recent QSO data
2 participants