Class: BlueprintClient::LTIApi
- Inherits:
-
Object
- Object
- BlueprintClient::LTIApi
- Defined in:
- lib/blueprint_ruby_client/api/lti_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) ⇒ LTIApi
constructor
A new instance of LTIApi.
-
#namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts = {}) ⇒ nil
LTI launch url for integration.
-
#namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post_with_http_info(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
LTI launch url for integration.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/blueprint_ruby_client/api/lti_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts = {}) ⇒ nil
LTI launch url for integration
46 47 48 49 |
# File 'lib/blueprint_ruby_client/api/lti_api.rb', line 46 def namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post(namespace, integration_id, asset_type, asset_id, , lti_version, resource_link_id, opts = {}) namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post_with_http_info(namespace, integration_id, asset_type, asset_id, , lti_version, resource_link_id, opts) return nil end |
#namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post_with_http_info(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
LTI launch url for integration
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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 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 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 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 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/blueprint_ruby_client/api/lti_api.rb', line 74 def namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post_with_http_info(namespace, integration_id, asset_type, asset_id, , lti_version, resource_link_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: LTIApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post ..." end # verify the required parameter 'namespace' is set fail ArgumentError, "Missing the required parameter 'namespace' when calling LTIApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if namespace.nil? # verify the required parameter 'integration_id' is set fail ArgumentError, "Missing the required parameter 'integration_id' when calling LTIApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if integration_id.nil? # verify the required parameter 'asset_type' is set fail ArgumentError, "Missing the required parameter 'asset_type' when calling LTIApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if asset_type.nil? # verify the required parameter 'asset_id' is set fail ArgumentError, "Missing the required parameter 'asset_id' when calling LTIApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if asset_id.nil? # verify the required parameter 'lti_message_type' is set fail ArgumentError, "Missing the required parameter 'lti_message_type' when calling LTIApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if .nil? # verify enum value unless ['basic-lti-launch-request'].include?() fail ArgumentError, "invalid value for 'lti_message_type', must be one of basic-lti-launch-request" end # verify the required parameter 'lti_version' is set fail ArgumentError, "Missing the required parameter 'lti_version' when calling LTIApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if lti_version.nil? # verify enum value unless ['LTI-1p0'].include?(lti_version) fail ArgumentError, "invalid value for 'lti_version', must be one of LTI-1p0" end # verify the required parameter 'resource_link_id' is set fail ArgumentError, "Missing the required parameter 'resource_link_id' when calling LTIApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if resource_link_id.nil? if opts[:'oauth_signature_method'] && !['HMAC-SHA1'].include?(opts[:'oauth_signature_method']) fail ArgumentError, 'invalid value for "oauth_signature_method", must be one of HMAC-SHA1' end if opts[:'oauth_signature_method2'] && !['HMAC-SHA1'].include?(opts[:'oauth_signature_method2']) fail ArgumentError, 'invalid value for "oauth_signature_method2", must be one of HMAC-SHA1' end # resource path local_var_path = "/{namespace}/integrations/lti1/{integrationId}/assets/{assetType}/{assetId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'integrationId' + '}', integration_id.to_s).sub('{' + 'assetType' + '}', asset_type.to_s).sub('{' + 'assetId' + '}', asset_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['text/html'] 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/x-www-form-urlencoded'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'oauth_consumer_key'] = opts[:'oauth_consumer_key2'] if opts[:'oauth_consumer_key2'] header_params[:'oauth_signature_method'] = opts[:'oauth_signature_method2'] if opts[:'oauth_signature_method2'] header_params[:'oauth_timestamp'] = opts[:'oauth_timestamp2'] if opts[:'oauth_timestamp2'] header_params[:'oauth_version'] = opts[:'oauth_version2'] if opts[:'oauth_version2'] header_params[:'oauth_nonce'] = opts[:'oauth_nonce2'] if opts[:'oauth_nonce2'] header_params[:'oauth_signature'] = opts[:'oauth_signature2'] if opts[:'oauth_signature2'] # form parameters form_params = {} form_params["lti_message_type"] = form_params["lti_version"] = lti_version form_params["resource_link_id"] = resource_link_id form_params["oauth_consumer_key"] = opts[:'oauth_consumer_key'] if opts[:'oauth_consumer_key'] form_params["oauth_signature_method"] = opts[:'oauth_signature_method'] if opts[:'oauth_signature_method'] form_params["oauth_timestamp"] = opts[:'oauth_timestamp'] if opts[:'oauth_timestamp'] form_params["oauth_version"] = opts[:'oauth_version'] if opts[:'oauth_version'] form_params["oauth_nonce"] = opts[:'oauth_nonce'] if opts[:'oauth_nonce'] form_params["oauth_signature"] = opts[:'oauth_signature'] if opts[:'oauth_signature'] # http body (model) post_body = nil 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: LTIApi#namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |