Class: Kaltura::KalturaObjectBase

Inherits:
Object
  • Object
show all
Defined in:
lib/kaltura_client_base.rb

Direct Known Subclasses

KalturaAccessControl, KalturaAccessControlListResponse, KalturaAccessControlProfile, KalturaAccessControlProfileListResponse, KalturaAccessControlScope, KalturaAnnotationListResponse, KalturaAsset, KalturaAssetDistributionCondition, KalturaAssetDistributionRule, KalturaAssetParams, KalturaAttachmentAssetListResponse, KalturaAuditTrail, KalturaAuditTrailChangeItem, KalturaAuditTrailInfo, KalturaAuditTrailListResponse, KalturaBaseEntry, KalturaBaseEntryListResponse, KalturaBaseRestriction, KalturaBaseSyndicationFeed, KalturaBaseSyndicationFeedListResponse, KalturaBulkUpload, KalturaBulkUploadListResponse, KalturaBulkUploadObjectData, KalturaBulkUploadPluginData, KalturaBulkUploadResult, KalturaCEError, KalturaCaptionAssetItem, KalturaCaptionAssetItemListResponse, KalturaCaptionAssetListResponse, KalturaCaptionParamsListResponse, KalturaCategory, KalturaCategoryEntry, KalturaCategoryEntryListResponse, KalturaCategoryListResponse, KalturaCategoryUser, KalturaCategoryUserListResponse, KalturaClientNotification, KalturaCondition, KalturaContext, KalturaContextDataResult, KalturaContextTypeHolder, KalturaConversionAttribute, KalturaConversionProfile, KalturaConversionProfileAssetParams, KalturaConversionProfileAssetParamsListResponse, KalturaConversionProfileListResponse, KalturaConvertCollectionFlavorData, KalturaCropDimensions, KalturaCuePoint, KalturaCuePointListResponse, KalturaDataListResponse, KalturaDistributionFieldConfig, KalturaDistributionJobProviderData, KalturaDistributionProfile, KalturaDistributionProfileListResponse, KalturaDistributionProvider, KalturaDistributionProviderListResponse, KalturaDistributionRemoteMediaFile, KalturaDistributionThumbDimensions, KalturaDistributionValidationError, KalturaDocumentListResponse, KalturaDrmProfile, KalturaDrmProfileListResponse, KalturaDropFolder, KalturaDropFolderFile, KalturaDropFolderFileHandlerConfig, KalturaDropFolderFileListResponse, KalturaDropFolderListResponse, KalturaEmailIngestionProfile, KalturaEmailNotificationRecipient, KalturaEmailNotificationRecipientJobData, KalturaEmailNotificationRecipientProvider, KalturaEntryDistribution, KalturaEntryDistributionListResponse, KalturaEventNotificationParameter, KalturaEventNotificationTemplate, KalturaEventNotificationTemplateListResponse, KalturaExtendingItemMrssParameter, KalturaExternalMediaEntryListResponse, KalturaFeatureStatus, KalturaFeatureStatusListResponse, KalturaFileAsset, KalturaFileAssetListResponse, KalturaFilter, KalturaFilterPager, KalturaFlavorAssetListResponse, KalturaFlavorAssetWithParams, KalturaFlavorParamsListResponse, KalturaFlavorParamsOutputListResponse, KalturaGenericDistributionProfileAction, KalturaGenericDistributionProviderAction, KalturaGenericDistributionProviderActionListResponse, KalturaGenericDistributionProviderListResponse, KalturaHttpNotification, KalturaHttpNotificationData, KalturaJobData, KalturaKeyValue, KalturaLiveChannelListResponse, KalturaLiveChannelSegment, KalturaLiveChannelSegmentListResponse, KalturaLiveStreamBitrate, KalturaLiveStreamConfiguration, KalturaLiveStreamListResponse, KalturaMediaInfo, KalturaMediaInfoListResponse, KalturaMediaListResponse, KalturaMediaServer, KalturaMediaServerStatus, KalturaMetadata, KalturaMetadataListResponse, KalturaMetadataProfile, KalturaMetadataProfileField, KalturaMetadataProfileFieldListResponse, KalturaMetadataProfileListResponse, KalturaMixListResponse, KalturaModerationFlag, KalturaModerationFlagListResponse, KalturaObject, KalturaObjectIdentifier, KalturaOperationAttributes, KalturaPartner, KalturaPartnerListResponse, KalturaPartnerStatistics, KalturaPartnerUsage, KalturaPartnerUsageListResponse, KalturaPermission, KalturaPermissionItem, KalturaPermissionItemListResponse, KalturaPermissionListResponse, KalturaPlayerDeliveryType, KalturaPlayerEmbedCodeType, KalturaPlaylistListResponse, KalturaRemotePath, KalturaRemotePathListResponse, KalturaReportBaseTotal, KalturaReportGraph, KalturaReportInputBaseFilter, KalturaReportResponse, KalturaReportTable, KalturaReportTotal, KalturaResource, KalturaRule, KalturaRuleAction, KalturaSearch, KalturaSearchAuthData, KalturaSearchItem, KalturaSearchResultResponse, KalturaSessionInfo, KalturaShortLink, KalturaShortLinkListResponse, KalturaSourceFileSyncDescriptor, KalturaStartWidgetSessionResponse, KalturaStatsEvent, KalturaStatsKmcEvent, KalturaStorageProfile, KalturaStorageProfileListResponse, KalturaString, KalturaSyndicationFeedEntryCount, KalturaTag, KalturaTagListResponse, KalturaThumbAssetListResponse, KalturaThumbParamsListResponse, KalturaThumbParamsOutputListResponse, KalturaThumbnailServeOptions, KalturaUiConf, KalturaUiConfListResponse, KalturaUiConfTypeInfo, KalturaUploadResponse, KalturaUploadToken, KalturaUploadTokenListResponse, KalturaUser, KalturaUserListResponse, KalturaUserRole, KalturaUserRoleListResponse, KalturaValue, KalturaVarPartnerUsageItem, KalturaVirusScanProfile, KalturaVirusScanProfileListResponse, KalturaWidget, KalturaWidgetListResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#object_typeObject

Returns the value of attribute object_type.



314
315
316
# File 'lib/kaltura_client_base.rb', line 314

def object_type
  @object_type
end

Instance Method Details

#camelcase(val) ⇒ Object



340
341
342
343
# File 'lib/kaltura_client_base.rb', line 340

def camelcase(val)
	val = val.split('_').map { |e| e.capitalize }.join()
	val[0,1].downcase + val[1,val.length]
end

#to_b(val) ⇒ Object



336
337
338
# File 'lib/kaltura_client_base.rb', line 336

def to_b(val)
	return [true, 'true', 1, '1'].include?(val.is_a?(String) ? val.downcase : val)
end

#to_paramsObject



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/kaltura_client_base.rb', line 316

def to_params
	params = {};
	params["objectType"] = self.class.name.split('::').last 
	instance_variables.each do |var|
		value = instance_variable_get(var)
		var = var.to_s.sub('@', '')
		kvar = camelcase(var)
		if (value != nil)
			if (value.is_a? KalturaObjectBase)
				params[kvar] = value.to_params;
			else
				params[kvar] = value;
			end
		else
		  params[kvar] = value;
		end
	end
	return params;
end