diff --git a/sdk/src/main/java/cryptohopper/android/sdk/API/Hopper/General/GetSingleHopper/HopperAPIGetSingleHopperRequest.kt b/sdk/src/main/java/cryptohopper/android/sdk/API/Hopper/General/GetSingleHopper/HopperAPIGetSingleHopperRequest.kt index c7d2e33..dff9e46 100644 --- a/sdk/src/main/java/cryptohopper/android/sdk/API/Hopper/General/GetSingleHopper/HopperAPIGetSingleHopperRequest.kt +++ b/sdk/src/main/java/cryptohopper/android/sdk/API/Hopper/General/GetSingleHopper/HopperAPIGetSingleHopperRequest.kt @@ -9,7 +9,7 @@ import cryptohopper.android.sdk.SharedModels.ConfigModels.HopperAPIHttpMethod class HopperAPIGetSingleHopperRequest: HopperAPIRequest { - constructor(hopperId : String) { + constructor(hopperId : Int) { this.httpMethod = HopperAPIHttpMethod.GET this.needsAuthentication = true this.changeUrlPath("/hopper/$hopperId") diff --git a/sdk/src/main/java/cryptohopper/android/sdk/API/Marketplace/Copybot/CopyBotCreateHopper/HopperAPICopyBotCreateHopperRequest.kt b/sdk/src/main/java/cryptohopper/android/sdk/API/Marketplace/Copybot/CopyBotCreateHopper/HopperAPICopyBotCreateHopperRequest.kt index dcafcde..ecd89b9 100644 --- a/sdk/src/main/java/cryptohopper/android/sdk/API/Marketplace/Copybot/CopyBotCreateHopper/HopperAPICopyBotCreateHopperRequest.kt +++ b/sdk/src/main/java/cryptohopper/android/sdk/API/Marketplace/Copybot/CopyBotCreateHopper/HopperAPICopyBotCreateHopperRequest.kt @@ -6,7 +6,7 @@ import cryptohopper.android.sdk.SharedModels.ConfigModels.HopperAPIHttpMethod class HopperAPICopyBotCreateHopperRequest : HopperAPIRequest { - constructor(copyBotMarketplaceId : String, paperTrading: Boolean, apiKey : String? , apiSecret : String? , apiPassphrase : String? , extraApiKey : String? , extraApiSecret : String?,autoSync : Boolean = true, isSandbox : Boolean = false ) { + constructor(hopperId : String?, copyBotMarketplaceId : String, paperTrading: Boolean, apiKey : String? , apiSecret : String? , apiPassphrase : String? , extraApiKey : String? , extraApiSecret : String?,autoSync : Boolean = true, isSandbox : Boolean = false ) { this.httpMethod = HopperAPIHttpMethod.POST this.needsAuthentication = true this.changeUrlPath("/app/mobile/iap") @@ -17,6 +17,9 @@ class HopperAPICopyBotCreateHopperRequest : HopperAPIRequest Unit) { + fun getHopper(hopperId: Int, callback: (Hopper?, HopperAPIError?) -> Unit) { HopperAPIGetSingleHopperRequest(hopperId).request({ hopper -> callback(hopper.data?.hopper, null) }, { error -> @@ -1832,6 +1832,7 @@ class CryptohopperHopper { } fun createCopyBot( + hopperId: String?, copyBotMarketplaceId : String, paperTrading: Boolean , apiKey : String? , @@ -1844,6 +1845,7 @@ class CryptohopperHopper { callback: (String?, HopperAPIError?) -> Unit ) { HopperAPICopyBotCreateHopperRequest( + hopperId = hopperId, copyBotMarketplaceId = copyBotMarketplaceId, paperTrading = paperTrading, apiKey = apiKey,