gds-api-adapters 10.7.0 → 10.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,14 @@ module GdsApi
10
10
  rescue GdsApi::HTTPNotFound
11
11
  raise PerformancePlatformDatasetNotConfigured, "Dataset for slug [#{slug}] not set up"
12
12
  end
13
+
14
+ def corporate_content_problem_report_count(entries)
15
+ post_json!("#{endpoint}/data/gov-uk-content/feedback-count", entries)
16
+ end
17
+
18
+ def corporate_content_urls_with_the_most_problem_reports(entries)
19
+ post_json!("#{endpoint}/data/gov-uk-content/top-urls", entries)
20
+ end
13
21
  end
14
22
  end
15
23
  end
@@ -10,6 +10,18 @@ module GdsApi
10
10
  post_stub.to_return(:status => 200)
11
11
  end
12
12
 
13
+ def stub_corporate_content_problem_report_count_submission(submissions = nil)
14
+ post_stub = stub_http_request(:post, "#{PP_DATA_IN_ENDPOINT}/data/gov-uk-content/feedback-count")
15
+ post_stub.with(body: submissions.to_json) unless submissions.nil?
16
+ post_stub.to_return(:status => 200)
17
+ end
18
+
19
+ def stub_corporate_content_urls_with_the_most_problem_reports_submission(submissions = nil)
20
+ post_stub = stub_http_request(:post, "#{PP_DATA_IN_ENDPOINT}/data/gov-uk-content/top-urls")
21
+ post_stub.with(body: submissions.to_json) unless submissions.nil?
22
+ post_stub.to_return(:status => 200)
23
+ end
24
+
13
25
  def stub_service_feedback_bucket_unavailable_for(slug)
14
26
  stub_request(:post, "#{PP_DATA_IN_ENDPOINT}/data/#{slug}/customer-satisfaction").to_return(:status => 404)
15
27
  end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '10.7.0'
2
+ VERSION = '10.8.0'
3
3
  end
@@ -20,6 +20,26 @@ describe GdsApi::PerformancePlatform::DataIn do
20
20
  assert_requested(stub_post)
21
21
  end
22
22
 
23
+ it "can submit entries counts for corporate content problem reports" do
24
+ entries = ["some", "entries"]
25
+
26
+ stub_post = stub_corporate_content_problem_report_count_submission(entries)
27
+
28
+ @api.corporate_content_problem_report_count(entries)
29
+
30
+ assert_requested(stub_post)
31
+ end
32
+
33
+ it "can submit the corporate content urls with the most problem reports" do
34
+ entries = ["some", "entries"]
35
+
36
+ stub_post = stub_corporate_content_urls_with_the_most_problem_reports_submission(entries)
37
+
38
+ @api.corporate_content_urls_with_the_most_problem_reports(entries)
39
+
40
+ assert_requested(stub_post)
41
+ end
42
+
23
43
  it "throws an exception when the support app isn't available" do
24
44
  stub_pp_isnt_available
25
45
  assert_raises(GdsApi::HTTPErrorResponse) { @api.submit_service_feedback_day_aggregate("doesnt_matter", {}) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.7.0
4
+ version: 10.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -376,7 +376,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
376
376
  version: '0'
377
377
  segments:
378
378
  - 0
379
- hash: -4476224708678034802
379
+ hash: 1895053804403919519
380
380
  required_rubygems_version: !ruby/object:Gem::Requirement
381
381
  none: false
382
382
  requirements:
@@ -385,7 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
385
385
  version: '0'
386
386
  segments:
387
387
  - 0
388
- hash: -4476224708678034802
388
+ hash: 1895053804403919519
389
389
  requirements: []
390
390
  rubyforge_project:
391
391
  rubygems_version: 1.8.23