AgAPIClient: ApiClient class

Description Details Public fields Active bindings Methods Author(s) References

Description

the AgAPI client provides a general class for all the AgAPI calls. It includes

Generic class for API client calls, all nbaR client classes derive from this class

Specifies the public interface which any data accessing classes must implement.

Details

AgAPI Client Class

Public fields

user

specifies the user name, defaults to NULL

password

specifies the password, defaults to NULL

authentication

specifies the password, defaults to NULL

token

specifies the password, defaults to NULL

user_agent

specifies the password, defaults to NULL

serverURL

specifies the password, defaults to http://research.cip.cgiar.org/agrofims/api/dev/

version

specifies the version, defaults to 0051

endPoint

specifies the end point value, tableName/method.php

Active bindings

endPoint

specifies the end point value, tableName/method.php

Methods

Public methods


Method new()

Usage
AgAPIClient$new(
  user = NULL,
  password = NULL,
  authentication = NULL,
  token = NULL,
  user_agent = NULL,
  serverURL = "https://research.cip.cgiar.org/agrofims/api/dev",
  version = "/0135/r"
)

Method print()

Usage
AgAPIClient$print(...)

Method call_api()

Usage
AgAPIClient$call_api(
  url,
  method,
  queryParams = NULL,
  headerParams = NULL,
  body,
  ...
)

Method clone()

The objects of this class are cloneable with this method.

Usage
AgAPIClient$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Omar Benites

References

Api url structure https://swagger.io/docs/specification/api-host-and-base-path/


AGROFIMS/ragapi documentation built on Nov. 23, 2020, 9:20 a.m.