Class: Kaltura::KalturaObjectBase
- Inherits:
-
Object
- Object
- Kaltura::KalturaObjectBase
show all
- Defined in:
- lib/kaltura_client_base.rb
Direct Known Subclasses
KalturaAccessControl, KalturaAccessControlListResponse, KalturaAdminUser, KalturaBaseEntry, KalturaBaseEntryListResponse, KalturaBaseRestriction, KalturaBaseSyndicationFeed, KalturaBaseSyndicationFeedListResponse, KalturaBulkUpload, KalturaBulkUploadListResponse, KalturaBulkUploadResult, KalturaCEError, KalturaCategory, KalturaCategoryListResponse, KalturaClientNotification, KalturaConversionProfile, KalturaConversionProfileListResponse, KalturaCropDimensions, KalturaDataListResponse, KalturaEmailIngestionProfile, KalturaEntryContextDataParams, KalturaEntryContextDataResult, KalturaFileSync, KalturaFileSyncListResponse, KalturaFilter, KalturaFilterPager, KalturaFlavorAsset, KalturaFlavorAssetWithParams, KalturaFlavorParams, KalturaFlavorParamsListResponse, KalturaFlavorParamsOutputListResponse, KalturaLiveStreamBitrate, KalturaLiveStreamListResponse, KalturaMediaInfo, KalturaMediaInfoListResponse, KalturaMediaListResponse, KalturaMixListResponse, KalturaModerationFlag, KalturaModerationFlagListResponse, KalturaPartner, KalturaPartnerListResponse, KalturaPartnerUsage, KalturaPlaylistListResponse, KalturaReportGraph, KalturaReportInputFilter, KalturaReportTable, KalturaReportTotal, KalturaSearch, KalturaSearchAuthData, KalturaSearchResultResponse, KalturaStartWidgetSessionResponse, KalturaStatsEvent, KalturaStatsKmcEvent, KalturaSyndicationFeedEntryCount, KalturaSystemPartnerConfiguration, KalturaSystemPartnerPackage, KalturaSystemPartnerUsageItem, KalturaSystemPartnerUsageListResponse, KalturaSystemUser, KalturaSystemUserListResponse, KalturaUiConf, KalturaUiConfListResponse, KalturaUploadResponse, KalturaUser, KalturaUserListResponse, KalturaWidget, KalturaWidgetListResponse
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#object_type ⇒ Object
Returns the value of attribute object_type.
192
193
194
|
# File 'lib/kaltura_client_base.rb', line 192
def object_type
@object_type
end
|
Instance Method Details
#camelcase(val) ⇒ Object
216
217
218
219
|
# File 'lib/kaltura_client_base.rb', line 216
def camelcase(val)
val = val.split('_').map { |e| e.capitalize }.join()
val[0,1].downcase + val[1,val.length]
end
|
#to_b(val) ⇒ Object
212
213
214
|
# File 'lib/kaltura_client_base.rb', line 212
def to_b(val)
return [true, 'true', 1, '1'].include?(val.is_a?(String) ? val.downcase : val)
end
|
#to_params ⇒ Object
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
# File 'lib/kaltura_client_base.rb', line 194
def to_params
params = {};
params["objectType"] = self.class.name.split('::').last
instance_variables.each do |var|
value = instance_variable_get(var)
var = var.sub('@', '')
kvar = camelcase(var)
if (value != nil)
if (value.is_a? KalturaObjectBase)
params[kvar] = value.to_params;
else
params[kvar] = value;
end
end
end
return params;
end
|