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

V4.0.0 #19

Merged
merged 3 commits into from
May 7, 2024
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
16 changes: 12 additions & 4 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.github/workflows/python.yml
.gitignore
.gitlab-ci.yml
.openapi-generator-ignore
.travis.yml
README.md
data_bridges_client/__init__.py
Expand Down Expand Up @@ -70,8 +69,11 @@ data_bridges_client/models/view_extended_aggregated_price_paged_result.py
data_bridges_client/models/view_extended_alps_value.py
data_bridges_client/models/view_extended_alps_value_paged_result.py
data_bridges_client/models/weekly_aggregated_price.py
data_bridges_client/models/xls_form_definition_dto.py
data_bridges_client/models/xls_form_definition_new_schema_dto.py
data_bridges_client/models/xls_form_dto.py
data_bridges_client/models/xls_form_fields_dto.py
data_bridges_client/models/xls_form_list_choice_dto.py
data_bridges_client/models/xls_form_list_choices_dto.py
data_bridges_client/py.typed
data_bridges_client/rest.py
docs/BadRequestDTO.md
Expand Down Expand Up @@ -133,7 +135,10 @@ docs/ViewExtendedAlpsValue.md
docs/ViewExtendedAlpsValuePagedResult.md
docs/WeeklyAggregatedPrice.md
docs/XlsFormDTO.md
docs/XlsFormDefinitionDTO.md
docs/XlsFormDefinitionNewSchemaDTO.md
docs/XlsFormFieldsDTO.md
docs/XlsFormListChoiceDTO.md
docs/XlsFormListChoicesDTO.md
docs/XlsFormsApi.md
git_push.sh
pyproject.toml
Expand Down Expand Up @@ -200,7 +205,10 @@ test/test_view_extended_aggregated_price_paged_result.py
test/test_view_extended_alps_value.py
test/test_view_extended_alps_value_paged_result.py
test/test_weekly_aggregated_price.py
test/test_xls_form_definition_dto.py
test/test_xls_form_definition_new_schema_dto.py
test/test_xls_form_dto.py
test/test_xls_form_fields_dto.py
test/test_xls_form_list_choice_dto.py
test/test_xls_form_list_choices_dto.py
test/test_xls_forms_api.py
tox.ini
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.0
7.5.0
60 changes: 46 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.o

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.0.0
- Package version: 2.0.0
- API version: 4.0.0
- Package version: 4.0.0
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand All @@ -17,9 +18,9 @@ Python 3.7+
If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
pip install git+https://github.com/WFP-VAM/DataBridgesAPI.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/WFP-VAM/DataBridgesAPI.git`)

Then import the package:
```python
Expand Down Expand Up @@ -50,11 +51,9 @@ Please follow the [installation procedure](#installation--usage) and then run th

```python

import time
import data_bridges_client
from data_bridges_client.rest import ApiException
from pprint import pprint
from data_bridges_client.token import WfpApiToken

# Configure OAuth2 access token for authorization: default
KEY = ''
Expand All @@ -64,7 +63,7 @@ token = WfpApiToken(api_key=KEY, api_secret=SECRET)
# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.4.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
host = "https://api.wfp.org/vam-data-bridges/1.4.0"
host = "https://api.wfp.org/vam-data-bridges/4.0.0"
)
configuration.access_token = token.refresh()

Expand All @@ -91,7 +90,7 @@ with data_bridges_client.ApiClient(configuration) as api_client:

## Documentation for API Endpoints

