Skip to content

Latest commit

 

History

History
176 lines (126 loc) · 7.43 KB

GorpApi.md

File metadata and controls

176 lines (126 loc) · 7.43 KB

data_bridges_client.GorpApi

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

Method HTTP request Description
gorp_latest_get GET /Gorp/Latest Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
gorp_list_get GET /Gorp/List Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.

gorp_latest_get

GorpValueWithChangesPagedResult gorp_latest_get()

Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.

Generic badge Generic badge Generic badge Data Controller - Wael Attia API Integration Pattern - This endpoint uses Hey Jude pattern

Example

  • OAuth Authentication (default):
import time
import data_bridges_client
from data_bridges_client.api import gorp_api
from data_bridges_client.model.bad_request_dto import BadRequestDTO
from data_bridges_client.model.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
from pprint import pprint
# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
# 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.3.1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure OAuth2 access token for authorization: default
configuration = data_bridges_client.Configuration(
    host = "https://api.wfp.org/vam-data-bridges/1.3.1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = gorp_api.GorpApi(api_client)
    page = 1 # int |  (optional) if omitted the server will use the default value of 1
    env = "prod" # str | Environment.   * `prod` - api.vam.wfp.org   * `dev` - dev.api.vam.wfp.org (optional)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Return the latest dataset of number of acutely food insecure (in millions)  based on WFP Global Operational Response Plan.
        api_response = api_instance.gorp_latest_get(page=page, env=env)
        pprint(api_response)
    except data_bridges_client.ApiException as e:
        print("Exception when calling GorpApi->gorp_latest_get: %s\n" % e)

Parameters

Name Type Description Notes
page int [optional] if omitted the server will use the default value of 1
env str Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org [optional]

Return type

GorpValueWithChangesPagedResult

Authorization

default

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, text/plain

HTTP response details

Status code Description Response headers
200 Success -
400 Bad Request -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

gorp_list_get

GorpValueWithChangesPagedResult gorp_list_get()

Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.

Generic badge Generic badge Generic badge Data Controller - Wael Attia API Integration Pattern - This endpoint uses Hey Jude pattern

Example

  • OAuth Authentication (default):
import time
import data_bridges_client
from data_bridges_client.api import gorp_api
from data_bridges_client.model.bad_request_dto import BadRequestDTO
from data_bridges_client.model.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
from pprint import pprint
# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
# 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.3.1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure OAuth2 access token for authorization: default
configuration = data_bridges_client.Configuration(
    host = "https://api.wfp.org/vam-data-bridges/1.3.1"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = gorp_api.GorpApi(api_client)
    page = 1 # int |  (optional) if omitted the server will use the default value of 1
    env = "prod" # str | Environment.   * `prod` - api.vam.wfp.org   * `dev` - dev.api.vam.wfp.org (optional)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
        api_response = api_instance.gorp_list_get(page=page, env=env)
        pprint(api_response)
    except data_bridges_client.ApiException as e:
        print("Exception when calling GorpApi->gorp_list_get: %s\n" % e)

Parameters

Name Type Description Notes
page int [optional] if omitted the server will use the default value of 1
env str Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org [optional]

Return type

GorpValueWithChangesPagedResult

Authorization

default

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, text/plain

HTTP response details

Status code Description Response headers
200 Success -
400 Bad Request -

[Back to top] [Back to API list] [Back to Model list] [Back to README]