Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Usage

Request classes are presented as methods on the
:class:`~spacetrack.base.SpaceTrackClient` object. For example,
``st.tle_publish()``. Each request class is part of a request controller.
``st.gp_history()``. Each request class is part of a request controller.
Since most request classes are only part of one request controller,
``spacetrack`` looks up the controller for you. It can be specified explicitly
in several ways. All the following are equivalent:
Expand Down
12 changes: 6 additions & 6 deletions src/spacetrack/aio.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ async def generic_request(

.. code-block:: python

st.tle_publish(*args, **kw)
st.basicspacedata.tle_publish(*args, **kw)
st.gp_history(*args, **kw)
st.basicspacedata.gp_history(*args, **kw)
st.file(*args, **kw)
st.fileshare.file(*args, **kw)
st.spephemeris.file(*args, **kw)
Expand All @@ -184,8 +184,8 @@ async def generic_request(

.. code-block:: python

st.generic_request('tle_publish', *args, **kw)
st.generic_request('tle_publish', *args, controller='basicspacedata', **kw)
st.generic_request('gp_history', *args, **kw)
st.generic_request('gp_history', *args, controller='basicspacedata', **kw)
st.generic_request('file', *args, **kw)
st.generic_request('file', *args, controller='fileshare', **kw)
st.generic_request('file', *args, controller='spephemeris', **kw)
Expand All @@ -205,9 +205,9 @@ async def generic_request(
.. code-block:: python

spacetrack = SpaceTrackClient(...)
spacetrack.tle.get_predicates()
spacetrack.gp_history.get_predicates()
# or
spacetrack.get_predicates('tle')
spacetrack.get_predicates('gp_history')

See :func:`~spacetrack.operators._stringify_predicate_value` for
which Python objects are converted appropriately.
Expand Down
25 changes: 7 additions & 18 deletions src/spacetrack/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,10 @@ class SpaceTrackClient:
"gp",
"gp_history",
"launch_site",
"omm",
"satcat",
"satcat_change",
"satcat_debut",
"tip",
"tle",
"tle_latest",
"tle_publish",
}

request_controllers["expandedspacedata"] = {
Expand Down Expand Up @@ -282,14 +278,7 @@ class SpaceTrackClient:
("dirs", "publicfiles"): set(),
("download", "publicfiles"): set(),
}
deprecated_controllers = {
"basicspacedata": {
"tle",
"tle_latest",
"tle_publish",
"omm",
},
}
deprecated_controllers = {}
param_fields = {
("download", "publicfiles"): {"name"},
}
Expand Down Expand Up @@ -652,8 +641,8 @@ def generic_request(

.. code-block:: python

st.tle_publish(*args, **kw)
st.basicspacedata.tle_publish(*args, **kw)
st.gp_history(*args, **kw)
st.basicspacedata.gp_history(*args, **kw)
st.file(*args, **kw)
st.fileshare.file(*args, **kw)
st.spephemeris.file(*args, **kw)
Expand All @@ -662,8 +651,8 @@ def generic_request(

.. code-block:: python

st.generic_request('tle_publish', *args, **kw)
st.generic_request('tle_publish', *args, controller='basicspacedata', **kw)
st.generic_request('gp_history', *args, **kw)
st.generic_request('gp_history', *args, controller='basicspacedata', **kw)
st.generic_request('file', *args, **kw)
st.generic_request('file', *args, controller='fileshare', **kw)
st.generic_request('file', *args, controller='spephemeris', **kw)
Expand All @@ -685,9 +674,9 @@ def generic_request(
.. code-block:: python

spacetrack = SpaceTrackClient(...)
spacetrack.tle.get_predicates()
spacetrack.gp_history.get_predicates()
# or
spacetrack.get_predicates('tle')
spacetrack.get_predicates('gp_history')

See :func:`~spacetrack.operators._stringify_predicate_value` for
which Python objects are converted appropriately.
Expand Down
Loading