All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
Expand All @@ -110,7 +109,8 @@ Class | Method | HTTP request | Description
*IncubationApi* | [**household_full_data_get**](docs/IncubationApi.md#household_full_data_get) | **GET** /Household/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
*IncubationApi* | [**household_official_use_base_data_get**](docs/IncubationApi.md#household_official_use_base_data_get) | **GET** /Household/OfficialUseBaseData | Get data that includes the core household fields only by Survey ID
*IncubationApi* | [**household_public_base_data_get**](docs/IncubationApi.md#household_public_base_data_get) | **GET** /Household/PublicBaseData | Get data that includes the core household fields only by Survey ID
*IncubationApi* | [**household_surveys_get**](docs/IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
*IncubationApi* | [**household_surveys_get**](docs/IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
*IncubationApi* | [**xls_forms_definition_get**](docs/IncubationApi.md#xls_forms_definition_get) | **GET** /XlsForms/definition | Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
*MarketPricesApi* | [**market_prices_alps_get**](docs/MarketPricesApi.md#market_prices_alps_get) | **GET** /MarketPrices/Alps | Returns time series values of ALPS and PEWI.
*MarketPricesApi* | [**market_prices_price_daily_get**](docs/MarketPricesApi.md#market_prices_price_daily_get) | **GET** /MarketPrices/PriceDaily | Returns a daily time series of commodity market prices.
*MarketPricesApi* | [**market_prices_price_monthly_get**](docs/MarketPricesApi.md#market_prices_price_monthly_get) | **GET** /MarketPrices/PriceMonthly | Returns a monthly time series of commodity market prices.
Expand All @@ -130,7 +130,6 @@ Class | Method | HTTP request | Description
*SurveysApi* | [**m_fi_surveys_full_data_get**](docs/SurveysApi.md#m_fi_surveys_full_data_get) | **GET** /MFI/Surveys/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact [email protected] for authorization.
*SurveysApi* | [**m_fi_surveys_get**](docs/SurveysApi.md#m_fi_surveys_get) | **GET** /MFI/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
*SurveysApi* | [**m_fi_surveys_processed_data_get**](docs/SurveysApi.md#m_fi_surveys_processed_data_get) | **GET** /MFI/Surveys/ProcessedData | Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
*XlsFormsApi* | [**m_fi_xls_forms_definition_get**](docs/XlsFormsApi.md#m_fi_xls_forms_definition_get) | **GET** /MFI/XlsForms/definition | Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
*XlsFormsApi* | [**m_fi_xls_forms_get**](docs/XlsFormsApi.md#m_fi_xls_forms_get) | **GET** /MFI/XlsForms | Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.


Expand Down Expand Up @@ -184,7 +183,10 @@ Class | Method | HTTP request | Description
- [ViewExtendedAlpsValuePagedResult](docs/ViewExtendedAlpsValuePagedResult.md)
- [WeeklyAggregatedPrice](docs/WeeklyAggregatedPrice.md)
- [XlsFormDTO](docs/XlsFormDTO.md)
- [XlsFormDefinitionDTO](docs/XlsFormDefinitionDTO.md)
- [XlsFormDefinitionNewSchemaDTO](docs/XlsFormDefinitionNewSchemaDTO.md)
- [XlsFormFieldsDTO](docs/XlsFormFieldsDTO.md)
- [XlsFormListChoiceDTO](docs/XlsFormListChoiceDTO.md)
- [XlsFormListChoicesDTO](docs/XlsFormListChoicesDTO.md)


<a id="documentation-for-authorization"></a>
Expand All @@ -199,13 +201,43 @@ Authentication schemes defined for the API:
- **Flow**: implicit
- **Authorization URL**: https://api.wfp.org/authorize
- **Scopes**:
- **vamdatabridges_household-officialusebasedata_get**: vamdatabridges_household-officialusebasedata_get
- **vamdatabridges_rpme-fulldata_get**: vamdatabridges_rpme-fulldata_get
- **vamdatabridges_foodsecurity-list_get**: vamdatabridges_foodsecurity-list_get
- **vamdatabridges_commodities-list_get**: vamdatabridges_commodities-list_get
- **vamdatabridges_commodityunits-list_get**: vamdatabridges_commodityunits-list_get
- **vamdatabridges_markets-nearbymarkets_get**: vamdatabridges_markets-nearbymarkets_get
- **vamdatabridges_rpme-outputvalues_get**: vamdatabridges_rpme-outputvalues_get
- **vamdatabridges_marketprices-alps_get**: vamdatabridges_marketprices-alps_get
- **vamdatabridges_mfi-surveys_get**: vamdatabridges_mfi-surveys_get
- **vamdatabridges_commodities-categories-list_get**: vamdatabridges_commodities-categories-list_get
- **vamdatabridges_commodityunits-conversion-list_get**: vamdatabridges_commodityunits-conversion-list_get
- **vamdatabridges_economicdata_get**: vamdatabridges_economicdata_get
- **vamdatabridges_mfi-surveys-processeddata_get**: vamdatabridges_mfi-surveys-processeddata_get
- **vamdatabridges_marketprices-priceweekly_get**: vamdatabridges_marketprices-priceweekly_get
- **vamdatabridges_markets-marketsascsv_get**: vamdatabridges_markets-marketsascsv_get
- **vamdatabridges_household-publicbasedata_get**: vamdatabridges_household-publicbasedata_get
- **vamdatabridges_mfi-xlsforms_get**: vamdatabridges_mfi-xlsforms_get
- **vamdatabridges_economicdata-indicatorlist_get**: vamdatabridges_economicdata-indicatorlist_get
- **vamdatabridges_markets-geojsonlist_get**: vamdatabridges_markets-geojsonlist_get
- **vamdatabridges_rpme-surveys_get**: vamdatabridges_rpme-surveys_get
- **vamdatabridges_rpme-xlsforms_get**: vamdatabridges_rpme-xlsforms_get
- **vamdatabridges_mfi-surveys-basedata_get**: vamdatabridges_mfi-surveys-basedata_get
- **vamdatabridges_mfi-surveys-fulldata_get**: vamdatabridges_mfi-surveys-fulldata_get
- **vamdatabridges_household-draftinternalbasedata_get**: vamdatabridges_household-draftinternalbasedata_get
- **vamdatabridges_marketprices-priceraw_get**: vamdatabridges_marketprices-priceraw_get
- **vamdatabridges_household-fulldata_get**: vamdatabridges_household-fulldata_get
- **vamdatabridges_household-officialusebasedata_get**: vamdatabridges_household-officialusebasedata_get
- **vamdatabridges_marketprices-pricemonthly_get**: vamdatabridges_marketprices-pricemonthly_get
- **vamdatabridges_markets-list_get**: vamdatabridges_markets-list_get
- **vamdatabridges_currency-list_get**: vamdatabridges_currency-list_get
- **vamdatabridges_gorp-list_get**: vamdatabridges_gorp-list_get
- **vamdatabridges_marketprices-priceraw_get**: vamdatabridges_marketprices-priceraw_get
- **vamdatabridges_rpme-variables_get**: vamdatabridges_rpme-variables_get
- **vamdatabridges_gorp-latest_get**: vamdatabridges_gorp-latest_get
- **vamdatabridges_currency-usdindirectquotation_get**: vamdatabridges_currency-usdindirectquotation_get
- **vamdatabridges_xlsforms-definition_get**: vamdatabridges_xlsforms-definition_get
- **vamdatabridges_household-draftinternalbasedata_get**: vamdatabridges_household-draftinternalbasedata_get
- **vamdatabridges_household-surveys_get**: vamdatabridges_household-surveys_get
- **vamdatabridges_marketprices-pricedaily_get**: vamdatabridges_marketprices-pricedaily_get
- **vamdatabridges_rpme-basedata_get**: vamdatabridges_rpme-basedata_get


## Author
Expand Down
7 changes: 5 additions & 2 deletions data_bridges_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern

The version of the OpenAPI document: 2.0.0
The version of the OpenAPI document: 4.0.0
Contact: [email protected]
Generated by OpenAPI Generator (https://openapi-generator.tech)

Expand Down Expand Up @@ -91,4 +91,7 @@
from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice
from data_bridges_client.models.xls_form_dto import XlsFormDTO
from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO
from data_bridges_client.models.xls_form_definition_new_schema_dto import XlsFormDefinitionNewSchemaDTO
from data_bridges_client.models.xls_form_fields_dto import XlsFormFieldsDTO
from data_bridges_client.models.xls_form_list_choice_dto import XlsFormListChoiceDTO
from data_bridges_client.models.xls_form_list_choices_dto import XlsFormListChoicesDTO
Loading
Loading