gds-api-adapters 88.2.0 → 90.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7adeea7abfc8234541609b17eca719cd8d39be01991cc68ca285bda907f9a96a
4
- data.tar.gz: 3e75818f4bf1a56e94089e94e341a5d8adb8f9a8e3b6faa5a8592f929355a0d9
3
+ metadata.gz: 9cffcf9f91e4d6d0e06af47378331cc2b6e3cd346c2c9248813d7741d2af80e1
4
+ data.tar.gz: 9cd9b674ae9b9cd287aadd7c1454c33b2638827c74efc8d5161ebfbcc579c3f9
5
5
  SHA512:
6
- metadata.gz: a4ae5ac10341ba1c29872cf3772be25db3cbbba4a567a09da807b6b0909c1b7dc8d5bf0acdef4dd93fc07596ea7aa5bb299709f1a11a75d062bbeeb7f1910c12
7
- data.tar.gz: b4cc259326d27d9c80b5bcf3ec25759ada42ff3f5440013e4056ff01cc44f2140b2c0d82862017ac72bcded2dd65802ca988a6261b5c7866bf5a389ce0edcc43
6
+ metadata.gz: ac0d0eabb70dec4d134e7df7ce6d9fafbb4fa667f847094d4edefe1948b436eb344fe3813f676976547f9b45e28fe917fd534e59119457a4b9319df93677e517
7
+ data.tar.gz: 20e424eb1c426c9fdda45f674d406f261d22dbd99bdee56cd98d902eeac9e2954b52b08aec061eda2ca334b35eec763045e148578d99d6a0beacb0f641a55166
@@ -157,7 +157,7 @@ module GdsApi
157
157
  end
158
158
 
159
159
  def do_request(method, url, params = nil, additional_headers = {})
160
- loggable = { request_uri: url, start_time: Time.now.to_f }
160
+ loggable = { request_uri: url, start_time: Time.now.to_f, govuk_request_id: GdsApi::GovukHeaders.headers[:govuk_request_id] }.compact
161
161
  start_logging = loggable.merge(action: "start")
162
162
  logger.debug start_logging.to_json
163
163
 
@@ -8,136 +8,72 @@ module GdsApi
8
8
 
9
9
  WORLDWIDE_API_ENDPOINT = Plek.new.website_root
10
10
 
11
- # Sets up the index endpoints for the given country slugs
12
- # The stubs are setup to paginate in chunks of 20
13
- #
14
- # This also sets up the individual endpoints for each slug
15
- # by calling stub_worldwide_api_has_location below
16
11
  def stub_worldwide_api_has_locations(location_slugs)
17
- location_slugs.each { |s| stub_worldwide_api_has_location(s) }
18
- pages = []
19
- location_slugs.each_slice(20) do |slugs|
20
- pages << slugs.map { |s| world_location_details_for_slug(s) }
12
+ international_delegation_slugs = location_slugs.select do |slug|
13
+ slug =~ /(delegation|mission)/
21
14
  end
22
15
 
23
- pages.each_with_index do |page, i|
24
- page_details = plural_response_base.merge(
25
- "results" => page,
26
- "total" => location_slugs.size,
27
- "pages" => pages.size,
28
- "current_page" => i + 1,
29
- "page_size" => 20,
30
- "start_index" => i * 20 + 1,
31
- )
32
-
33
- links = { self: "#{WORLDWIDE_API_ENDPOINT}/api/world-locations?page=#{i + 1}" }
34
- links[:next] = "#{WORLDWIDE_API_ENDPOINT}/api/world-locations?page=#{i + 2}" if pages[i + 1]
35
- links[:previous] = "#{WORLDWIDE_API_ENDPOINT}/api/world-locations?page=#{i}" unless i.zero?
36
- page_details["_response_info"]["links"] = []
37
- link_headers = []
38
- links.each do |rel, href|
39
- page_details["_response_info"]["links"] << { "rel" => rel, "href" => href }
40
- link_headers << "<#{href}>; rel=\"#{rel}\""
41
- end
42
-
43
- stub_request(:get, links[:self])
44
- .to_return(status: 200, body: page_details.to_json, headers: { "Link" => link_headers.join(", ") })
45
-
46
- next unless i.zero?
16
+ international_delegations = international_delegation_slugs.map do |slug|
17
+ {
18
+ "active": true,
19
+ "analytics_identifier": "WL1",
20
+ "content_id": "content_id_for_#{slug}",
21
+ "iso2": slug[0..1].upcase,
22
+ "name": titleize_slug(slug, title_case: true),
23
+ "slug": slug,
24
+ "updated_at": "2013-03-25T13:06:42+00:00",
25
+ }
26
+ end
47
27
 
48
- # First page exists at URL with and without page param
49
- stub_request(:get, links[:self].sub(/\?page=1/, ""))
50
- .to_return(status: 200, body: page_details.to_json, headers: { "Link" => link_headers.join(", ") })
28
+ world_locations = (location_slugs - international_delegation_slugs).map do |slug|
29
+ {
30
+ "active": true,
31
+ "analytics_identifier": "WL1",
32
+ "content_id": "content_id_for_#{slug}",
33
+ "iso2": slug[0..1].upcase,
34
+ "name": titleize_slug(slug, title_case: true),
35
+ "slug": slug,
36
+ "updated_at": "2013-03-25T13:06:42+00:00",
37
+ }
51
38
  end
