diff --git a/mfapi/apicalls.h b/mfapi/apicalls.h index 1585e23..32d42ee 100644 --- a/mfapi/apicalls.h +++ b/mfapi/apicalls.h @@ -33,6 +33,8 @@ #define MFAPI_MAX_LEN_KEY 15 #define MFAPI_MAX_LEN_NAME 255 +#define MFAPI_VERSION "1.2" + enum mfconn_device_change_type { MFCONN_DEVICE_CHANGE_DELETED_FOLDER, MFCONN_DEVICE_CHANGE_DELETED_FILE, diff --git a/mfapi/mfconn.c b/mfapi/mfconn.c index a26e5e6..8a9a0e3 100644 --- a/mfapi/mfconn.c +++ b/mfapi/mfconn.c @@ -263,8 +263,10 @@ const char *mfconn_create_unsigned_get(mfconn * conn, int ssl, return NULL; } - api_request = strdup_printf("%s//%s/api/%s", - (ssl ? "https:" : "http:"), conn->server, api); + api_request = strdup_printf("%s//%s/api/%s/%s", + (ssl ? "https:" : "http:"), + conn->server, + MFAPI_VERSION, api); // compute the amount of space requred to realloc() the request bytes_to_alloc = api_args_len; @@ -351,8 +353,10 @@ const char *mfconn_create_signed_get(mfconn * conn, int ssl, return NULL; } - api_request = strdup_printf("%s//%s/api/%s", - (ssl ? "https:" : "http:"), conn->server, api); + api_request = strdup_printf("%s//%s/api/%s/%s", + (ssl ? "https:" : "http:"), + conn->server, + MFAPI_VERSION, api); call_hash = mfconn_create_call_signature(conn, api_request, api_args); signature = strdup_printf("&signature=%s", call_hash);