Skip to content

Latest commit

 

History

History
114 lines (80 loc) · 4.77 KB

GorpApi.md

File metadata and controls

114 lines (80 loc) · 4.77 KB

GorpApi

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

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

GorpLatestGet

GorpValueWithChangesPagedResult GorpLatestGet(page = 1, env = var.env)

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

library(DataBridgesAPIr)

# Return the latest dataset of number of acutely food insecure (in millions)  based on WFP Global Operational Response Plan.
#
# prepare function argument(s)
var_page <- 1 # integer |  (Optional)
var_env <- "env_example" # character | Environment.   * `prod` - api.vam.wfp.org   * `dev` - dev.api.vam.wfp.org (Optional)

api_instance <- GorpApi$new()
# Configure OAuth2 access token for authorization: default
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GorpLatestGet(page = var_page, env = var_envdata_file = "result.txt")
result <- api_instance$GorpLatestGet(page = var_page, env = var_env)
dput(result)

Parameters

Name Type Description Notes
page integer [optional] [default to 1]
env Enum [prod, dev] 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 -

GorpListGet

GorpValueWithChangesPagedResult GorpListGet(page = 1, env = var.env)

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

library(DataBridgesAPIr)

# Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
#
# prepare function argument(s)
var_page <- 1 # integer |  (Optional)
var_env <- "env_example" # character | Environment.   * `prod` - api.vam.wfp.org   * `dev` - dev.api.vam.wfp.org (Optional)

api_instance <- GorpApi$new()
# Configure OAuth2 access token for authorization: default
api_instance$api_client$access_token <- Sys.getenv("ACCESS_TOKEN")
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
# result <- api_instance$GorpListGet(page = var_page, env = var_envdata_file = "result.txt")
result <- api_instance$GorpListGet(page = var_page, env = var_env)
dput(result)

Parameters

Name Type Description Notes
page integer [optional] [default to 1]
env Enum [prod, dev] 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 -