Class: GdsApi::PublishingApi

Inherits:
Base
  • Object
show all
Defined in:
lib/gds_api/publishing_api.rb,
lib/gds_api/publishing_api/special_route_publisher.rb

Defined Under Namespace

Classes: SpecialRoutePublisher

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#client, #create_client, #get_list!, #initialize, #url_for_slug

Constructor Details

This class inherits a constructor from GdsApi::Base

Instance Method Details

#destroy_intent(base_path) ⇒ Object



18
19
20
21
22
# File 'lib/gds_api/publishing_api.rb', line 18

def destroy_intent(base_path)
  delete_json!(intent_url(base_path))
rescue GdsApi::HTTPNotFound => e
  e
end

#put_content_item(base_path, payload) ⇒ Object



10
11
12
# File 'lib/gds_api/publishing_api.rb', line 10

def put_content_item(base_path, payload)
  put_json!(content_item_url(base_path), payload)
end

#put_draft_content_item(base_path, payload) ⇒ Object



6
7
8
# File 'lib/gds_api/publishing_api.rb', line 6

def put_draft_content_item(base_path, payload)
  put_json!(draft_content_item_url(base_path), payload)
end

#put_intent(base_path, payload) ⇒ Object



14
15
16
# File 'lib/gds_api/publishing_api.rb', line 14

def put_intent(base_path, payload)
  put_json!(intent_url(base_path), payload)
end

#put_path(base_path, payload) ⇒ Object



24
25
26
# File 'lib/gds_api/publishing_api.rb', line 24

def put_path(base_path, payload)
  put_json!(paths_url(base_path), payload)
end