Skip to content

Commit

Permalink
api docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arihant2math committed Oct 17, 2023
1 parent deb892e commit 545f089
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 10 deletions.
120 changes: 120 additions & 0 deletions source/api/ftc_api.models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,46 @@ ftc\_api.models.barcode\_element module
:undoc-members:
:show-inheritance:

ftc\_api.models.coordinate module
---------------------------------

.. automodule:: ftc_api.models.coordinate
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.coordinate\_equality\_comparer module
-----------------------------------------------------

.. automodule:: ftc_api.models.coordinate_equality_comparer
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.coordinate\_sequence module
-------------------------------------------

.. automodule:: ftc_api.models.coordinate_sequence
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.coordinate\_sequence\_factory module
----------------------------------------------------

.. automodule:: ftc_api.models.coordinate_sequence_factory
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.dimension module
--------------------------------

.. automodule:: ftc_api.models.dimension
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.endgame\_parked\_status module
----------------------------------------------

Expand All @@ -100,6 +140,14 @@ ftc\_api.models.endgame\_parked\_status module
:undoc-members:
:show-inheritance:

ftc\_api.models.envelope module
-------------------------------

.. automodule:: ftc_api.models.envelope
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.event module
----------------------------

Expand Down Expand Up @@ -172,6 +220,30 @@ ftc\_api.models.ftc\_event\_level module
:undoc-members:
:show-inheritance:

ftc\_api.models.geometry module
-------------------------------

.. automodule:: ftc_api.models.geometry
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.geometry\_factory module
----------------------------------------

.. automodule:: ftc_api.models.geometry_factory
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.geometry\_overlay module
----------------------------------------

.. automodule:: ftc_api.models.geometry_overlay
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.get\_v20\_season\_schedule\_event\_code\_tournament\_level\_hybrid\_tournament\_level module
------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -276,6 +348,38 @@ ftc\_api.models.match\_score\_list module
:undoc-members:
:show-inheritance:

ftc\_api.models.nts\_geometry\_services module
----------------------------------------------

.. automodule:: ftc_api.models.nts_geometry_services
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.ogc\_geometry\_type module
------------------------------------------

.. automodule:: ftc_api.models.ogc_geometry_type
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.ordinates module
--------------------------------

.. automodule:: ftc_api.models.ordinates
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.point module
----------------------------

.. automodule:: ftc_api.models.point
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.power\_play\_alliance\_score\_breakdown module
--------------------------------------------------------------

Expand Down Expand Up @@ -308,6 +412,22 @@ ftc\_api.models.power\_play\_single\_team\_score\_details module
:undoc-members:
:show-inheritance:

ftc\_api.models.precision\_model module
---------------------------------------

.. automodule:: ftc_api.models.precision_model
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.precision\_models module
----------------------------------------

.. automodule:: ftc_api.models.precision_models
:members:
:undoc-members:
:show-inheritance:

ftc\_api.models.scheduled\_match module
---------------------------------------

Expand Down
12 changes: 9 additions & 3 deletions source/api/ftc_api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
API Docs
ftc\_api package
================
.. important::
Better api docs, maintained by FIRST, can be found here: https://ftc-events.firstinspires.org/api-docs/index.html

Subpackages
-----------
Expand Down Expand Up @@ -31,6 +29,14 @@ ftc\_api.errors module
:undoc-members:
:show-inheritance:

ftc\_api.types module
---------------------

.. automodule:: ftc_api.types
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
2 changes: 1 addition & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
project = "FTC api"
copyright = "2023, Ashwin Naren"
author = "Ashwin Naren"
release = "0.2.0"
release = "0.4.0"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
12 changes: 6 additions & 6 deletions source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Now call your endpoint and use your models:
client = ftc_api.Client(username="test", authorization_key="****-****-****-****")
my_data = get_v2_0_season.sync(client=client, season=2022)
print(my_data.game_name) # CENTERSTAGE
print(my_data.game_name) # CENTERSTAGE
# or if you need more info (e.g. status_code)
response = get_v2_0_season.sync_detailed(client=client, season=2022)
print(response.headers) # server headers
print(response.content) # raw json
print(response.headers) # server headers
print(response.content) # raw text
Or do the same thing with an async version:

Expand All @@ -41,11 +41,11 @@ Or do the same thing with an async version:
client = ftc_api.Client(username="your username here", authorization_key="****-****-****-****")
my_data = await get_v2_0_season.asyncio(client=client, season=2022)
print(my_data.game_name) # CENTERSTAGE
print(my_data.game_name) # CENTERSTAGE
# or if you need more info (e.g. status_code)
response = await get_v2_0_season.asyncio(client=client, season=2022)
print(response.headers) # server headers
print(response.content) # raw json
print(response.headers) # server headers
print(response.content) # raw text
Expand Down

0 comments on commit 545f089

Please sign in to comment.