Mholloway has uploaded a new change for review. ( 
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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/59/389559/1

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: newchange
Gerrit-Change-Id: I313e0fd0c136e8fbd5957b408baab0ce8ca5998b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to