1 | package pl.zankowski.iextrading4j.client.rest.request.stocks; | |
2 | ||
3 | import pl.zankowski.iextrading4j.api.stocks.ShortInterest; | |
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.IEXApiRestRequest; | |
7 | ||
8 | import javax.ws.rs.core.GenericType; | |
9 | import java.time.LocalDate; | |
10 | import java.util.List; | |
11 | ||
12 | import static pl.zankowski.iextrading4j.client.rest.request.util.RequestUtil.IEX_DATE_FORMATTER; | |
13 | ||
14 | /** | |
15 | * @deprecated Old IEX API service https://iextrading.com/developer/ | |
16 | */ | |
17 | @Deprecated | |
18 | public class ShortInterestRequestBuilder extends AbstractStocksRequestBuilder<List<ShortInterest>, ShortInterestRequestBuilder> | |
19 | implements IEXApiRestRequest<List<ShortInterest>> { | |
20 | ||
21 | private String date; | |
22 | ||
23 | public String getDate() { | |
24 |
2
1. getDate : negated conditional → KILLED 2. getDate : replaced return value with "" for pl/zankowski/iextrading4j/client/rest/request/stocks/ShortInterestRequestBuilder::getDate → KILLED |
return date == null ? "" : date; |
25 | } | |
26 | ||
27 | public ShortInterestRequestBuilder withDate(final LocalDate date) { | |
28 | this.date = IEX_DATE_FORMATTER.format(date); | |
29 |
1
1. withDate : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/stocks/ShortInterestRequestBuilder::withDate → KILLED |
return this; |
30 | } | |
31 | ||
32 | public ShortInterestRequestBuilder withSample() { | |
33 | this.date = "sample"; | |
34 |
1
1. withSample : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/stocks/ShortInterestRequestBuilder::withSample → KILLED |
return this; |
35 | } | |
36 | ||
37 | public ShortInterestRequestBuilder withMarket() { | |
38 |
1
1. withMarket : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/stocks/ShortInterestRequestBuilder::withMarket → KILLED |
return withSymbol("market"); |
39 | } | |
40 | ||
41 | @Override | |
42 | public RestRequest<List<ShortInterest>> build() { | |
43 |
1
1. build : replaced return value with null for pl/zankowski/iextrading4j/client/rest/request/stocks/ShortInterestRequestBuilder::build → KILLED |
return RestRequestBuilder.<List<ShortInterest>>builder() |
44 | .withPath("/stock/{symbol}/short-interest/{date}") | |
45 | .addPathParam("symbol", getSymbol()) | |
46 | .addPathParam("date", getDate()).get() | |
47 | .withResponse(new GenericType<List<ShortInterest>>() { | |
48 | }) | |
49 | .build(); | |
50 | } | |
51 | } | |
Mutations | ||
24 |
1.1 2.2 |
|
29 |
1.1 |
|
34 |
1.1 |
|
38 |
1.1 |
|
43 |
1.1 |