52
- end
53
39
 
54
- def stub_worldwide_api_has_selection_of_locations
55
- stub_worldwide_api_has_locations %w[
56
- afghanistan
57
- angola
58
- australia
59
- bahamas
60
- belarus
61
- brazil
62
- brunei
63
- cambodia
64
- chad
65
- croatia
66
- denmark
67
- eritrea
68
- france
69
- ghana
70
- iceland
71
- japan
72
- laos
73
- luxembourg
74
- malta
75
- micronesia
76
- mozambique
77
- nicaragua
78
- panama
79
- portugal
80
- sao-tome-and-principe
81
- singapore
82
- south-korea
83
- sri-lanka
84
- uk-delegation-to-council-of-europe
85
- uk-delegation-to-organization-for-security-and-co-operation-in-europe
86
- united-kingdom
87
- venezuela
88
- vietnam
89
- ]
90
- end
40
+ content_item = {
41
+ "details": {
42
+ "international_delegation": international_delegations,
43
+ "world_locations": world_locations,
44
+ },
45
+ }
91
46
 
92
- def stub_worldwide_api_has_location(location_slug, details = nil)
93
- details ||= world_location_for_slug(location_slug)
94
- stub_request(:get, "#{WORLDWIDE_API_ENDPOINT}/api/world-locations/#{location_slug}")
95
- .to_return(status: 200, body: details.to_json)
47
+ stub_request(:get, "#{WORLDWIDE_API_ENDPOINT}/api/content/world")
48
+ .to_return(status: 200, body: content_item.to_json)
96
49
  end
97
50
 
98
- def stub_worldwide_api_does_not_have_location(location_slug)
99
- stub_request(:get, "#{WORLDWIDE_API_ENDPOINT}/api/world-locations/#{location_slug}").to_return(status: 404)
51
+ def stub_worldwide_api_has_location(location_slug)
52
+ stub_worldwide_api_has_locations([location_slug])
100
53
  end
101
54
 
102
- def stub_worldwide_api_has_organisations_for_location(location_slug, json_or_hash)
103
- json = json_or_hash.is_a?(Hash) ? json_or_hash.to_json : json_or_hash
104
- url = "#{WORLDWIDE_API_ENDPOINT}/api/world-locations/#{location_slug}/organisations"
105
- stub_request(:get, url)
106
- .to_return(status: 200, body: json, headers: { "Link" => "<#{url}; rel\"self\"" })
107
- end
55
+ def stub_search_api_has_organisations_for_location(location_slug, organisation_content_items)
56
+ response = {
57
+ "results": organisation_content_items.map do |content_item|
58
+ {
59
+ "link": content_item["base_path"],
60
+ }
61
+ end,
62
+ }
108
63
 
109
- def stub_worldwide_api_has_no_organisations_for_location(location_slug)
110
- details = { "results" => [], "total" => 0, "_response_info" => { "status" => "ok" } }
111
- url = "#{WORLDWIDE_API_ENDPOINT}/api/world-locations/#{location_slug}/organisations"
112
- stub_request(:get, url)
113
- .to_return(status: 200, body: details.to_json, headers: { "Link" => "<#{url}; rel\"self\"" })
114
- end
64
+ stub_request(:get, "#{WORLDWIDE_API_ENDPOINT}/api/search.json?filter_format=worldwide_organisation&filter_world_locations=#{location_slug}")
65
+ .to_return(status: 200, body: response.to_json)
115
66
 
116
- def world_location_for_slug(slug)
117
- singular_response_base.merge(world_location_details_for_slug(slug))
67
+ organisation_content_items.each do |content_item|
68
+ stub_content_store_has_worldwide_organisation(content_item)
69
+ end
118
70
  end
119
71
 
120
- # Constructs a sample world_location
121
- #
122
- # if the slug contains 'delegation' or 'mission' the format will be set to 'International delegation'
123
- # othersiwe it will be set to 'World location'
124
- def world_location_details_for_slug(slug)
125
- {
126
- "id" => "https://www.gov.uk/api/world-locations/#{slug}",
127
- "title" => titleize_slug(slug, title_case: true),
128
- "format" => (slug =~ /(delegation|mission)/ ? "International delegation" : "World location"),
129
- "updated_at" => "2013-03-25T13:06:42+00:00",
130
- "web_url" => "https://www.gov.uk/government/world/#{slug}",
131
- "details" => {
132
- "slug" => slug,
133
- "iso2" => slug[0..1].upcase,
134
- },
135
- "organisations" => {
136
- "id" => "https://www.gov.uk/api/world-locations/#{slug}/organisations",
137
- "web_url" => "https://www.gov.uk/government/world/#{slug}#organisations",
138
- },
139
- "content_id" => "content_id_for_#{slug}",
140
- }
72
+ def stub_content_store_has_worldwide_organisation(content_item)
73
+ base_path = content_item["base_path"]
74
+
75
+ stub_request(:get, "#{WORLDWIDE_API_ENDPOINT}/api/content#{base_path}")
76
+ .to_return(status: 200, body: content_item.to_json)
141
77
  end
