Class: SwaggerClient::NotesApi
- Inherits:
-
Object
- Object
- SwaggerClient::NotesApi
- Defined in:
- lib/swagger_client/api/notes_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ NotesApi
constructor
A new instance of NotesApi.
-
#public_api_delete_note(note_id, api_key, opts = {}) ⇒ Object
delete a note.
-
#public_api_delete_note_with_http_info(note_id, api_key, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
delete a note.
-
#public_api_get_note(note_id, api_key, opts = {}) ⇒ PublicApiGetNoteResponse
retrieve a note.
-
#public_api_get_note_with_http_info(note_id, api_key, opts = {}) ⇒ Array<(PublicApiGetNoteResponse, Fixnum, Hash)>
retrieve a note.
-
#public_api_post_note(api_key, request, opts = {}) ⇒ PublicApiIdResponse
create a note.
-
#public_api_post_note_with_http_info(api_key, request, opts = {}) ⇒ Array<(PublicApiIdResponse, Fixnum, Hash)>
create a note.
-
#public_api_put_note(note_id, api_key, request, opts = {}) ⇒ Object
update a note Replaces all fields.
-
#public_api_put_note_with_http_info(note_id, api_key, request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
update a note Replaces all fields.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/swagger_client/api/notes_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#public_api_delete_note(note_id, api_key, opts = {}) ⇒ Object
delete a note
29 30 31 32 |
# File 'lib/swagger_client/api/notes_api.rb', line 29 def public_api_delete_note(note_id, api_key, opts = {}) data, _status_code, _headers = public_api_delete_note_with_http_info(note_id, api_key, opts) return data end |
#public_api_delete_note_with_http_info(note_id, api_key, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
delete a note
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/swagger_client/api/notes_api.rb', line 40 def public_api_delete_note_with_http_info(note_id, api_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotesApi.public_api_delete_note ..." end # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling NotesApi.public_api_delete_note" if note_id.nil? # verify the required parameter 'api_key' is set fail ArgumentError, "Missing the required parameter 'api_key' when calling NotesApi.public_api_delete_note" if api_key.nil? # resource path local_var_path = "/api/pub/v1/notes/{noteId}".sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} query_params[:'api_key'] = api_key # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#public_api_delete_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#public_api_get_note(note_id, api_key, opts = {}) ⇒ PublicApiGetNoteResponse
retrieve a note
85 86 87 88 |
# File 'lib/swagger_client/api/notes_api.rb', line 85 def public_api_get_note(note_id, api_key, opts = {}) data, _status_code, _headers = public_api_get_note_with_http_info(note_id, api_key, opts) return data end |
#public_api_get_note_with_http_info(note_id, api_key, opts = {}) ⇒ Array<(PublicApiGetNoteResponse, Fixnum, Hash)>
retrieve a note
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/swagger_client/api/notes_api.rb', line 96 def public_api_get_note_with_http_info(note_id, api_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotesApi.public_api_get_note ..." end # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling NotesApi.public_api_get_note" if note_id.nil? # verify the required parameter 'api_key' is set fail ArgumentError, "Missing the required parameter 'api_key' when calling NotesApi.public_api_get_note" if api_key.nil? # resource path local_var_path = "/api/pub/v1/notes/{noteId}".sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} query_params[:'api_key'] = api_key # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PublicApiGetNoteResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#public_api_get_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#public_api_post_note(api_key, request, opts = {}) ⇒ PublicApiIdResponse
create a note
141 142 143 144 |
# File 'lib/swagger_client/api/notes_api.rb', line 141 def public_api_post_note(api_key, request, opts = {}) data, _status_code, _headers = public_api_post_note_with_http_info(api_key, request, opts) return data end |
#public_api_post_note_with_http_info(api_key, request, opts = {}) ⇒ Array<(PublicApiIdResponse, Fixnum, Hash)>
create a note
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/swagger_client/api/notes_api.rb', line 152 def public_api_post_note_with_http_info(api_key, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotesApi.public_api_post_note ..." end # verify the required parameter 'api_key' is set fail ArgumentError, "Missing the required parameter 'api_key' when calling NotesApi.public_api_post_note" if api_key.nil? # verify the required parameter 'request' is set fail ArgumentError, "Missing the required parameter 'request' when calling NotesApi.public_api_post_note" if request.nil? # resource path local_var_path = "/api/pub/v1/notes" # query parameters query_params = {} query_params[:'api_key'] = api_key # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PublicApiIdResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#public_api_post_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#public_api_put_note(note_id, api_key, request, opts = {}) ⇒ Object
update a note Replaces all fields. To partially update a note, first retrieve it using the GET method, apply changes and submit to the PUT method.
200 201 202 203 |
# File 'lib/swagger_client/api/notes_api.rb', line 200 def public_api_put_note(note_id, api_key, request, opts = {}) data, _status_code, _headers = public_api_put_note_with_http_info(note_id, api_key, request, opts) return data end |
#public_api_put_note_with_http_info(note_id, api_key, request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
update a note Replaces all fields. To partially update a note, first retrieve it using the GET method, apply changes and submit to the PUT method.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/swagger_client/api/notes_api.rb', line 212 def public_api_put_note_with_http_info(note_id, api_key, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: NotesApi.public_api_put_note ..." end # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling NotesApi.public_api_put_note" if note_id.nil? # verify the required parameter 'api_key' is set fail ArgumentError, "Missing the required parameter 'api_key' when calling NotesApi.public_api_put_note" if api_key.nil? # verify the required parameter 'request' is set fail ArgumentError, "Missing the required parameter 'request' when calling NotesApi.public_api_put_note" if request.nil? # resource path local_var_path = "/api/pub/v1/notes/{noteId}".sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} query_params[:'api_key'] = api_key # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#public_api_put_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |