66# ' Generated by: https://openapi-generator.tech
77# '
88
9-
109# ' ApiClient Class
1110# '
1211# ' Generic API client for OpenAPI client library builds.
2524# ' @format An \code{R6Class} generator object
2625# ' @field base_path Base url
2726# ' @field user_agent Default user agent
28- # ' @field default_headers
27+ # ' @field default_headers Default headers
2928# ' @field username Username for HTTP basic authentication
3029# ' @field password Password for HTTP basic authentication
31- # ' @field api_keys
32- # ' @field access_token
30+ # ' @field api_keys API keys
31+ # ' @field access_token Access token
3332# ' @field timeout Default timeout in seconds
3433# ' @field retry_status_codes vector of status codes to retry
3534# ' @field max_retry_attempts maximum number of retries for the status codes
@@ -59,7 +58,22 @@ ApiClient <- R6::R6Class(
5958 retry_status_codes = NULL ,
6059 # Maximum number of retry attempts for the retry status codes
6160 max_retry_attempts = NULL ,
62- # constructor
61+ # ' Initialize a new ApiClient.
62+ # '
63+ # ' @description
64+ # ' Initialize a new ApiClient.
65+ # '
66+ # ' @param base_path Base path.
67+ # ' @param user_agent User agent.
68+ # ' @param default_headers Default headers.
69+ # ' @param username User name.
70+ # ' @param password Password.
71+ # ' @param api_keys API keys.
72+ # ' @param access_token Access token.
73+ # ' @param timeout Timeout.
74+ # ' @param retry_status_codes Status codes for retry.
75+ # ' @param max_retry_attempts Maxmium number of retry.
76+ # ' @export
6377 initialize = function (base_path = NULL , user_agent = NULL , default_headers = NULL ,
6478 username = NULL , password = NULL , api_keys = NULL ,
6579 access_token = NULL , timeout = NULL ,
@@ -106,7 +120,19 @@ ApiClient <- R6::R6Class(
106120 self $ max_retry_attempts <- max_retry_attempts
107121 }
108122 },
109-
123+ # ' Prepare to make an API call with the retry logic.
124+ # '
125+ # ' @description
126+ # ' Prepare to make an API call with the retry logic.
127+ # '
128+ # ' @param url URL.
129+ # ' @param method HTTP method.
130+ # ' @param query_params The query parameters.
131+ # ' @param header_params The header parameters.
132+ # ' @param body The HTTP request body.
133+ # ' @param ... Other optional arguments.
134+ # ' @return HTTP response
135+ # ' @export
110136 CallApi = function (url , method , query_params , header_params , body , ... ) {
111137
112138 resp <- self $ Execute(url , method , query_params , header_params , body , ... )
@@ -131,7 +157,19 @@ ApiClient <- R6::R6Class(
131157
132158 resp
133159 },
134-
160+ # ' Make an API call
161+ # '
162+ # ' @description
163+ # ' Make an API call
164+ # '
165+ # ' @param url URL.
166+ # ' @param method HTTP method.
167+ # ' @param query_params The query parameters.
168+ # ' @param header_params The header parameters.
169+ # ' @param body The HTTP request body.
170+ # ' @param ... Other optional arguments.
171+ # ' @return HTTP response
172+ # ' @export
135173 Execute = function (url , method , query_params , header_params , body , ... ) {
136174 headers <- httr :: add_headers(c(header_params , self $ default_headers ))
137175
@@ -157,18 +195,33 @@ ApiClient <- R6::R6Class(
157195 rlang :: abort(message = err_msg , .subclass = " ApiException" , ApiException = ApiException $ new(status = 0 , reason = err_msg ))
158196 }
159197 },
160-
161- # Deserialize the content of api response to the given type.
198+ # ' Deserialize the content of api response to the given type.
199+ # '
200+ # ' @description
201+ # ' Deserialize the content of api response to the given type.
202+ # '
203+ # ' @param resp Response object.
204+ # ' @param return_type R return type.
205+ # ' @param pkg_env Package environment.
206+ # ' @return Deserialized object.
207+ # ' @export
162208 deserialize = function (resp , return_type , pkg_env ) {
163209 resp_obj <- jsonlite :: fromJSON(httr :: content(resp , " text" , encoding = " UTF-8" ))
164210 self $ deserializeObj(resp_obj , return_type , pkg_env )
165211 },
166212
167-
168- # Deserialize the response from jsonlite object based on the given type
169- # by handling complex and nested types by iterating recursively
170- # Example return_types will be like "array[integer]", "map(Pet)", "array[map(Tag)]", etc.,
171-
213+ # ' Deserialize the response from jsonlite object based on the given type
214+ # '
215+ # ' @description
216+ # ' Deserialize the response from jsonlite object based on the given type
217+ # ' by handling complex and nested types by iterating recursively
218+ # ' Example return_types will be like "array[integer]", "map(Pet)", "array[map(Tag)]", etc.,
219+ # '
220+ # ' @param obj Response object.
221+ # ' @param return_type R return type.
222+ # ' @param pkg_env Package environment.
223+ # ' @return Deserialized object.
224+ # ' @export
172225 deserializeObj = function (obj , return_type , pkg_env ) {
173226 return_obj <- NULL
174227 primitive_types <- c(" character" , " numeric" , " integer" , " logical" , " complex" )
0 commit comments