Skip to content

Commit

Permalink
Merge pull request #92 from cryptohopper/development
Browse files Browse the repository at this point in the history
Query Items added on Troubleshooter Request
  • Loading branch information
canerten authored Sep 25, 2023
2 parents 1706471 + 03ffdea commit 163ab0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ import cryptohopper.android.sdk.SharedModels.ConfigModels.HopperAPIHttpMethod

class HopperAPIGetTroubleshooterRequest : HopperAPIRequest<HopperAPITroubleshooterAPIResponse> {

constructor(hopperId : String) {
constructor(
hopperId : String,
platform : String,
lang : String
) {
this.httpMethod = HopperAPIHttpMethod.GET
this.needsAuthentication = true
this.changeUrlPath("/hopper/$hopperId/troubleshooter")
addQueryItem("platform", platform)
addQueryItem("lang", lang)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,11 @@ class CryptohopperHopper {
hopperId: String,
callback: (List<TroubleshooterItem>?, HopperAPIError?) -> Unit
) {
HopperAPIGetTroubleshooterRequest(hopperId).request<HopperAPITroubleshooterAPIResponse>({ data ->
HopperAPIGetTroubleshooterRequest(
hopperId,
"app",
"en"
).request<HopperAPITroubleshooterAPIResponse>({ data ->
callback(data.data?.troubleshooter, null)
}, { error ->
callback(null, error)
Expand Down

0 comments on commit 163ab0d

Please sign in to comment.