Method: DatadogAPIClient::APIClient#build_collection_param
- Defined in:
- lib/datadog_api_client/api_client.rb
#build_collection_param(param, collection_format) ⇒ Object
Build parameter value according to the given collection format.
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/datadog_api_client/api_client.rb', line 470 def build_collection_param(param, collection_format) case collection_format when :csv param.join(',') when :ssv param.join(' ') when :tsv param.join("\t") when :pipes param.join('|') when :multi # return the array directly as httparty will handle it as expected param else fail "unknown collection format: #{collection_format.inspect}" end end |