satnogs-db-api-client: Generate API documentation
Generate API documentation from OpenAPI specification. Also, update outdated Sphinx documentation and include the generated docs. Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>spacecruft
parent
45eb948f57
commit
e2086c72b8
|
@ -76,6 +76,13 @@ api:
|
|||
-g python
|
||||
-o satnogs-db-api-client
|
||||
-c satnogs-db-api-client/openapi-generator-config.json
|
||||
- >-
|
||||
docker-entrypoint.sh
|
||||
generate
|
||||
-i satnogs-db-api-client/api-schema.yml
|
||||
-g html2
|
||||
-o satnogs-db-api-client/html2
|
||||
-c satnogs-db-api-client/openapi-generator-config.json
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
when: always
|
||||
|
@ -105,6 +112,7 @@ docs:
|
|||
before_script:
|
||||
- pip install "$GITLAB_CI_PYPI_TOX"
|
||||
script:
|
||||
- cp -a satnogs-db-api-client/html2 docs/_static/api
|
||||
- rm -rf docs/_build
|
||||
- tox -e "docs"
|
||||
artifacts:
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
Satellites
|
||||
==========
|
||||
|
||||
The ``satellites`` method of the :doc:`SatNOGS DB API <api>` returns all Satellites currently used for gathering Transmitters data.
|
||||
|
||||
Endpoint
|
||||
--------
|
||||
|
||||
``https://db.satnogs.org/api/satellites/``
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Show a specific satellite using its Norad Cat ID:
|
||||
|
||||
Request::
|
||||
|
||||
/api/satellites/25544/?format=json
|
||||
|
||||
Response::
|
||||
|
||||
{
|
||||
norad_cat_id": 25544,
|
||||
"name": "ISS (ZARYA)"
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
Transmitters
|
||||
============
|
||||
|
||||
The ``transmitters`` method of the :doc:`SatNOGS DB API <api>` returns all Transmitters data.
|
||||
|
||||
Endpoint
|
||||
--------
|
||||
|
||||
``https://db.satnogs.org/api/transmitters/``
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
``mode``
|
||||
*Optional* **string** - Returns only transmitters with matching mode
|
||||
|
||||
``satellite__norad_cat_id``
|
||||
*Optional* **string** - Returns only transmitters for the matching satellite
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Show transmitters of a satellite with a specific Norad Cat ID:
|
||||
|
||||
Request::
|
||||
|
||||
/api/transmitters/?format=json&satellite__norad_cat_id=23439
|
||||
|
||||
Response::
|
||||
|
||||
{
|
||||
"uuid": "ybJ86zjXzQxDReZ5skY56B",
|
||||
"description": "Mode H TLM",
|
||||
"alive": true,
|
||||
"uplink_low": null,
|
||||
"uplink_high": null,
|
||||
"downlink_low": 29352000,
|
||||
"downlink_high": null,
|
||||
"mode": "",
|
||||
"invert": true,
|
||||
"baud": 0,
|
||||
"norad_cat_id": 23439
|
||||
}
|
||||
|
||||
Show transmitters of a specific mode:
|
||||
|
||||
Request::
|
||||
|
||||
/api/transmitters/?format=json&mode=AFSK
|
||||
|
||||
Response::
|
||||
|
||||
{
|
||||
"uuid": "4Yp5mRhdNPURqAuVn77NMk",
|
||||
"description": "Mode V/V AFSK Packet",
|
||||
"alive": true,
|
||||
"uplink_low": 145990000,
|
||||
"uplink_high": null,
|
||||
"downlink_low": 145800000,
|
||||
"downlink_high": null,
|
||||
"mode": "AFSK",
|
||||
"invert": true,
|
||||
"baud": 0,
|
||||
"norad_cat_id": 25544
|
||||
}
|
24
docs/api.rst
24
docs/api.rst
|
@ -1,18 +1,26 @@
|
|||
API
|
||||
===
|
||||
|
||||
SatNOGS-DB API is a REST API that provides detailed information about Satellites and Transmitters. This document explains how to use the API to retrieve data for your application.
|
||||
SatNOGS DB API is a REST API that provides detailed information about Satellites and Transmitters.
|
||||
This document explains how to use the API to retrieve data for your application.
|
||||
|
||||
|
||||
Using API Data
|
||||
--------------
|
||||
|
||||
API access is public to anyone. No form of authentication is required. All API data are freely distributed under the `CC BY-SA <https://creativecommons.org/licenses/by-sa/4.0/>`_ license.
|
||||
API access is open to anyone.
|
||||
All API data are freely distributed under the `CC BY-SA <https://creativecommons.org/licenses/by-sa/4.0/>`_ license.
|
||||
|
||||
API Methods
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
Python API Client
|
||||
-----------------
|
||||
|
||||
api-satellites
|
||||
api-transmitters
|
||||
A Python client package is automatically generated for each release.
|
||||
The package is named ``satnogs-db-api-client``.
|
||||
This Python client is available in `PyPI <https://pypi.org/project/satnogs-db-api-client/>`_.
|
||||
|
||||
|
||||
API Reference
|
||||
-------------
|
||||
|
||||
`SatNOGS DB API and SDK Documentation <_static/api/index.html>`_ contains a full reference of the API.
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
{
|
||||
"packageName": "satnogsdbapiclient",
|
||||
"projectName": "satnogs-db-api-client",
|
||||
"generateSourceCodeOnly": true
|
||||
"generateSourceCodeOnly": true,
|
||||
"appName": "SatNOGS DB",
|
||||
"appDescription": "SatNOGS DB is a transmitter suggestions and crowd-sourcing app.",
|
||||
"infoUrl": "https://gitlab.com/librespacefoundation/satnogs/satnogs-db",
|
||||
"infoEmail": "dev@satnogs.org",
|
||||
"invokerPackage": "satnogsdbapiclient",
|
||||
"perlModuleName": "satnogsdbapiclient",
|
||||
"phpInvokerPackage": "satnogsdbapiclient",
|
||||
"pythonPackageName": "satnogsdbapiclient",
|
||||
"licenseInfo": "Copyright (C) 2020 Libre Space Foundation <https://libre.space/>",
|
||||
"licenseUrl": "https://www.gnu.org/licenses/agpl-3.0.html"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue