-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change source for
GdsApi.worldwide.world_location
method
This method currently returns data retrieved from the Whitehall API, which is being deprecated. Therefore updating the method to get the data from the World Content Item. We need to transform the response to ensure the output remains backwards compatible with previous versions of this gem. ==== Example: Response using Whitehall API ``` => {"id"=>"https://www.gov.uk/api/world-locations/france", "title"=>"France", "format"=>"World location", "updated_at"=>"2017-08-28T09:40:55.000+01:00", "web_url"=>"https://www.gov.uk/world/france", "analytics_identifier"=>"WL48", "details"=>{"slug"=>"france", "iso2"=>"FR"}, "organisations"=>{"id"=>"https://www.gov.uk/api/world-locations/france/organisations", "web_url"=>"https://www.gov.uk/world/france#organisations"}, "content_id"=>"5e9f00ce-7706-11e4-a3cb-005056011aef", "_response_info"=>{"status"=>"ok", "links"=>[{"href"=>"https://www.gov.uk/api/world-locations/france", "rel"=>"self"}]}} ``` Response using World Content Item ``` => {"id"=>"https://www.gov.uk/world/france", "title"=>"France", "format"=>"World location", "updated_at"=>"2017-08-28T09:40:55.000+01:00", "web_url"=>"https://www.gov.uk/world/france", "analytics_identifier"=>"WL48", "details"=>{"slug"=>"france", "iso2"=>"FR"}, "organisations"=>{"id"=>"https://www.gov.uk/world/france#organisations", "web_url"=>"https://www.gov.uk/world/france#organisations"}, "content_id"=>"5e9f00ce-7706-11e4-a3cb-005056011aef"} ```
- Loading branch information
Showing
5 changed files
with
85 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters