public class Params
extends java.util.HashMap<java.lang.String,java.lang.String>
amadeus.get("/foo/bar", Params.with("first_name", "John").and("last_name", "Smith"));
| Modifier and Type | Method and Description |
|---|---|
Params |
and(@NonNull java.lang.String key,
java.lang.Object value)
Adds another key/value pair to the Params map.
|
java.lang.String |
toString()
Converts params into a HTTP query string.
|
static Params |
with(@NonNull java.lang.String key,
java.lang.Object value)
Initializes a new Param map with an initial key/value pair.
|
public static Params with(@NonNull @NonNull java.lang.String key, java.lang.Object value)
amadeus.get("/foo/bar", Params.with("first_name", "John"));
key - the key for the parameter to send to the APIvalue - the value for the given keypublic Params and(@NonNull @NonNull java.lang.String key, java.lang.Object value)
amadeus.get("/foo/bar", Params.with("first_name", "John").and("last_name", "Smith"));
key - the key for the parameter to send to the APIvalue - the value for the given keypublic java.lang.String toString()
toString in class java.util.AbstractMap<java.lang.String,java.lang.String>