Class: Kaltura::KalturaObjectBase

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

Direct Known Subclasses

KalturaAccessControl, KalturaAccessControlMessage, KalturaAccessControlProfile, KalturaAccessControlScope, KalturaAnalyticsFilter, KalturaApiExceptionArg, KalturaAppToken, KalturaAsset, KalturaAssetDistributionCondition, KalturaAssetDistributionRule, KalturaAssetParams, KalturaAssetServeOptions, KalturaAuditTrail, KalturaAuditTrailChangeItem, KalturaAuditTrailInfo, KalturaAuthentication, KalturaBaseEntry, KalturaBaseEntryCloneOptionItem, KalturaBaseResponseProfile, KalturaBaseRestriction, KalturaBaseSyndicationFeed, KalturaBaseUser, KalturaBaseVendorCredit, KalturaBatchHistoryData, KalturaBatchJob, KalturaBeacon, KalturaBeaconSearchParams, KalturaBeaconSearchScheduledResourceOrderBy, KalturaBulkServiceData, KalturaBulkUpload, KalturaBulkUploadObjectData, KalturaBulkUploadPluginData, KalturaBulkUploadResult, KalturaBusinessProcessCase, KalturaBusinessProcessServer, KalturaCEError, KalturaCaptionAssetItem, KalturaCaptionPlaybackPluginData, KalturaCategory, KalturaCategoryEntry, KalturaCategoryUser, KalturaClientConfiguration, KalturaClientNotification, KalturaClipDescription, KalturaCondition, KalturaConfMaps, KalturaContext, KalturaContextDataResult, KalturaContextTypeHolder, KalturaControlPanelCommand, KalturaConversionAttribute, KalturaConversionProfile, KalturaConversionProfileAssetParams, KalturaConvertCollectionFlavorData, KalturaCoordinate, KalturaCropDimensions, KalturaCsvAdditionalFieldInfo, KalturaCuePoint, KalturaDailymotionDistributionCaptionInfo, KalturaDeliveryProfile, KalturaDictionary, KalturaDistributionFieldConfig, KalturaDistributionJobProviderData, KalturaDistributionProfile, KalturaDistributionProvider, KalturaDistributionRemoteMediaFile, KalturaDistributionThumbDimensions, KalturaDistributionValidationError, KalturaDrmLicenseAccessDetails, KalturaDrmPolicy, KalturaDrmProfile, KalturaDropFolder, KalturaDropFolderFile, KalturaDropFolderFileHandlerConfig, KalturaESearchAggregation, KalturaESearchAggregationBucket, KalturaESearchAggregationItem, KalturaESearchAggregationResponseItem, KalturaESearchBaseFilter, KalturaESearchBaseItem, KalturaESearchHighlight, KalturaESearchHistory, KalturaESearchItemData, KalturaESearchItemDataResult, KalturaESearchLanguageItem, KalturaESearchOrderBy, KalturaESearchOrderByItem, KalturaESearchParams, KalturaESearchRange, KalturaESearchResponse, KalturaESearchResult, KalturaEffect, KalturaEmailIngestionProfile, KalturaEmailNotificationRecipient, KalturaEmailNotificationRecipientJobData, KalturaEmailNotificationRecipientProvider, KalturaEntryDistribution, KalturaEntryReplacementOptions, KalturaEntryServerNode, KalturaEntryVendorTask, KalturaEventNotificationParameter, KalturaEventNotificationTemplate, KalturaExtendingItemMrssParameter, KalturaFacebookCaptionDistributionInfo, KalturaFeatureStatus, KalturaFeedItemInfo, KalturaFileAsset, KalturaFileContainer, KalturaFileSync, KalturaFileSyncDescriptor, KalturaFilter, KalturaFlavorAssetUrlOptions, KalturaFlavorAssetWithParams, KalturaFtpDistributionFile, KalturaGenericDistributionProfileAction, KalturaGenericDistributionProviderAction, KalturaGroupUser, KalturaHttpNotification, KalturaHttpNotificationData, KalturaIntegrationJobProviderData, KalturaIntegrationJobTriggerData, KalturaJobData, KalturaKeyValue, KalturaLike, KalturaListResponse, KalturaLiveChannelSegment, KalturaLiveEntryRecordingOptions, KalturaLiveEntryServerNodeRecordingInfo, KalturaLiveReportExportParams, KalturaLiveReportExportResponse, KalturaLiveReportInputFilter, KalturaLiveStats, KalturaLiveStatsEvent, KalturaLiveStreamBitrate, KalturaLiveStreamConfiguration, KalturaLiveStreamParams, KalturaLiveStreamPushPublishConfiguration, KalturaMediaInfo, KalturaMetadata, KalturaMetadataProfile, KalturaMetadataProfileField, KalturaModerationFlag, KalturaObject, KalturaObjectIdentifier, KalturaObjectTask, KalturaOperationAttributes, KalturaOptionalAnswer, KalturaPager, KalturaPartner, KalturaPartnerPublicInfo, KalturaPartnerStatistics, KalturaPartnerUsage, KalturaPermission, KalturaPermissionItem, KalturaPlayReadyAnalogVideoOPIdHolder, KalturaPlayReadyContentKey, KalturaPlayReadyCopyEnablerHolder, KalturaPlayReadyDigitalAudioOPIdHolder, KalturaPlayReadyLicenseDetails, KalturaPlayReadyPlayEnablerHolder, KalturaPlayReadyRight, KalturaPlaybackContext, KalturaPlaybackSource, KalturaPlayerDeliveryType, KalturaPlayerEmbedCodeType, KalturaPluginData, KalturaPluginReplacementOptionsItem, KalturaPushNotificationData, KalturaPushNotificationParams, KalturaQuiz, KalturaReachProfile, KalturaRemotePath, KalturaReport, KalturaReportBaseTotal, KalturaReportExportItem, KalturaReportExportParams, KalturaReportExportResponse, KalturaReportFilter, KalturaReportGraph, KalturaReportInputBaseFilter, KalturaReportResponse, KalturaReportResponseOptions, KalturaReportTable, KalturaReportTotal, KalturaRequestConfiguration, KalturaResource, KalturaResponseProfileCacheRecalculateOptions, KalturaResponseProfileCacheRecalculateResults, KalturaResponseProfileMapping, KalturaRule, KalturaRuleAction, KalturaScheduleEvent, KalturaScheduleEventRecurrence, KalturaScheduleEventResource, KalturaScheduleResource, KalturaScheduledTaskProfile, KalturaScheduler, KalturaSchedulerConfig, KalturaSchedulerStatus, KalturaSchedulerWorker, KalturaScope, KalturaSearch, KalturaSearchAuthData, KalturaSearchItem, KalturaSearchResultResponse, KalturaServerNode, KalturaSessionInfo, KalturaShortLink, KalturaStartWidgetSessionResponse, KalturaStatsEvent, KalturaStatsKmcEvent, KalturaStorageProfile, KalturaStreamContainer, KalturaString, KalturaSyndicationFeedEntryCount, KalturaSystemPartnerUsageItem, KalturaTag, KalturaTrackEntry, KalturaUiConf, KalturaUiConfTypeInfo, KalturaUploadResponse, KalturaUploadToken, KalturaUrlRecognizer, KalturaUrlTokenizer, KalturaUserEntry, KalturaUserLoginData, KalturaUserRole, KalturaValue, KalturaVarPartnerUsageItem, KalturaVendorCatalogItem, KalturaVendorCatalogItemPricing, KalturaVendorTaskData, KalturaVirusScanProfile, KalturaWidget, KalturaYouTubeApiCaptionDistributionInfo

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#object_typeObject

Returns the value of attribute object_type.



430
431
432
# File 'lib/kaltura_client_base.rb', line 430

def object_type
  @object_type
end

Returns the value of attribute related_objects.



431
432
433
# File 'lib/kaltura_client_base.rb', line 431

def related_objects
  @related_objects
end

Instance Method Details

#camelcase(val) ⇒ Object



461
462
463
464
# File 'lib/kaltura_client_base.rb', line 461

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

#from_xml(xml_element) ⇒ Object



433
434
435
# File 'lib/kaltura_client_base.rb', line 433

def from_xml(xml_element)
  self.related_objects = KalturaClientBase.object_from_xml(xml_element.elements['relatedObjects'], 'KalturaListResponse')
end

#to_b(val) ⇒ Object



457
458
459
# File 'lib/kaltura_client_base.rb', line 457

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

#to_paramsObject



437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/kaltura_client_base.rb', line 437

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