module Wordpress::API::Tests
Public Instance Methods
get_test(id, params = {})
click to toggle source
# File lib/wordpress/api/tests.rb, line 5 def get_test(id, params = {}) validate_keys! params, test_keys exec_api(Wordpress::Request.new(:get, "/rest/v1.1/test/#{id}", params)) do |json| Wordpress::Object::Test.new(self, json) end end
post_test(id, data, params = {})
click to toggle source
# File lib/wordpress/api/tests.rb, line 12 def post_test(id, data, params = {}) validate_keys! params, test_keys exec_api(Wordpress::Request.new(:post, "/rest/v1.1/test/#{id}", params, data)) do |json| Wordpress::Object::Test.new(self, json) end end
Private Instance Methods
test_keys()
click to toggle source
# File lib/wordpress/api/tests.rb, line 21 def test_keys [:id, :default_string, :default_int, :boolean_whitelist_defaults_to_false, :boolean_whitelist_defaults_to_true, :string_whitelist_defaults_to_foo, :url, :datetime].freeze end