Class
ChefZero::RestBase
In:
lib/chef_zero/rest_base.rb
Parent:
Object
Methods
accepts?
already_json_response
build_uri
build_uri
call
check_api_version
create_data
create_data_dir
data_store
delete_data
delete_data_dir
error
exists_data?
exists_data_dir?
get_data
get_data_or_else
hashify_list
json_only
json_response
list_data
list_data_or_else
new
parse_json
policy_name_invalid?
populate_defaults
set_data
text_response
to_json
Attributes
server
[R]
Public Class methods
build_uri
(base_uri, rest_path)
new
(server)
Public Instance methods
accepts?
(request, category, type)
already_json_response
(response_code, json_text, request_version=0, response_version=0)
build_uri
(base_uri, rest_path)
To be called from inside rest endpoints
call
(request)
check_api_version
(request)
create_data
(request, rest_path, name, data, *options)
create_data_dir
(request, rest_path, name, *options)
data_store
()
delete_data
(request, rest_path=nil, *options)
delete_data_dir
(request, rest_path, *options)
error
(response_code, error, opts={})
exists_data?
(request, rest_path=nil)
exists_data_dir?
(request, rest_path=nil)
get_data
(request, rest_path=nil, *options)
get_data_or_else
(request, path, or_else_value)
hashify_list
(list)
json_only
()
json_response
(response_code, json, request_version=0, response_version=0, opts={pretty: true})
list_data
(request, rest_path=nil, *options)
list_data_or_else
(request, path, or_else_value)
parse_json
(json)
policy_name_invalid?
(name)
populate_defaults
(request, response)
set_data
(request, rest_path, data, *options)
text_response
(response_code, text)
to_json
(data)
[Validate]