142
78
  end
143
79
  end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "88.2.0".freeze
2
+ VERSION = "90.0.0".freeze
3
3
  end
@@ -2,15 +2,25 @@ require_relative "base"
2
2
 
3
3
  class GdsApi::Worldwide < GdsApi::Base
4
4
  def world_locations
5
- get_list("#{base_url}/world-locations")
5
+ all_world_locations
6
6
  end
7
7
 
8
8
  def world_location(location_slug)
9
- get_json("#{base_url}/world-locations/#{location_slug}")
9
+ world_location = all_world_locations.find do |location|
10
+ location.dig("details", "slug") == location_slug
11
+ end
12
+
13
+ raise GdsApi::HTTPNotFound, 404 unless world_location
14
+
15
+ world_location
10
16
  end
11
17
 
12
18
  def organisations_for_world_location(location_slug)
13
- get_list("#{base_url}/world-locations/#{location_slug}/organisations")
19
+ worldwide_organisations = worldwide_organisations_for_location(location_slug)
20
+
21
+ worldwide_organisations.map do |organisation|
22
+ worldwide_organisation(organisation["link"])
23
+ end
14
24
  end
15
25
 
16
26
  private
@@ -18,4 +28,118 @@ private
18
28
  def base_url
19
29
  "#{endpoint}/api"
20
30
  end
31
+
32
+ def all_world_locations
33
+ content_item = JSON.parse(get_raw("#{base_url}/content/world"))
34
+
35
+ world_locations = format_locations(content_item.dig("details", "world_locations"), "World location")
36
+ international_delegations = format_locations(content_item.dig("details", "international_delegations"), "International delegation")
37
+
38
+ Array(world_locations) + Array(international_delegations)
39
+ end
40
+
41
+ def format_locations(locations, type)
42
+ locations&.map do |location|
43
+ {
44
+ "id" => "#{Plek.new.website_root}/world/#{location['slug']}",
45
+ "title" => location["name"],
46
+ "format" => type,
47
+ "updated_at" => location["updated_at"],
48
+ "web_url" => "#{Plek.new.website_root}/world/#{location['slug']}",
49
+ "analytics_identifier" => location["analytics_identifier"],
50
+ "details" => {
51
+ "slug" => location["slug"],
52
+ "iso2" => location["iso2"],
53
+ },
54
+ "organisations" => {
55
+ "id" => "#{Plek.new.website_root}/world/#{location['slug']}#organisations",
56
+ "web_url" => "#{Plek.new.website_root}/world/#{location['slug']}#organisations",
57
+ },
58
+ "content_id" => location["content_id"],
59
+ }
60
+ end
61
+ end
62
+
63
+ def worldwide_organisations_for_location(world_location)
64
+ search_results = JSON.parse(get_raw("#{base_url}/search.json?filter_format=worldwide_organisation&filter_world_locations=#{world_location}"))
65
+
66
+ search_results["results"]
67
+ end
68
+
69
+ def worldwide_organisation(path)
70
+ content_item = JSON.parse(get_raw("#{base_url}/content#{path}"))
71
+
72
+ {
73
+ "id" => "#{Plek.new.website_root}#{path}",
74
+ "title" => content_item["title"],
75
+ "format" => "Worldwide Organisation",
76
+ "updated_at" => content_item["updated_at"],
77
+ "web_url" => "#{Plek.new.website_root}#{path}",
78
+ "details" => {
79
+ "slug" => path.gsub("/world/organisations/", ""),
80
+ },
81
+ "analytics_identifier" => content_item["analytics_identifier"],
82
+ "offices" => {
83
+ "main" => format_office(content_item.dig("links", "main_office", 0)),
84
+ "other" => content_item.dig("links", "home_page_offices")&.map do |office|
85
+ format_office(office)
86
+ end || [],
87
+ },
88
+ "sponsors" => content_item.dig("links", "sponsoring_organisations")&.map do |sponsor|
89
+ format_sponsor(sponsor)
90
+ end || [],
91
+ }
92
+ end
93
+
94
+ def format_office(office)
95
+ return {} unless office
96
+
97
+ contact = office.dig("links", "contact", 0)
98
+
99
+ {
100
+ "title" => office["title"],
101
+ "format" => "World Office",
102
+ "updated_at" => office["public_updated_at"],
103
+ "web_url" => office["web_url"],
104
+ "details" => {
105
+ "email" => contact&.dig("details", "email_addresses"),
106
+ "description" => contact&.dig("details", "description"),
107
+ "contact_form_url" => contact&.dig("details", "contact_form_links"),
108
+ "access_and_opening_times" => office.dig("details", "access_and_opening_times"),
109
+ "type" => office.dig("details", "type"),
110
+ },
111
+ "address" => {
112
+ "adr" => {
113
+ "fn" => contact&.dig("details", "post_addresses", 0, "title"),
114
+ "street-address" => contact&.dig("details", "post_addresses", 0, "street_address"),
115
+ "postal-code" => contact&.dig("details", "post_addresses", 0, "postal_code"),
116
+ "locality" => contact&.dig("details", "post_addresses", 0, "locality"),
117
+ "region" => contact&.dig("details", "post_addresses", 0, "region"),
118
+ "country-name" => contact&.dig("details", "post_addresses", 0, "world_location"),
119
+ },
120
+ },
121
+ "contact_numbers" => contact&.dig("details", "phone_numbers")&.map do |phone_number|
122
+ {
123
+ "label" => phone_number["title"],
124
+ "number" => phone_number["number"],
125
+ }
126
+ end,
127
+ "services" => contact&.dig("details", "services")&.map do |service|
128
+ {
129
+ title: service["title"],
130
+ type: service["type"],
131
+ }
132
+ end,
133
+ }
134
+ end
135
+
136
+ def format_sponsor(sponsor)
137
+ {
138
+ "title" => sponsor["title"],
139
+ "web_url" => sponsor["web_url"],
140
+ "details" => {
141
+ "acronym" => sponsor.dig("details", "acronym"),
142
+ },
143
+ }
144
+ end
21
145
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 88.2.0
4
+ version: 90.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '5.11'
131
+ version: '5.19'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '5.11'
138
+ version: '5.19'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: minitest-around
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '2.0'
159
+ version: '2.1'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '2.0'
166
+ version: '2.1'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: pact
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -268,14 +268,14 @@ dependencies:
268
268
  requirements:
