Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update data source for World Location methods #1203

Merged
merged 3 commits into from
Jul 19, 2023
Merged

Commits on Jul 18, 2023

  1. 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"}
    ```
    brucebolt committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    ca6aa61 View commit details
    Browse the repository at this point in the history
  2. Change source for GdsApi.worldwide.world_locations 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.
    
    This is a breaking change as we have removed the pagination from the
    response. This is to avoid multiple requests to the content item, when
    all the results are included anyway.
    brucebolt committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    921942f View commit details
    Browse the repository at this point in the history
  3. Release version 89.0.0

    brucebolt committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    1ab0e84 View commit details
    Browse the repository at this point in the history