Class: GdsApi::ContentStore
Defined Under Namespace
Classes: ItemNotFound
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #content_item(base_path) ⇒ Object
- #content_item!(base_path) ⇒ Object
- #incoming_links!(base_path) ⇒ Object
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
#content_item(base_path) ⇒ Object
12 13 14 |
# File 'lib/gds_api/content_store.rb', line 12 def content_item(base_path) get_json(content_item_url(base_path)) end |
#content_item!(base_path) ⇒ Object
22 23 24 25 26 |
# File 'lib/gds_api/content_store.rb', line 22 def content_item!(base_path) get_json!(content_item_url(base_path)) rescue GdsApi::HTTPNotFound => e raise ItemNotFound.build_from(e) end |
#incoming_links!(base_path) ⇒ Object
16 17 18 19 20 |
# File 'lib/gds_api/content_store.rb', line 16 def incoming_links!(base_path) get_json!(incoming_links_url(base_path)) rescue GdsApi::HTTPNotFound => e raise ItemNotFound.build_from(e) end |