Skip to content

Commit

Permalink
Version 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Park committed Sep 15, 2016
1 parent 95f7094 commit 756203a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/Api.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ create_multipart <- function(parameters) {
#' @param url - url for Rosette Api
#' @return Returns the response from the Rosette API
mutipart_call <- function(user_key, parameters, endpoint, customHeaders,url) {
BINDING_VERSION <- "1.2.0"
BINDING_VERSION <- "1.3.0"
if(is.null(customHeaders)) {
response <- POST(paste(url, endpoint, sep=""), encode = "multipart", add_headers("X-RosetteAPI-Key" = user_key, "Content-Type" = "multipart/mixed", "X-RosetteAPI-Binding" = "R", "X-RosetteAPI-Binding-Version" = BINDING_VERSION, "user-agent" = "ruseragent"), body = parameters)
} else {
Expand Down Expand Up @@ -240,7 +240,7 @@ serialize_name_parameters <- function(parameters) {
#' @param url - url for Rosette Api
#' @return Returns the response from the Rosette API
post_endpoint <- function(user_key, parameters, endpoint, customHeaders, url) {
BINDING_VERSION <- "1.2.0"
BINDING_VERSION <- "1.3.0"
if(is.null(customHeaders)) {
if(endpoint == "name-translation" || endpoint == "name-similarity"){
response <- POST(paste(url, endpoint, sep=""), add_headers("X-RosetteAPI-Key" = user_key, "Content-Type" = "application/json", "X-RosetteAPI-Binding" = "R", "X-RosetteAPI-Binding-Version" = BINDING_VERSION), body = serialize_name_parameters(parameters))
Expand Down Expand Up @@ -270,7 +270,7 @@ post_endpoint <- function(user_key, parameters, endpoint, customHeaders, url) {
#' @param url - url for Rosette Api
#' @return Returns the response from the Rosette API
get_endpoint <- function(user_key, endpoint, customHeaders, url) {
BINDING_VERSION <- "1.2.0"
BINDING_VERSION <- "1.3.0"
if(is.null(customHeaders)) {
response <- GET(paste(url, endpoint, sep=""), add_headers("X-RosetteAPI-Key" = user_key, "X-RosetteAPI-Binding" = "R", "X-RosetteAPI-Binding-Version" = BINDING_VERSION, "user-agent" = "ruseragent"))
} else {
Expand Down

0 comments on commit 756203a

Please sign in to comment.