Class: Forgejo::MiscellaneousApi
- Inherits:
-
Object
- Object
- Forgejo::MiscellaneousApi
- Defined in:
- lib/forgejo/api/miscellaneous_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_gitignore_template_info(name, opts = {}) ⇒ GitignoreTemplateInfo
Returns information about a gitignore template.
-
#get_gitignore_template_info_with_http_info(name, opts = {}) ⇒ Array<(GitignoreTemplateInfo, Integer, Hash)>
Returns information about a gitignore template.
-
#get_label_template_info(name, opts = {}) ⇒ Array<LabelTemplate>
Returns all labels in a template.
-
#get_label_template_info_with_http_info(name, opts = {}) ⇒ Array<(Array<LabelTemplate>, Integer, Hash)>
Returns all labels in a template.
-
#get_license_template_info(name, opts = {}) ⇒ LicenseTemplateInfo
Returns information about a license template.
-
#get_license_template_info_with_http_info(name, opts = {}) ⇒ Array<(LicenseTemplateInfo, Integer, Hash)>
Returns information about a license template.
-
#get_node_info(opts = {}) ⇒ NodeInfo
Returns the nodeinfo of the Gitea application.
-
#get_node_info_with_http_info(opts = {}) ⇒ Array<(NodeInfo, Integer, Hash)>
Returns the nodeinfo of the Gitea application.
-
#get_signing_key(opts = {}) ⇒ String
Get default signing-key.gpg.
-
#get_signing_key_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Get default signing-key.gpg.
-
#get_version(opts = {}) ⇒ ServerVersion
Returns the version of the Gitea application.
-
#get_version_with_http_info(opts = {}) ⇒ Array<(ServerVersion, Integer, Hash)>
Returns the version of the Gitea application.
-
#initialize(api_client = ApiClient.default) ⇒ MiscellaneousApi
constructor
A new instance of MiscellaneousApi.
-
#list_gitignores_templates(opts = {}) ⇒ Array<String>
Returns a list of all gitignore templates.
-
#list_gitignores_templates_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
Returns a list of all gitignore templates.
-
#list_label_templates(opts = {}) ⇒ Array<String>
Returns a list of all label templates.
-
#list_label_templates_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
Returns a list of all label templates.
-
#list_license_templates(opts = {}) ⇒ Array<LicensesTemplateListEntry>
Returns a list of all license templates.
-
#list_license_templates_with_http_info(opts = {}) ⇒ Array<(Array<LicensesTemplateListEntry>, Integer, Hash)>
Returns a list of all license templates.
-
#render_markdown(opts = {}) ⇒ String
Render a markdown document as HTML.
-
#render_markdown_raw(body, opts = {}) ⇒ String
Render raw markdown as HTML.
-
#render_markdown_raw_with_http_info(body, opts = {}) ⇒ Array<(String, Integer, Hash)>
Render raw markdown as HTML.
-
#render_markdown_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Render a markdown document as HTML.
-
#render_markup(opts = {}) ⇒ String
Render a markup document as HTML.
-
#render_markup_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Render a markup document as HTML.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MiscellaneousApi
Returns a new instance of MiscellaneousApi.
19 20 21 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_gitignore_template_info(name, opts = {}) ⇒ GitignoreTemplateInfo
Returns information about a gitignore template
26 27 28 29 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 26 def get_gitignore_template_info(name, opts = {}) data, _status_code, _headers = get_gitignore_template_info_with_http_info(name, opts) data end |
#get_gitignore_template_info_with_http_info(name, opts = {}) ⇒ Array<(GitignoreTemplateInfo, Integer, Hash)>
Returns information about a gitignore template
35 36 37 38 39 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 78 79 80 81 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 35 def get_gitignore_template_info_with_http_info(name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.get_gitignore_template_info ...' end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling MiscellaneousApi.get_gitignore_template_info" end # resource path local_var_path = '/gitignore/templates/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GitignoreTemplateInfo' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.get_gitignore_template_info", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#get_gitignore_template_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_label_template_info(name, opts = {}) ⇒ Array<LabelTemplate>
Returns all labels in a template
87 88 89 90 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 87 def get_label_template_info(name, opts = {}) data, _status_code, _headers = get_label_template_info_with_http_info(name, opts) data end |
#get_label_template_info_with_http_info(name, opts = {}) ⇒ Array<(Array<LabelTemplate>, Integer, Hash)>
Returns all labels in a template
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 134 135 136 137 138 139 140 141 142 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 96 def get_label_template_info_with_http_info(name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.get_label_template_info ...' end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling MiscellaneousApi.get_label_template_info" end # resource path local_var_path = '/label/templates/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<LabelTemplate>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.get_label_template_info", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#get_label_template_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_license_template_info(name, opts = {}) ⇒ LicenseTemplateInfo
Returns information about a license template
148 149 150 151 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 148 def get_license_template_info(name, opts = {}) data, _status_code, _headers = get_license_template_info_with_http_info(name, opts) data end |
#get_license_template_info_with_http_info(name, opts = {}) ⇒ Array<(LicenseTemplateInfo, Integer, Hash)>
Returns information about a license template
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 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 157 def get_license_template_info_with_http_info(name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.get_license_template_info ...' end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling MiscellaneousApi.get_license_template_info" end # resource path local_var_path = '/licenses/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'LicenseTemplateInfo' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.get_license_template_info", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#get_license_template_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_node_info(opts = {}) ⇒ NodeInfo
Returns the nodeinfo of the Gitea application
208 209 210 211 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 208 def get_node_info(opts = {}) data, _status_code, _headers = get_node_info_with_http_info(opts) data end |
#get_node_info_with_http_info(opts = {}) ⇒ Array<(NodeInfo, Integer, Hash)>
Returns the nodeinfo of the Gitea application
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 254 255 256 257 258 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 216 def get_node_info_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.get_node_info ...' end # resource path local_var_path = '/nodeinfo' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'NodeInfo' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.get_node_info", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#get_node_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_signing_key(opts = {}) ⇒ String
Get default signing-key.gpg
263 264 265 266 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 263 def get_signing_key(opts = {}) data, _status_code, _headers = get_signing_key_with_http_info(opts) data end |
#get_signing_key_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Get default signing-key.gpg
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 271 def get_signing_key_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.get_signing_key ...' end # resource path local_var_path = '/signing-key.gpg' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.get_signing_key", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#get_signing_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_version(opts = {}) ⇒ ServerVersion
Returns the version of the Gitea application
318 319 320 321 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 318 def get_version(opts = {}) data, _status_code, _headers = get_version_with_http_info(opts) data end |
#get_version_with_http_info(opts = {}) ⇒ Array<(ServerVersion, Integer, Hash)>
Returns the version of the Gitea application
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 326 def get_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.get_version ...' end # resource path local_var_path = '/version' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ServerVersion' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.get_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#get_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_gitignores_templates(opts = {}) ⇒ Array<String>
Returns a list of all gitignore templates
373 374 375 376 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 373 def list_gitignores_templates(opts = {}) data, _status_code, _headers = list_gitignores_templates_with_http_info(opts) data end |
#list_gitignores_templates_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
Returns a list of all gitignore templates
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 381 def list_gitignores_templates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.list_gitignores_templates ...' end # resource path local_var_path = '/gitignore/templates' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<String>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.list_gitignores_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#list_gitignores_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_label_templates(opts = {}) ⇒ Array<String>
Returns a list of all label templates
428 429 430 431 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 428 def list_label_templates(opts = {}) data, _status_code, _headers = list_label_templates_with_http_info(opts) data end |
#list_label_templates_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
Returns a list of all label templates
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 436 def list_label_templates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.list_label_templates ...' end # resource path local_var_path = '/label/templates' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<String>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.list_label_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#list_label_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_license_templates(opts = {}) ⇒ Array<LicensesTemplateListEntry>
Returns a list of all license templates
483 484 485 486 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 483 def list_license_templates(opts = {}) data, _status_code, _headers = list_license_templates_with_http_info(opts) data end |
#list_license_templates_with_http_info(opts = {}) ⇒ Array<(Array<LicensesTemplateListEntry>, Integer, Hash)>
Returns a list of all license templates
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 491 def list_license_templates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.list_license_templates ...' end # resource path local_var_path = '/licenses' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<LicensesTemplateListEntry>' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.list_license_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#list_license_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#render_markdown(opts = {}) ⇒ String
Render a markdown document as HTML
539 540 541 542 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 539 def render_markdown(opts = {}) data, _status_code, _headers = render_markdown_with_http_info(opts) data end |
#render_markdown_raw(body, opts = {}) ⇒ String
Render raw markdown as HTML
601 602 603 604 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 601 def render_markdown_raw(body, opts = {}) data, _status_code, _headers = render_markdown_raw_with_http_info(body, opts) data end |
#render_markdown_raw_with_http_info(body, opts = {}) ⇒ Array<(String, Integer, Hash)>
Render raw markdown as HTML
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 610 def render_markdown_raw_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.render_markdown_raw ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling MiscellaneousApi.render_markdown_raw" end # resource path local_var_path = '/markdown/raw' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/html']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['text/plain']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.render_markdown_raw", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#render_markdown_raw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#render_markdown_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Render a markdown document as HTML
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 548 def render_markdown_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.render_markdown ...' end # resource path local_var_path = '/markdown' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/html']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.render_markdown", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#render_markdown\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#render_markup(opts = {}) ⇒ String
Render a markup document as HTML
667 668 669 670 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 667 def render_markup(opts = {}) data, _status_code, _headers = render_markup_with_http_info(opts) data end |
#render_markup_with_http_info(opts = {}) ⇒ Array<(String, Integer, Hash)>
Render a markup document as HTML
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 |
# File 'lib/forgejo/api/miscellaneous_api.rb', line 676 def render_markup_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MiscellaneousApi.render_markup ...' end # resource path local_var_path = '/markup' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/html']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken'] = opts.merge( :operation => :"MiscellaneousApi.render_markup", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MiscellaneousApi#render_markup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |