class IronFunctions::RoutesApi
Attributes
Public Class Methods
# File lib/iron_functions/api/routes_api.rb, line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Get route list by app name. This will list routes for a particular app. @param app Name of app for this set of routes. @param [Hash] opts the optional parameters @return [RoutesWrapper]
# File lib/iron_functions/api/routes_api.rb, line 39 def apps_app_routes_get(app, opts = {}) data, _status_code, _headers = apps_app_routes_get_with_http_info(app, opts) return data end
Get route list by app name. This will list routes for a particular app. @param app Name of app for this set of routes. @param [Hash] opts the optional parameters @return [Array<(RoutesWrapper
, Fixnum, Hash)>] RoutesWrapper
data, response status code and response headers
# File lib/iron_functions/api/routes_api.rb, line 49 def apps_app_routes_get_with_http_info(app, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_get ..." end # verify the required parameter 'app' is set fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_get" if app.nil? # resource path local_var_path = "/apps/{app}/routes".sub('{format}','json').sub('{' + 'app' + '}', app.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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 => 'RoutesWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create new Route
Create a new route @param app name of the app. @param body One route to post. @param [Hash] opts the optional parameters @return [RouteWrapper]
# File lib/iron_functions/api/routes_api.rb, line 97 def apps_app_routes_post(app, body, opts = {}) data, _status_code, _headers = apps_app_routes_post_with_http_info(app, body, opts) return data end
Create new Route
Create a new route @param app name of the app. @param body One route to post. @param [Hash] opts the optional parameters @return [Array<(RouteWrapper
, Fixnum, Hash)>] RouteWrapper
data, response status code and response headers
# File lib/iron_functions/api/routes_api.rb, line 108 def apps_app_routes_post_with_http_info(app, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_post ..." end # verify the required parameter 'app' is set fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_post" if app.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling RoutesApi.apps_app_routes_post" if body.nil? # resource path local_var_path = "/apps/{app}/routes".sub('{format}','json').sub('{' + 'app' + '}', app.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) 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 => 'RouteWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Deletes the route Deletes the route. @param app Name of app for this set of routes. @param route Route
name @param [Hash] opts the optional parameters @return [nil]
# File lib/iron_functions/api/routes_api.rb, line 158 def apps_app_routes_route_delete(app, route, opts = {}) apps_app_routes_route_delete_with_http_info(app, route, opts) return nil end
Deletes the route Deletes the route. @param app Name of app for this set of routes. @param route Route
name @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/iron_functions/api/routes_api.rb, line 169 def apps_app_routes_route_delete_with_http_info(app, route, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_route_delete ..." end # verify the required parameter 'app' is set fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_route_delete" if app.nil? # verify the required parameter 'route' is set fail ArgumentError, "Missing the required parameter 'route' when calling RoutesApi.apps_app_routes_route_delete" if route.nil? # resource path local_var_path = "/apps/{app}/routes/{route}".sub('{format}','json').sub('{' + 'app' + '}', app.to_s).sub('{' + 'route' + '}', route.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_route_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets route by name Gets a route by name. @param app Name of app for this set of routes. @param route Route
name @param [Hash] opts the optional parameters @return [RouteWrapper]
# File lib/iron_functions/api/routes_api.rb, line 218 def apps_app_routes_route_get(app, route, opts = {}) data, _status_code, _headers = apps_app_routes_route_get_with_http_info(app, route, opts) return data end
Gets route by name Gets a route by name. @param app Name of app for this set of routes. @param route Route
name @param [Hash] opts the optional parameters @return [Array<(RouteWrapper
, Fixnum, Hash)>] RouteWrapper
data, response status code and response headers
# File lib/iron_functions/api/routes_api.rb, line 229 def apps_app_routes_route_get_with_http_info(app, route, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_route_get ..." end # verify the required parameter 'app' is set fail ArgumentError, "Missing the required parameter 'app' when calling RoutesApi.apps_app_routes_route_get" if app.nil? # verify the required parameter 'route' is set fail ArgumentError, "Missing the required parameter 'route' when calling RoutesApi.apps_app_routes_route_get" if route.nil? # resource path local_var_path = "/apps/{app}/routes/{route}".sub('{format}','json').sub('{' + 'app' + '}', app.to_s).sub('{' + 'route' + '}', route.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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 => 'RouteWrapper') if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_route_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end