jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/389559 )
Change subject: Add geo coordinates to summary 2.0 response
......................................................................
Add geo coordinates to summary 2.0 response
This should have been in Ia8d3b03d but was overlooked.
Bug: T178333
Change-Id: I313e0fd0c136e8fbd5957b408baab0ce8ca5998b
---
M lib/mobile-util.js
M spec.yaml
2 files changed, 15 insertions(+), 11 deletions(-)
Approvals:
BearND: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 4104abb..dd73585 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -256,6 +256,10 @@
revision: lead.revision,
timestamp: lead.lastmodified,
description: lead.description,
+ coordinates: lead.geo && {
+ lat: lead.geo.latitude,
+ lon: lead.geo.longitude
+ },
content_urls: mUtil.buildContentUrls(domain, title, lead),
api_urls: mUtil.buildApiUrls(domain, title, lead),
}, summary);
diff --git a/spec.yaml b/spec.yaml
index c3726d6..c009d74 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -898,17 +898,17 @@
$ref: '#/definitions/content_urls'
api_urls:
$ref: '#/definitions/api_urls'
-# coordinates:
-# type: object
-# description: The coordinates of the item
-# properties:
-# lat:
-# type: number
-# description: The latitude
-# lon:
-# type: number
-# description: The longitude
-# requiredProperties: [ 'lat', 'lon' ]
+ coordinates:
+ type: object
+ description: The coordinates of the item
+ properties:
+ lat:
+ type: number
+ description: The latitude
+ lon:
+ type: number
+ description: The longitude
+ requiredProperties: [ 'lat', 'lon' ]
required:
- type
- title
--
To view, visit https://gerrit.wikimedia.org/r/389559
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I313e0fd0c136e8fbd5957b408baab0ce8ca5998b
Gerrit-PatchSet: 1
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: GWicke <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
Gerrit-Reviewer: Mobrovac <[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