class Contactually::Contents
Public Class Methods
new(master)
click to toggle source
# File lib/contactually/contents.rb, line 3 def initialize(master) @master = master end
Public Instance Methods
create(params = {})
click to toggle source
# File lib/contactually/contents.rb, line 7 def create(params = {}) hash = @master.call('contents.json', :post, params) Contactually::Utils.build_content(hash) end
destroy(id, params = {})
click to toggle source
# File lib/contactually/contents.rb, line 17 def destroy(id, params = {}) @master.call("contents/#{id}.json", :delete, params) end
index(params = {})
click to toggle source
# File lib/contactually/contents.rb, line 12 def index(params = {}) hash = @master.call('contents.json', :get, params) Contactually::Utils.contents_hash_to_objects(hash) end
show(id, params = {})
click to toggle source
# File lib/contactually/contents.rb, line 21 def show(id, params = {}) hash = @master.call("contents/#{id}.json", :get, params) Contactually::Utils.build_content(hash) end
update(id, params = {})
click to toggle source
# File lib/contactually/contents.rb, line 26 def update(id, params = {}) @master.call("contents/#{id}.json", :put, params) end