1 | package pl.zankowski.iextrading4j.client.rest.request.datapoint; | |
2 | ||
3 | import pl.zankowski.iextrading4j.api.datapoint.DataPoint; | |
4 | import pl.zankowski.iextrading4j.client.rest.manager.RestRequest; | |
5 | import pl.zankowski.iextrading4j.client.rest.manager.RestRequestBuilder; | |
6 | import pl.zankowski.iextrading4j.client.rest.request.IEXCloudV1RestRequest; | |
7 | import pl.zankowski.iextrading4j.client.rest.request.stocks.AbstractStocksRequestBuilder; | |
8 | ||
9 | import javax.ws.rs.core.GenericType; | |
10 | import java.util.List; | |
11 | ||
12 | public class DataPointsRequestBuilder extends AbstractStocksRequestBuilder<List<DataPoint>, DataPointsRequestBuilder> | |
13 | implements IEXCloudV1RestRequest<List<DataPoint>> { | |
14 | ||
15 | public KeyDataPointRequestBuilder withKey(final String key) { | |
16 |
1
1. withKey : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/datapoint/DataPointsRequestBuilder::withKey → KILLED |
return new KeyDataPointRequestBuilder(getSymbol(), key); |
17 | } | |
18 | ||
19 | @Override | |
20 | public RestRequest<List<DataPoint>> build() { | |
21 |
1
1. build : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/datapoint/DataPointsRequestBuilder::build → KILLED |
return RestRequestBuilder.<List<DataPoint>>builder() |
22 | .withPath("/data-points/{symbol}") | |
23 | .addPathParam("symbol", getSymbol()).get() | |
24 | .withResponse(new GenericType<List<DataPoint>>() {}) | |
25 | .build(); | |
26 | } | |
27 | ||
28 | public static class KeyDataPointRequestBuilder implements IEXCloudV1RestRequest<String> { | |
29 | ||
30 | private final String symbol; | |
31 | private final String key; | |
32 | ||
33 | public KeyDataPointRequestBuilder(final String symbol, final String key) { | |
34 | this.symbol = symbol; | |
35 | this.key = key; | |
36 | } | |
37 | ||
38 | @Override | |
39 | public RestRequest<String> build() { | |
40 |
1
1. build : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/datapoint/DataPointsRequestBuilder$KeyDataPointRequestBuilder::build → KILLED |
return RestRequestBuilder.<String>builder() |
41 | .withPath("/data-points/{symbol}/{key}") | |
42 | .addPathParam("symbol", symbol) | |
43 | .addPathParam("key", key).get() | |
44 | .withResponse(String.class) | |
45 | .build(); | |
46 | } | |
47 | ||
48 | } | |
49 | ||
50 | } | |
Mutations | ||
16 |
1.1 |
|
21 |
1.1 |
|
40 |
1.1 |