1010import java .util .function .Supplier ;
1111
1212public final class RequestOptions {
13- private final String key ;
13+ private final String apiKey ;
1414
1515 private final String token ;
1616
@@ -27,15 +27,15 @@ public final class RequestOptions {
2727 private final Map <String , Supplier <String >> queryParameterSuppliers ;
2828
2929 private RequestOptions (
30- String key ,
30+ String apiKey ,
3131 String token ,
3232 Optional <Integer > timeout ,
3333 TimeUnit timeoutTimeUnit ,
3434 Map <String , String > headers ,
3535 Map <String , Supplier <String >> headerSuppliers ,
3636 Map <String , String > queryParameters ,
3737 Map <String , Supplier <String >> queryParameterSuppliers ) {
38- this .key = key ;
38+ this .apiKey = apiKey ;
3939 this .token = token ;
4040 this .timeout = timeout ;
4141 this .timeoutTimeUnit = timeoutTimeUnit ;
@@ -55,8 +55,8 @@ public TimeUnit getTimeoutTimeUnit() {
5555
5656 public Map <String , String > getHeaders () {
5757 Map <String , String > headers = new HashMap <>();
58- if (this .key != null ) {
59- headers .put ("X-API-Key" , this .key );
58+ if (this .apiKey != null ) {
59+ headers .put ("X-API-Key" , this .apiKey );
6060 }
6161 if (this .token != null ) {
6262 headers .put ("Authorization" , "Bearer " + this .token );
@@ -81,7 +81,7 @@ public static Builder builder() {
8181 }
8282
8383 public static class Builder {
84- private String key = null ;
84+ private String apiKey = null ;
8585
8686 private String token = null ;
8787
@@ -97,8 +97,8 @@ public static class Builder {
9797
9898 private final Map <String , Supplier <String >> queryParameterSuppliers = new HashMap <>();
9999
100- public Builder key (String key ) {
101- this .key = key ;
100+ public Builder apiKey (String apiKey ) {
101+ this .apiKey = apiKey ;
102102 return this ;
103103 }
104104
@@ -140,7 +140,7 @@ public Builder addQueryParameter(String key, Supplier<String> value) {
140140
141141 public RequestOptions build () {
142142 return new RequestOptions (
143- key ,
143+ apiKey ,
144144 token ,
145145 timeout ,
146146 timeoutTimeUnit ,
0 commit comments