Class: Falcon::Releases

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/releases.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ Releases

Returns a new instance of Releases.



36
37
38
# File 'lib/crimson-falcon/api/releases.rb', line 36

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



34
35
36
# File 'lib/crimson-falcon/api/releases.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#combined_releases_v1_mixin0(authorization, opts = {}) ⇒ ReleasesReleaseWrapper

Queries for releases resources and returns details

Parameters:

  • authorization (String)

    authorization header

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_cs_username (String)

    user name

  • :filter (String)

    FQL query specifying filter parameters.

  • :limit (Integer)

    Maximum number of records to return.

  • :offset (String)

    Starting pagination offset of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:



48
49
50
51
# File 'lib/crimson-falcon/api/releases.rb', line 48

def combined_releases_v1_mixin0(authorization, opts = {})
  data, _status_code, _headers = combined_releases_v1_mixin0_with_http_info(authorization, opts)
  data
end

#combined_releases_v1_mixin0_with_http_info(authorization, opts = {}) ⇒ Array<(ReleasesReleaseWrapper, Integer, Hash)>

Queries for releases resources and returns details

Parameters:

  • authorization (String)

    authorization header

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_cs_username (String)

    user name

  • :filter (String)

    FQL query specifying filter parameters.

  • :limit (Integer)

    Maximum number of records to return.

  • :offset (String)

    Starting pagination offset of records to return.

  • :sort (String)

    Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending.

Returns:

  • (Array<(ReleasesReleaseWrapper, Integer, Hash)>)

    ReleasesReleaseWrapper data, response status code and response headers



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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
# File 'lib/crimson-falcon/api/releases.rb', line 62

def combined_releases_v1_mixin0_with_http_info(authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Releases.combined_releases_v1_mixin0 ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling Releases.combined_releases_v1_mixin0"
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Releases.combined_releases_v1_mixin0, must be smaller than or equal to 500.'
  end

  pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/)
  if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling Releases.combined_releases_v1_mixin0, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/deployment-coordinator/combined/releases/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Authorization'] = authorization
  header_params[:'X-CS-USERNAME'] = opts[:'x_cs_username'] if !opts[:'x_cs_username'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ReleasesReleaseWrapper'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Releases.combined_releases_v1_mixin0",
    :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, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Releases#combined_releases_v1_mixin0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end