jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/396095 )
Change subject: Summary: fix geo coordinates
......................................................................
Summary: fix geo coordinates
These were always coming back empty since we were looking for the wrong
keys in the MW API metadata response. Not sure how this regressed.
Updated the spec examples to include an example with coordinates so that
our regular testing will check for regressions here.
Change-Id: If36017dffb8212f3537c5a27e6dba2c520911138
---
M lib/mobile-util.js
M spec.yaml
2 files changed, 7 insertions(+), 4 deletions(-)
Approvals:
BearND: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 46a6c66..c0ea99b 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -243,8 +243,8 @@
timestamp: meta.lastmodified,
description: meta.description,
coordinates: meta.geo && {
- lat: meta.geo.lat,
- lon: meta.geo.lon
+ lat: meta.geo.latitude,
+ lon: meta.geo.longitude
},
content_urls: mUtil.buildContentUrls(domain, title, meta),
api_urls: mUtil.buildApiUrls(domain, title, meta),
diff --git a/spec.yaml b/spec.yaml
index ed54015..8f13170 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -667,11 +667,11 @@
schema:
$ref: '#/definitions/problem'
x-amples:
- - title: Get summary for Barack Obama
+ - title: Get summary for Manitowoc, Wisconsin
request:
params:
domain: en.wikipedia.org
- title: Barack_Obama
+ title: Manitowoc,_Wisconsin
response:
status: 200
headers:
@@ -702,6 +702,9 @@
revision: /.+/
tid: /.+/
timestamp: /.+/
+ coordinates:
+ lat: /.+/
+ lon: /.+/
description: /.+/
content_urls:
desktop:
--
To view, visit https://gerrit.wikimedia.org/r/396095
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If36017dffb8212f3537c5a27e6dba2c520911138
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Fjalapeno <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
Gerrit-Reviewer: Ppchelko <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits