|
65 | 65 | #' @param - keyToUse: aWhere API key to use. For advanced use only. Most users will not need to use this parameter (optional) |
66 | 66 | #' @param - secretToUse: aWhere API secret to use. For advanced use only. Most users will not need to use this parameter (optional) |
67 | 67 | #' @param - tokenToUse: aWhere API token to use. For advanced use only. Most users will not need to use this parameter (optional) |
| 68 | +#' @param - apiAddressToUse: Address of aWhere API to use. For advanced use only. Most users will not need to use this parameter (optional) |
68 | 69 | #' |
69 | 70 | #' @import httr |
70 | 71 | #' @import data.table |
@@ -104,7 +105,8 @@ agronomic_norms_fields <- function(field_id |
104 | 105 | ,includeFeb29thData = TRUE |
105 | 106 | ,keyToUse = awhereEnv75247$uid |
106 | 107 | ,secretToUse = awhereEnv75247$secret |
107 | | - ,tokenToUse = awhereEnv75247$token) { |
| 108 | + ,tokenToUse = awhereEnv75247$token |
| 109 | + ,apiAddressToUse = awhereEnv75247$apiAddress) { |
108 | 110 |
|
109 | 111 | ############################################################# |
110 | 112 | #Checking Input Parameters |
@@ -189,7 +191,7 @@ agronomic_norms_fields <- function(field_id |
189 | 191 | ############################################################################## |
190 | 192 |
|
191 | 193 | # Create query |
192 | | - urlAddress <- paste0(awhereEnv75247$apiAddress, "/agronomics") |
| 194 | + urlAddress <- paste0(apiAddressToUse, "/agronomics") |
193 | 195 |
|
194 | 196 | strBeg <- paste0('/fields') |
195 | 197 | strCoord <- paste0('/',field_id) |
@@ -400,6 +402,7 @@ agronomic_norms_fields <- function(field_id |
400 | 402 | #' @param - keyToUse: aWhere API key to use. For advanced use only. Most users will not need to use this parameter (optional) |
401 | 403 | #' @param - secretToUse: aWhere API secret to use. For advanced use only. Most users will not need to use this parameter (optional) |
402 | 404 | #' @param - tokenToUse: aWhere API token to use. For advanced use only. Most users will not need to use this parameter (optional) |
| 405 | +#' @param - apiAddressToUse: Address of aWhere API to use. For advanced use only. Most users will not need to use this parameter (optional) |
403 | 406 | #' |
404 | 407 | #' @import httr |
405 | 408 | #' @import data.table |
@@ -443,7 +446,8 @@ agronomic_norms_latlng <- function(latitude |
443 | 446 | ,includeFeb29thData = TRUE |
444 | 447 | ,keyToUse = awhereEnv75247$uid |
445 | 448 | ,secretToUse = awhereEnv75247$secret |
446 | | - ,tokenToUse = awhereEnv75247$token) { |
| 449 | + ,tokenToUse = awhereEnv75247$token |
| 450 | + ,apiAddressToUse = awhereEnv75247$apiAddress) { |
447 | 451 |
|
448 | 452 | ############################################################# |
449 | 453 | #Checking Input Parameters |
@@ -528,7 +532,7 @@ agronomic_norms_latlng <- function(latitude |
528 | 532 | ############################################################################## |
529 | 533 |
|
530 | 534 | # Create query |
531 | | - urlAddress <- paste0(awhereEnv75247$apiAddress, "/agronomics") |
| 535 | + urlAddress <- paste0(apiAddressToUse, "/agronomics") |
532 | 536 |
|
533 | 537 | strBeg <- paste0('/locations') |
534 | 538 | strCoord <- paste0('/',latitude,',',longitude) |
@@ -757,6 +761,7 @@ agronomic_norms_latlng <- function(latitude |
757 | 761 | #' @param - keyToUse: aWhere API key to use. For advanced use only. Most users will not need to use this parameter (optional) |
758 | 762 | #' @param - secretToUse: aWhere API secret to use. For advanced use only. Most users will not need to use this parameter (optional) |
759 | 763 | #' @param - tokenToUse: aWhere API token to use. For advanced use only. Most users will not need to use this parameter (optional) |
| 764 | +#' @param - apiAddressToUse: Address of aWhere API to use. For advanced use only. Most users will not need to use this parameter (optional) |
760 | 765 | #' |
761 | 766 | #' @import httr |
762 | 767 | #' @import data.table |
@@ -806,7 +811,8 @@ agronomic_norms_area <- function(polygon |
806 | 811 | ,maxTryCount = 3 |
807 | 812 | ,keyToUse = awhereEnv75247$uid |
808 | 813 | ,secretToUse = awhereEnv75247$secret |
809 | | - ,tokenToUse = awhereEnv75247$token) { |
| 814 | + ,tokenToUse = awhereEnv75247$token |
| 815 | + ,apiAddressToUse = awhereEnv75247$apiAddress) { |
810 | 816 |
|
811 | 817 | #Checking Input Parameters |
812 | 818 | checkCredentials(keyToUse,secretToUse,tokenToUse) |
@@ -893,7 +899,11 @@ agronomic_norms_area <- function(polygon |
893 | 899 | ,gdd_base_temp = gdd_base_temp |
894 | 900 | ,gdd_min_boundary = gdd_min_boundary |
895 | 901 | ,gdd_max_boundary = gdd_max_boundary |
896 | | - ,includeFeb29thData = includeFeb29thData) |
| 902 | + ,includeFeb29thData = includeFeb29thData |
| 903 | + ,keyToUse = keyToUse |
| 904 | + ,secretToUse = secretToUse |
| 905 | + ,tokenToUse = tokenToUse |
| 906 | + ,apiAddressToUse = apiAddressToUse) |
897 | 907 |
|
898 | 908 | currentNames <- colnames(t) |
899 | 909 |
|
|
0 commit comments