mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +01:00
Bump data client library version (#2926)
* Bump data client library version * Fix tests * Add javadocs
This commit is contained in:
parent
5419733299
commit
98d28c60a2
11 changed files with 48 additions and 22 deletions
|
|
@ -857,7 +857,7 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
|
|||
|
||||
private Date parseMWDate(String mwDate) {
|
||||
try {
|
||||
return DateUtil.getIso8601DateFormat().parse(mwDate);
|
||||
return DateUtil.iso8601DateParse(mwDate);
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import fr.free.nrw.commons.nearby.Place;
|
|||
import fr.free.nrw.commons.nearby.model.NearbyResponse;
|
||||
import fr.free.nrw.commons.nearby.model.NearbyResultItem;
|
||||
import fr.free.nrw.commons.upload.FileUtils;
|
||||
import fr.free.nrw.commons.utils.CommonsDateUtil;
|
||||
import fr.free.nrw.commons.wikidata.model.GetWikidataEditCountResponse;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.Single;
|
||||
|
|
@ -222,7 +223,7 @@ public class OkHttpJsonApiClient {
|
|||
*/
|
||||
@Nullable
|
||||
public Single<Media> getPictureOfTheDay() {
|
||||
String date = DateUtil.getIso8601DateFormatShort().format(new Date());
|
||||
String date = CommonsDateUtil.getIso8601DateFormatShort().format(new Date());
|
||||
Timber.d("Current date is %s", date);
|
||||
String template = "Template:Potd/" + date;
|
||||
return getMedia(template, true);
|
||||
|
|
@ -419,7 +420,7 @@ public class OkHttpJsonApiClient {
|
|||
Date now = new Date();
|
||||
Date startDate = new Date(now.getTime() - r.nextInt(RANDOM_SECONDS) * 1000L);
|
||||
|
||||
String rcStart = DateUtil.getIso8601DateFormat().format(startDate);
|
||||
String rcStart = DateUtil.iso8601DateFormat(startDate);
|
||||
HttpUrl.Builder urlBuilder = HttpUrl
|
||||
.parse(commonsBaseUrl)
|
||||
.newBuilder()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue