mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-14 08:11:00 +00:00
fixed resource data URL construction
This commit is contained in:
1 parent
54ae2bf5dc
commit
70d2c2d913
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -130,7 +130,7 @@ public class IgtimiConnectionFactoryImpl implements IgtimiConnectionFactory {
|
||||
public String getResourceDataUrl(TimePoint startTime, TimePoint endTime, Iterable<String> serialNumbers,
|
||||
Map<Type, Double> typeAndCompression, Account account) {
|
||||
StringBuilder url = new StringBuilder(getApiV1BaseUrl());
|
||||
url.append("&start_time=");
|
||||
url.append("resources/data?start_time=");
|
||||
url.append(startTime.asMillis());
|
||||
url.append("&end_time=");
|
||||
url.append(endTime.asMillis());
|
||||
|
||||
+2
-2
@@ -68,8 +68,8 @@ public class IgtimiConnectionImpl implements IgtimiConnection {
|
||||
public Iterable<Fix> getResourceData(TimePoint startTime, TimePoint endTime,
|
||||
Iterable<String> serialNumbers, Map<Type, Double> typeAndCompression) throws IllegalStateException, ClientProtocolException, IOException, ParseException {
|
||||
HttpClient client = getHttpClient();
|
||||
HttpGet getResources = new HttpGet(connectionFactory.getResourceDataUrl(startTime, endTime, serialNumbers, typeAndCompression, account));
|
||||
JSONObject resourceDataJson = ConnectivityUtils.getJsonFromResponse(client.execute(getResources));
|
||||
HttpGet getResourceData = new HttpGet(connectionFactory.getResourceDataUrl(startTime, endTime, serialNumbers, typeAndCompression, account));
|
||||
JSONObject resourceDataJson = ConnectivityUtils.getJsonFromResponse(client.execute(getResourceData));
|
||||
return new FixFactory().createFixes(resourceDataJson);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user