269
269
  - - '='
270
270
  - !ruby/object:Gem::Version
271
- version: 4.10.0
271
+ version: 4.12.0
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - '='
277
277
  - !ruby/object:Gem::Version
278
- version: 4.10.0
278
+ version: 4.12.0
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: simplecov
281
281
  requirement: !ruby/object:Gem::Requirement
@@ -398,7 +398,6 @@ files:
398
398
  - test/fixtures/old_policies_for_dwp.json
399
399
  - test/fixtures/services_and_info_fixture.json
400
400
  - test/fixtures/sub_sector_organisations.json
401
- - test/fixtures/world_organisations_australia.json
402
401
  homepage: http://github.com/alphagov/gds-api-adapters
403
402
  licenses: []
404
403
  metadata: {}
@@ -417,7 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
417
416
  - !ruby/object:Gem::Version
418
417
  version: '0'
419
418
  requirements: []
420
- rubygems_version: 3.4.13
419
+ rubygems_version: 3.4.17
421
420
  signing_key:
422
421
  specification_version: 4
423
422
  summary: Adapters to work with GDS APIs
@@ -1,490 +0,0 @@
1
- {
2
- "results": [
3
- {
4
- "id": "https://www.gov.uk/api/worldwide-organisations/uk-trade-investment-australia",
5
- "title": "UK Trade & Investment Australia",
6
- "format": "Worldwide Organisation",
7
- "updated_at": "2013-04-10T13:51:59+01:00",
8
- "web_url": "https://www.gov.uk/government/world/organisations/uk-trade-investment-australia",
9
- "details": {
10
- "slug": "uk-trade-investment-australia",
11
- "summary": "UK Trade & Investment (UKTI) helps UK-based companies succeed in the global economy. We also help overseas companies bring their high-quality investment to the UK’s dynamic economy.",
12
- "description": "<div class=\"govspeak\"><p>UKTI offers expertise and contacts through its extensive network of specialists in the UK, and in British embassies and other diplomatic offices around the world. We provide companies with the tools they require to be competitive on the world stage.</p>\n\n<h2 id=\"responsibilities\">Responsibilities</h2>\n\n<p>UKTI in Australia helps companies in Britain increase their competitiveness through overseas trade in Australia. We also offer professional, authoritative and personalised assistance to help companies in Australia locate and expand in the UK.</p>\n\n<p>You can find out more about how we are <a href=\"https://www.gov.uk/government/priority/increasing-business-with-australia\" title=\"GOV.UK website\">increasing business with Australia</a>.</p></div>",
13
- "services": "<div class=\"govspeak\"><h2 id=\"start-a-business-in-the-uk\">Start a business in the UK</h2>\n\n<p><abbr title=\"UK Trade &amp; Investment\">UKTI</abbr> offers dedicated, professional, personalised assistance to help you locate and expand your business in the UK, <a rel=\"external\" href=\"http://www.ukti.gov.uk/invest.html?guid=none\" title=\"UKTI website\">read about our investment services</a> or contact our office in Australia to find out more.</p>\n\n<h2 id=\"export-from-the-uk\">Export from the UK</h2>\n\n<p><abbr title=\"UK Trade &amp; Investment\">UKTI</abbr> can assist you on every step of the exporting journey in both the UK and overseas, <a rel=\"external\" href=\"http://www.ukti.gov.uk/export.html\" title=\"UKTI website\">read about our exporting services</a> or contact our office in Australia.</p>\n\n<h2 id=\"events\">Events</h2>\n\n<p><abbr title=\"UK Trade &amp; Investment\">UKTI</abbr> and its partners stage events in the UK and abroad to help companies looking to export. You can <a rel=\"external\" href=\"http://www.ukti.gov.uk/export/eventssearch.html\" title=\"UKTI website\">browse scheduled events and register for alerts</a>.</p>\n\n<h2 id=\"business-opportunities\">Business opportunities</h2>\n\n<p><abbr title=\"UK Trade &amp; Investment\">UKTI</abbr> is always looking to provide an international network of opportunities for UK Companies looking to export. You can <a rel=\"external\" href=\"http://www.ukti.gov.uk/en_gb/export/howwehelp/businessopportunityalerts.html\" title=\"UKTI website\">search these opportunities and register for alerts</a>.</p></div>"
14
- },
15
- "offices": {
16
- "main": {
17
- "title": "UK Trade & Investment, Sydney",
18
- "format": "World Office",
19
- "updated_at": "2013-03-25T10:37:53+00:00",
20
- "details": {
21
- "email": "",
22
- "description": "",
23
- "contact_form_url": "",
24
- "type": "Other"
25
- },
26
- "address": {
27
- "adr": {
28
- "fn": "British Consulate",
29
- "street-address": "Level 16, Gateway Building\r\n1 Macquarie Place",
30
- "postal-code": "2000",
31
- "locality": "Sydney",
32
- "region": "New South Wales",
33
- "country-name": "Australia"
34
- },
35
- "label": {
36
- "value": "British Consulate\nLevel 16, Gateway Building\r\n1 Macquarie Place\nSydney New South Wales 2000\nAustralia"
37
- }
38
- },
39
- "contact_numbers": [
40
- {
41
- "label": "Switchboard",
42
- "number": "+61 (0) 2 9247 7521 "
43
- }
44
- ],
45
- "services": [ ]
46
- },
47
- "other": [
48
- {
49
- "title": "UK Trade & Investment Brisbane",
50
- "format": "World Office",
51
- "updated_at": "2013-03-25T10:37:53+00:00",
52
- "details": {
53
- "email": "",
54
- "description": "",
55
- "contact_form_url": "",
56
- "type": "Other"
57
- },
58
- "address": {
59
- "adr": {
60
- "fn": "British Consulate",
61
- "street-address": "Level 9, 100 Eagle Street",
62
- "postal-code": "4000",
63
- "locality": "Brisbane",
64
- "region": "Queensland",
65
- "country-name": "Australia"
66
- },
67
- "label": {
68
- "value": "British Consulate\nLevel 9, 100 Eagle Street\nBrisbane Queensland 4000\nAustralia"
69
- }
70
- },
71
- "contact_numbers": [
72
- {
73
- "label": "Switchboard",
74
- "number": "+61 (0) 7 3223 3200 "
75
- }
76
- ],
77
- "services": [ ]
78
- },
79
- {
80
- "title": "UK Trade & Investment Melbourne",
81
- "format": "World Office",
82
- "updated_at": "2013-03-25T10:37:53+00:00",
83
- "details": {
84
- "email": "",
85
- "description": "",
86
- "contact_form_url": "",
87
- "type": "Other"
88
- },
89
- "address": {
90
- "adr": {
91
- "fn": "British Consulate",
92
- "street-address": "17th Floor, 90 Collins Street",
93
- "postal-code": "",
94
- "locality": "Melbourne",
95
- "region": "Victoria",
96
- "country-name": "Australia"
97
- },
98
- "label": {
99
- "value": "British Consulate\n17th Floor, 90 Collins Street\nMelbourne Victoria \nAustralia"
100
- }
101
- },
102
- "contact_numbers": [
103
- {
104
- "label": "Switchboard",
105
- "number": "+61 (0) 3 9652 1600 "
106
- }
107
- ],
108
- "services": [ ]
109
- },
110
- {
111
- "title": "UK Trade & Investment Perth",
112
- "format": "World Office",
113
- "updated_at": "2013-03-25T10:37:53+00:00",
114
- "details": {
115
- "email": "",
116
- "description": "",
117
- "contact_form_url": "",
118
- "type": "Other"
119
- },
120
- "address": {
121
- "adr": {
122
- "fn": "British Consulate",
123
- "street-address": "Level 12, 251 Adelaide Terrace Perth",
124
- "postal-code": "",
125
- "locality": "Perth",
126
- "region": "Western Australia",
127
- "country-name": "Australia"
128
- },
129
- "label": {
130
- "value": "British Consulate\nLevel 12, 251 Adelaide Terrace Perth\nPerth Western Australia \nAustralia"
131
- }
132
- },
133
- "contact_numbers": [
134
- {
135
- "label": "Switchboard",
136
- "number": "+61 (0) 8 9224 4700 "
137
- }
138
- ],
139
- "services": [ ]
140
- },
141
- {
142
- "title": "Director of Investment, Australia and New Zealand",
143
- "format": "World Office",
144
- "updated_at": "2013-03-25T10:37:53+00:00",
145
- "details": {
146
- "email": "paul.webster@fco.gov.uk ",
147
- "description": "",
148
- "contact_form_url": "",
149
- "type": "Other"
150
- },
151
- "address": {
152
- "adr": {
153
- "fn": "Paul Webster",
154
- "street-address": "Level 16, Gateway Building\r\n1 Macquarie Place",
155
- "postal-code": "2000",
156
- "locality": "Sydney",
157
- "region": "New South Wales",
158
- "country-name": "Australia"
159
- },
160
- "label": {
161
- "value": "Paul Webster\nLevel 16, Gateway Building\r\n1 Macquarie Place\nSydney New South Wales 2000\nAustralia"
162
- }
163
- },
164
- "contact_numbers": [
165
- {
166
- "label": "Direct line",
167
- "number": "+61 (0)2 8247 2234"
168
- }
169
- ],
170
- "services": [ ]
171
- },
172
- {
173
- "title": "Head of Investment New South Wales, ACT and Western Australia",
174
- "format": "World Office",
175
- "updated_at": "2013-03-25T10:37:53+00:00",
176
- "details": {
177
- "email": "nicky.vandomburg@fco.gov.uk ",
178
- "description": "",
179
- "contact_form_url": "",
180
- "type": "Other"
181
- },
182
- "address": {
183
- "adr": {
184
- "fn": "Nicky van Domburg",
185
- "street-address": "Level 16, Gateway Building\r\n1 Macquarie Place",
186
- "postal-code": "2000",
187
- "locality": "Sydney",
188
- "region": "New South Wales",
189
- "country-name": "Australia"
190
- },
191
- "label": {
192
- "value": "Nicky van Domburg\nLevel 16, Gateway Building\r\n1 Macquarie Place\nSydney New South Wales 2000\nAustralia"
193
- }
194
- },
195
- "contact_numbers": [
196
- {
197
- "label": "Direct line",
198
- "number": "+61 (0)2 8247 2205"
199
- }
200
- ],
201
- "services": [ ]
202
- },
203
- {
204
- "title": "Head of Investment Victoria, South Australia, Tasmania",
205
- "format": "World Office",
206
- "updated_at": "2013-03-25T10:37:53+00:00",
207
- "details": {
208
- "email": "",
209
- "description": "",
210
- "contact_form_url": "",
211
- "type": "Other"
212
- },
213
- "address": {
214
- "adr": {
215
- "fn": "Majella Hamilton",
216
- "street-address": "17th Floor, 90 Collins Street",
217
- "postal-code": "",
218
- "locality": "Melbourne",
219
- "region": "Victoria",
220
- "country-name": "Australia"
221
- },
222
- "label": {
223
- "value": "Majella Hamilton\n17th Floor, 90 Collins Street\nMelbourne Victoria \nAustralia"
224
- }
225
- },
226
- "contact_numbers": [
227
- {
228
- "label": "Direct line",
229
- "number": "+61 (0)3 9652 1621"
230
- }
231
- ],
232
- "services": [ ]
233
- },
234
- {
235
- "title": "Head of Investment Queensland and Northern Territory & Head of Institutional Investment Australia and New Zealand",
236
- "format": "World Office",
237
- "updated_at": "2013-03-25T10:37:53+00:00",
238
- "details": {
239
- "email": "craig.o'kane@fco.gov.uk ",
240
- "description": "",
241
- "contact_form_url": "",
242
- "type": "Other"
243
- },
244
- "address": {
245
- "adr": {
246
- "fn": "Craig O'Kane",
247
- "street-address": "Level 9, 100 Eagle Street\r\n",
248
- "postal-code": "4000",
249
- "locality": "Brisbane",
250
- "region": "Queensland",
251
- "country-name": "Australia"
252
- },
253
- "label": {
254
- "value": "Craig O'Kane\nLevel 9, 100 Eagle Street\r\nBrisbane Queensland 4000\nAustralia"
255
- }
256
- },
257
- "contact_numbers": [
258
- {
259
- "label": "Direct line",
260
- "number": "+61 (0)7 3223 3205"
261
- }
262
- ],
263
- "services": [ ]
264
- }
265
- ]
266
- },
267
- "sponsors": [
268
- {
269
- "title": "UK Trade & Investment",
270
- "web_url": "https://www.gov.uk/government/organisations/uk-trade-investment",
271
- "details": {
272
- "acronym": "UKTI"
273
- }
274
- }
275
- ]
276
- },
277
- {
278
- "id": "https://www.gov.uk/api/worldwide-organisations/british-high-commission-canberra",
279
- "title": "British High Commission Canberra",
280
- "format": "Worldwide Organisation",
281
- "updated_at": "2013-03-25T06:21:38+00:00",
282
- "web_url": "https://www.gov.uk/government/world/organisations/british-high-commission-canberra",
283
- "details": {
284
- "slug": "british-high-commission-canberra",
285
- "summary": "The UK and Australia share a longstanding relationship, as both partners and allies. ",
286
- "description": "<div class=\"govspeak\"><p>We represent the British government in its relations with the Australian government and present British policies to the Australian government and to Australians. We report and explain Australian policies to the British government and support British interests as well as co-ordinating the political, economic, environmental and commercial activities of the British government. </p>\n\n<p>We have consulate-generals in Sydney and Melbourne and consulates in Brisbane and Perth. With over one million Britons living in Australia and over 640,000 visiting every year, the consulates support British nationals if they require assistance. </p></div>",
287
- "services": "<div class=\"govspeak\"><h2 id=\"visashttpwwwukbahomeofficegovukvisas-immigration-uk-border-agency-website\"><a rel=\"external\" href=\"http://www.ukba.homeoffice.gov.uk/visas-immigration/\" title=\"UK Border Agency website\">Visas</a></h2>\n<p>For information on whether you require a visa for the United Kingdom and how to apply go to the <a rel=\"external\" href=\"http://www.ukba.homeoffice.gov.uk/visas-immigration/\" title=\"UK Border Agency website\">UK Border Agency website</a> </p>\n\n<h2 id=\"births-deaths-and-marriageshttpswwwgovukbrowsebirths-deaths-marriages-births-deaths-and-marriages\"><a href=\"https://www.gov.uk/browse/births-deaths-marriages/\" title=\"Births, deaths and marriages\">Births, deaths and marriages</a></h2>\n<p>Information on how you can register a birth or death which occurred overseas, and legal documents for couples marrying or entering into civil partnerships abroad. </p>\n\n<h2 id=\"passports-and-emergency-travel-documentshttpswwwgovukoverseas-passports-passports-and-emergency-travel-documents\"><a href=\"https://www.gov.uk/overseas-passports/\" title=\"Passports and emergency travel documents\">Passports and emergency travel documents</a></h2>\n<p>How to renew or replace your British passport when visiting the UK and information on getting replacement travel documents if your passport is lost or stolen. </p>\n\n<h2 id=\"travel-advicehttpswwwgovukforeign-travel-adviceaustralia-travel-advice\"><a href=\"https://www.gov.uk/foreign-travel-advice/australia/\" title=\"Travel advice\">Travel advice</a></h2>\n<p>Information on staying safe and avoiding problems when living or travelling abroad, with links to our embassies, high commissions and other diplomatic posts across the world. </p></div>"
288
- },
289
- "offices": {
290
- "main": {
291
- "title": "British High Commission Canberra",
292
- "format": "World Office",
293
- "updated_at": "2013-03-25T10:37:54+00:00",
294
- "details": {
295
- "email": "",
296
- "description": "Opening Hours:\r\nMonday to Friday, 8.45am to 12.30pm/1.30pm to 5.00pm",
297
- "contact_form_url": "",
298
- "type": "High Commission"
299
- },
300
- "address": {
301
- "adr": {
302
- "fn": "High Commissioner: His Excellency Paul Madden",
303
- "street-address": "Commonwealth Avenue, Yarralumla",
304
- "postal-code": "2600",
305
- "locality": "Canberra",
306
- "region": "ACT",
307
- "country-name": "Australia"
308
- },
309
- "label": {
310
- "value": "High Commissioner: His Excellency Paul Madden\nCommonwealth Avenue, Yarralumla\nCanberra ACT 2600\nAustralia"
311
- }
312
- },
313
- "contact_numbers": [
314
- {
315
- "label": "Telephone:",
316
- "number": "+61 (0)2 6270 6666"
317
- }
318
- ],
319
- "services": [ ]
320
- },
321
- "other": [
322
- {
323
- "title": "British Consulate-General Sydney",
324
- "format": "World Office",
325
- "updated_at": "2013-03-25T10:37:54+00:00",
326
- "details": {
327
- "email": "",
328
- "description": "Opening Hours:\r\nMonday to Friday: 9.00am to 12.30pm/1.30pm to 5.00pm\r\nConsular counter hours:\r\nMonday to Friday 9.00am to 1.00pm\r\nSwitchboard hours:\r\nMonday to Friday 9.00am to 5.00pm",
329
- "contact_form_url": "",
330
- "type": "Consulate"
331
- },
332
- "address": {
333
- "adr": {
334
- "fn": "Consul-General and Director General UK Trade & Investment: Mr Nick McInnes",
335
- "street-address": "Level 16, Gateway Building, 1 Macquarie Place",
336
- "postal-code": "2000",
337
- "locality": "Sydney",
338
- "region": "NSW",
339
- "country-name": "Australia"
340
- },
341
- "label": {
342
- "value": "Consul-General and Director General UK Trade & Investment: Mr Nick McInnes\nLevel 16, Gateway Building, 1 Macquarie Place\nSydney NSW 2000\nAustralia"
343
- }
344
- },
345
- "contact_numbers": [
346
- {
347
- "label": "Telephone:",
348
- "number": "+61 (0) 9247 7521"
349
- }
350
- ],
351
- "services": [ ]
352
- },
353
- {
354
- "title": "British Consulate-General Melbourne",
355
- "format": "World Office",
356
- "updated_at": "2013-03-25T10:37:54+00:00",
357
- "details": {
358
- "email": "",
359
- "description": "Opening Hours:\r\nMonday to Friday 9.00am to 5.00pm \r\nPublic counter hours: \r\nMonday to Friday 10.00am to 2.00pm",
360
- "contact_form_url": "",
361
- "type": "Consulate"
362
- },
363
- "address": {
364
- "adr": {
365
- "fn": "Consul-General: Mr Gareth Hoar",
366
- "street-address": "17th Floor, 90 Collins St",
367
- "postal-code": "3000",
368
- "locality": "Melbourne",
369
- "region": "VIC",
370
- "country-name": "Australia"
371
- },
372
- "label": {
373
- "value": "Consul-General: Mr Gareth Hoar\n17th Floor, 90 Collins St\nMelbourne VIC 3000\nAustralia"
374
- }
375
- },
376
- "contact_numbers": [
377
- {
378
- "label": "Telephone:",
379
- "number": "+61 (0)3 9652 1600"
380
- }
381
- ],
382
- "services": [ ]
383
- },
384
- {
385
- "title": "British Consulate Perth",
386
- "format": "World Office",
387
- "updated_at": "2013-03-25T10:37:54+00:00",
388
- "details": {
389
- "email": "",
390
- "description": "Opening Hours Mondays to Fridays:\r\nPublic counter hours: 10.00am to 1.00pm\r\nUK Visa (biometric) appointments: 10.00am to 2.00pm\r\nSwitchboard hours: 9.00am to 4.30pm",
391
- "contact_form_url": "",
392
- "type": "Consulate"
393
- },
394
- "address": {
395
- "adr": {
396
- "fn": "Vice Consul and Head of Consular Services: Mr James Frew",
397
- "street-address": "Level 12\r\n251 Adelaide Terrace",
398
- "postal-code": "6000",
399
- "locality": "Perth",
400
- "region": "WA",
401
- "country-name": "Australia"
402
- },
403
- "label": {
404
- "value": "Vice Consul and Head of Consular Services: Mr James Frew\nLevel 12\r\n251 Adelaide Terrace\nPerth WA 6000\nAustralia"
405
- }
406
- },
407
- "contact_numbers": [
408
- {
409
- "label": "Telephone:",
410
- "number": "+61 (0)8 9224 4700"
411
- }
412
- ],
413
- "services": [
414
- {
415
- "title": "Emergency Travel Documents service",
416
- "type": "Assistance Services"
417
- },
418
- {
419
- "title": "Transferring funds for prisoners / for financial assistance service",
420
- "type": "Assistance Services"
421
- },
422
- {
423
- "title": "Marriage or Civil Partnership registrations",
424
- "type": "Documentary Services"
425
- },
426
- {
427
- "title": "Citizenship Ceremony service",
428
- "type": "Documentary Services"
429
- }
430
- ]
431
- },
432
- {
433
- "title": "British Consulate Brisbane",
434
- "format": "World Office",
435
- "updated_at": "2013-03-25T10:37:54+00:00",
436
- "details": {
437
- "email": "",
438
- "description": "Opening Hours Mondays to Fridays:\r\nCounter hours: 10.00am to 3.00pm\r\nSwitchboard hours: 9.30am to 4.30pm",
439
- "contact_form_url": "",
440
- "type": "Consulate"
441
- },
442
- "address": {
443
- "adr": {
444
- "fn": "Vice Consul and Head of Consular Services: Mrs Megan Hunt",
445
- "street-address": "Level 9\r\n100 Eagle Street \r\n",
446
- "postal-code": "4000",
447
- "locality": "Brisbane",
448
- "region": "QLD",
449
- "country-name": "Australia"
450
- },
451
- "label": {
452
- "value": "Vice Consul and Head of Consular Services: Mrs Megan Hunt\nLevel 9\r\n100 Eagle Street \r\nBrisbane QLD 4000\nAustralia"
453
- }
454
- },
455
- "contact_numbers": [
456
- {
457
- "label": "Telephone:",
458
- "number": "+61 (0)7 3223 3200"
459
- }
460
- ],
461
- "services": [ ]
462
- }
463
- ]
464
- },
465
- "sponsors": [
466
- {
467
- "title": "Foreign & Commonwealth Office",
468
- "web_url": "https://www.gov.uk/government/organisations/foreign-commonwealth-office",
469
- "details": {
470
- "acronym": "FCO"
471
- }
472
- }
473
- ]
474
- }
475
- ],
476
- "current_page": 1,
477
- "total": 2,
478
- "pages": 1,
479
- "page_size": 20,
480
- "start_index": 1,
481
- "_response_info": {
482
- "status": "ok",
483
- "links": [
484
- {
485
- "href": "https://www.gov.uk/api/world-locations/australia/organisations?page=1",
486
- "rel": "self"
487
- }
488
- ]
489
- }
490
- }