Update docs
This commit is contained in:
parent
3a9534ae9b
commit
d0f2c57282
53
docs/api.rst
53
docs/api.rst
|
@ -17,32 +17,48 @@ Domain
|
|||
Base classes
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. automodule:: usda.domain
|
||||
:members: UsdaObject, ListItem
|
||||
.. autoclass:: usda.domain.UsdaObject
|
||||
:members:
|
||||
|
||||
.. autoclass:: usda.domain.ListItem
|
||||
:members:
|
||||
|
||||
Items
|
||||
^^^^^
|
||||
|
||||
.. automodule:: usda.domain
|
||||
:members: Food, Nutrient, Measure
|
||||
.. autoclass:: usda.domain.Food
|
||||
:members:
|
||||
|
||||
.. autoclass:: usda.domain.Nutrient
|
||||
:members:
|
||||
|
||||
.. autoclass:: usda.domain.Measure
|
||||
:members:
|
||||
|
||||
Food Reports
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. automodule:: usda.domain
|
||||
:members: FoodReport, FoodReportV2, Source
|
||||
.. autoclass:: usda.domain.FoodReport
|
||||
:members:
|
||||
|
||||
.. autoclass:: usda.domain.FoodReportV2
|
||||
:members:
|
||||
|
||||
.. autoclass:: usda.domain.Source
|
||||
:members:
|
||||
|
||||
Nutrient Reports
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. automodule:: usda.domain
|
||||
:members: NutrientReportFood
|
||||
.. autoclass:: usda.domain.NutrientReportFood
|
||||
:members:
|
||||
|
||||
Enums
|
||||
-----
|
||||
|
||||
.. automodule:: usda.enums
|
||||
:members: UsdaUriActions, UsdaNdbListType, UsdaNdbReportType
|
||||
:members: UsdaUriActions, UsdaNdbListType, UsdaNdbReportType,
|
||||
UsdaNdbDataSource
|
||||
|
||||
Low level classes
|
||||
-----------------
|
||||
|
@ -50,15 +66,24 @@ Low level classes
|
|||
Base client
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. automodule:: usda.base
|
||||
:members: BASE_URI, DataGovClientBase, api_request
|
||||
.. autodata:: usda.base.BASE_URI
|
||||
|
||||
.. autoclass:: usda.base.DataGovClientBase
|
||||
:members:
|
||||
|
||||
.. autofunction:: usda.base.api_request
|
||||
|
||||
Exceptions
|
||||
^^^^^^^^^^
|
||||
|
||||
.. automodule:: usda.base
|
||||
:members: DataGovApiError, DataGovApiRateExceededError,
|
||||
DataGovInvalidApiKeyError
|
||||
.. autoexception:: usda.base.DataGovApiError
|
||||
:members:
|
||||
|
||||
.. autoexception:: usda.base.DataGovApiRateExceededError
|
||||
:members:
|
||||
|
||||
.. autoexception:: usda.base.DataGovInvalidApiKeyError
|
||||
:members:
|
||||
|
||||
Pagination
|
||||
^^^^^^^^^^
|
||||
|
|
|
@ -71,6 +71,14 @@ nutritional data for some pseudo-scientific calculations in the
|
|||
`PseudoScience <https://gitlab.com/Lucidiot/PseudoScience>`_ project
|
||||
but has been extended to provide a better coverage of the API.
|
||||
|
||||
.. warning::
|
||||
|
||||
Since October 1, 2019, the APIs this package relies on have been
|
||||
deprecated. python-usda 1.x will remove those APIs and rely on the new
|
||||
`Food Data Central`_ APIs.
|
||||
|
||||
.. _Food Data Central: https://fdc.nal.usda.gov/api-guide.html
|
||||
|
||||
Setup
|
||||
-----
|
||||
|
||||
|
|
|
@ -59,7 +59,10 @@ class UsdaNdbReportType(Enum):
|
|||
"""
|
||||
|
||||
full = "f"
|
||||
"""Contains all the available nutrients"""
|
||||
"""
|
||||
Contains all the available nutrients.
|
||||
Only available on Standard Reference items.
|
||||
"""
|
||||
|
||||
stats = "s"
|
||||
"""
|
||||
|
@ -88,4 +91,11 @@ class UsdaNdbDataSource(Enum):
|
|||
"USDA food data sources"
|
||||
|
||||
StandardReference = 'Standard Reference'
|
||||
"""
|
||||
Nutritional information for generic food items.
|
||||
"""
|
||||
|
||||
BrandedFoodProducts = 'Branded Food Products'
|
||||
"""
|
||||
Nutritional information provided to the USDA by the food industry.
|
||||
"""
|
||||
|
|
Reference in New Issue