Module: Wordpress::API::Tests
- Includes:
- Utils
- Defined in:
- lib/wordpress/api/tests.rb
Instance Method Summary collapse
Methods included from Utils
Instance Method Details
#get_test(id, params = {}) ⇒ Object
8 9 10 11 |
# File 'lib/wordpress/api/tests.rb', line 8 def get_test(id, params = {}) validate_params! params, [:id, :default_string, :default_int, :boolean_whitelist_defaults_to_false, :boolean_whitelist_defaults_to_true, :string_whitelist_defaults_to_foo, :url, :datetime], :test object_from_response Wordpress::Object::Test.new(self), Wordpress::Request.new(:get, "/rest/v1/test/#{id}", params) end |
#post_test(id, params = {}) ⇒ Object
13 14 15 16 |
# File 'lib/wordpress/api/tests.rb', line 13 def post_test(id, params = {}) validate_params! params, [:id, :default_string, :default_int, :boolean_whitelist_defaults_to_false, :boolean_whitelist_defaults_to_true, :string_whitelist_defaults_to_foo, :url, :datetime], :test object_from_response Wordpress::Object::Test.new(self), Wordpress::Request.new(:post, "/rest/v1/test/#{id}", params) end |