Package com.bybit.api.client.util
Class UrlBuilder
- java.lang.Object
-
- com.bybit.api.client.util.UrlBuilder
-
public final class UrlBuilder extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbuildFullUrl(String baseUrl, String urlPath, Map<String,Object> parameters)static StringbuildStreamUrl(String baseUrl, ArrayList<String> streams)static StringbuildTimestamp()static StringBuilderjoinQueryParameters(StringBuilder sb, Map<String,Object> params)Joins query parameters from a Map into a StringBuilder representation.static StringjoinQueryParameters(Map<String,Object> params)Joins query parameters from a Map into a String representation.static StringBuilderjoinStreamUrls(StringBuilder sb, ArrayList<String> streams)Joins streams from an ArrayList into a StringBuilder representation.static StringjoinStreamUrls(ArrayList<String> streams)Joins streams from an ArrayList into a String representation.static StringurlEncode(String s)
-
-
-
Method Detail
-
buildFullUrl
public static String buildFullUrl(String baseUrl, String urlPath, Map<String,Object> parameters)
-
joinQueryParameters
public static String joinQueryParameters(Map<String,Object> params)
Joins query parameters from a Map into a String representation.- Parameters:
params- The Map containing the query parameters.- Returns:
- The String representation of the joined query parameters.
-
joinQueryParameters
public static StringBuilder joinQueryParameters(StringBuilder sb, Map<String,Object> params)
Joins query parameters from a Map into a StringBuilder representation.- Parameters:
sb- The StringBuilder to append the query parameters to.params- The Map containing the query parameters.- Returns:
- The StringBuilder representation of the joined query parameters.
-
joinStreamUrls
public static String joinStreamUrls(ArrayList<String> streams)
Joins streams from an ArrayList into a String representation.- Parameters:
streams- The ArrayList containing the streams.- Returns:
- The String representation of the joined streams.
-
joinStreamUrls
public static StringBuilder joinStreamUrls(StringBuilder sb, ArrayList<String> streams)
Joins streams from an ArrayList into a StringBuilder representation.- Parameters:
sb- The StringBuilder to append the streams to.streams- The ArrayList containing the streams.- Returns:
- The StringBuilder representation of the joined streams.
-
buildTimestamp
public static String buildTimestamp()
-
-