PHP 클래스 DataSift_Historic

This software is the intellectual property of MediaSift Ltd., and is covered by retained intellectual property rights, including copyright. Distribution of this software is strictly forbidden under the terms of this license. The DataSift_Historic class represents a historic query.
저자: Stuart Dallas ([email protected])
파일 보기 프로젝트 열기: datasift/datasift-php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_availability Data availablility information.
$_created_at Historics query creation time
$_deleted Set to true if the Historics query has been deleted.
$_dpus Number of DPUs consumed
$_end End date and time
$_estimated_completion The estimated completion timestamp
$_hash The stream hash.
$_name Historics query name.
$_playback_id Playback ID
$_progress Progress counter
$_sample Sample size
$_sources Data sources.
$_start Start date and time
$_status Historics query status
$_user The user object.

공개 메소드들

메소드 설명
__construct ( DataSift_User $user, string $hash, integer $start = false, integer $end = false, array $sources = false, string $name = false, integer $sample = 100 ) Constructor. Pass all fields to create a new historic, or provide a User object and a playback_id as the $hash parameter to load an existing query from the API.
delete ( ) : void Delete this historic query.
getAvailability ( ) : array Returns the data availability information for this historic. If the historic has not yet been prepared that will be done automagically to obtain the cost.
getCreatedAt ( ) : integer Returns the created at date. To refresh this from the server call reloadData().
getDPUs ( ) : integer Returns the DPU cost of running this historic. If the historic has not yet been prepared that will be done automagically to obtain the cost.
getEndDate ( ) : integer Returns the end date.
getEstimatedCompletion ( ) : integer Returns the estimated completion in UTC timestamp
getHash ( ) : string Returns the playback ID for this historic. If the historic has not yet been prepared that will be done automagically to obtain the ID.
getName ( ) : string Returns the name.
getProgress ( ) : double Returns the current progress.
getPushSubscriptions ( DataSift_User $user, integer $page = 1, integer $per_page = 20, String $order_by = self::ORDERBY_CREATED_AT, String $order_dir = self::ORDERDIR_ASC, boolean $include_finished = false ) Get a page of push subscriptions for this historic query, where each page contains up to $per_page items. Results will be returned in the order requested.
getSample ( ) : double Returns the sample.
getSources ( ) : integer Returns the sources.
getStartDate ( ) : integer Returns the start date.
getStatus ( ) : string Returns the status. To refresh this from the server call reloadData().
getStreamHash ( ) : string Returns the stream hash.
listHistorics ( DataSift_User $user, integer $page = 1, integer $per_page = 20 ) List Historics queries.
pause ( string $reason = false ) : void Pause this historic query.
prepare ( ) : void Call the DataSift API to prepare this historic query.
reloadData ( ) Reload the data for this object from the API.
resume ( ) : void Resumes this historic query.
setName ( string $name ) : void Sets the name.
start ( ) : void Start this historic query.
stop ( ) : void Stop this historic query.

보호된 메소드들

메소드 설명
generateName ( ) : string Generate a name based on the current date/time.
initFromArray ( array $data ) Initialise this object from the data in the given array.

메소드 상세

__construct() 공개 메소드

Constructor. Pass all fields to create a new historic, or provide a User object and a playback_id as the $hash parameter to load an existing query from the API.
public __construct ( DataSift_User $user, string $hash, integer $start = false, integer $end = false, array $sources = false, string $name = false, integer $sample = 100 )
$user DataSift_User The user object.
$hash string The stream hash for the query.
$start integer The start timestamp.
$end integer The end timestamp.
$sources array The interaction types to match.
$name string A name for this query.
$sample integer An optional sample rate for this query.

delete() 공개 메소드

Delete this historic query.
public delete ( ) : void
리턴 void

generateName() 보호된 메소드

Generate a name based on the current date/time.
protected generateName ( ) : string
리턴 string The generated name.

getAvailability() 공개 메소드

Returns the data availability information for this historic. If the historic has not yet been prepared that will be done automagically to obtain the cost.
public getAvailability ( ) : array
리턴 array The data availability.

getCreatedAt() 공개 메소드

Returns the created at date. To refresh this from the server call reloadData().
public getCreatedAt ( ) : integer
리턴 integer The created at date.

getDPUs() 공개 메소드

Returns the DPU cost of running this historic. If the historic has not yet been prepared that will be done automagically to obtain the cost.
public getDPUs ( ) : integer
리턴 integer The DPU cost.

getEndDate() 공개 메소드

Returns the end date.
public getEndDate ( ) : integer
리턴 integer The end date.

getEstimatedCompletion() 공개 메소드

Returns the estimated completion in UTC timestamp
public getEstimatedCompletion ( ) : integer
리턴 integer

getHash() 공개 메소드

Returns the playback ID for this historic. If the historic has not yet been prepared that will be done automagically to obtain the ID.
public getHash ( ) : string
리턴 string The playback ID.

getName() 공개 메소드

Returns the name.
public getName ( ) : string
리턴 string The name.

getProgress() 공개 메소드

Returns the current progress.
public getProgress ( ) : double
리턴 double The percent progress.

getPushSubscriptions() 공개 메소드

Get a page of push subscriptions for this historic query, where each page contains up to $per_page items. Results will be returned in the order requested.
public getPushSubscriptions ( DataSift_User $user, integer $page = 1, integer $per_page = 20, String $order_by = self::ORDERBY_CREATED_AT, String $order_dir = self::ORDERDIR_ASC, boolean $include_finished = false )
$user DataSift_User The user object.
$page integer The page number to get.
$per_page integer The number of items per page.
$order_by String Which field to sort by.
$order_dir String In asc[ending] or desc[ending] order.
$include_finished boolean Set to true when you want to include finished subscription in the results.

getSample() 공개 메소드

Returns the sample.
public getSample ( ) : double
리턴 double The sample.

getSources() 공개 메소드

Returns the sources.
public getSources ( ) : integer
리턴 integer The start date.

getStartDate() 공개 메소드

Returns the start date.
public getStartDate ( ) : integer
리턴 integer The start date.

getStatus() 공개 메소드

Returns the status. To refresh this from the server call reloadData().
public getStatus ( ) : string
리턴 string The status.

getStreamHash() 공개 메소드

Returns the stream hash.
public getStreamHash ( ) : string
리턴 string The hash.

initFromArray() 보호된 메소드

Initialise this object from the data in the given array.
protected initFromArray ( array $data )
$data array The array of data.

listHistorics() 공개 정적인 메소드

List Historics queries.
public static listHistorics ( DataSift_User $user, integer $page = 1, integer $per_page = 20 )
$user DataSift_User The user object.
$page integer The start page.
$per_page integer The start page.

pause() 공개 메소드

Pause this historic query.
public pause ( string $reason = false ) : void
$reason string Your reason for pausing the Historics query.
리턴 void

prepare() 공개 메소드

Call the DataSift API to prepare this historic query.
public prepare ( ) : void
리턴 void

reloadData() 공개 메소드

Reload the data for this object from the API.
public reloadData ( )

resume() 공개 메소드

Resumes this historic query.
public resume ( ) : void
리턴 void

setName() 공개 메소드

Sets the name.
public setName ( string $name ) : void
$name string The new name.
리턴 void

start() 공개 메소드

Start this historic query.
public start ( ) : void
리턴 void

stop() 공개 메소드

Stop this historic query.
public stop ( ) : void
리턴 void

프로퍼티 상세

$_availability 보호되어 있는 프로퍼티

Data availablility information.
protected $_availability

$_created_at 보호되어 있는 프로퍼티

Historics query creation time
protected $_created_at

$_deleted 보호되어 있는 프로퍼티

Set to true if the Historics query has been deleted.
protected $_deleted

$_dpus 보호되어 있는 프로퍼티

Number of DPUs consumed
protected $_dpus

$_end 보호되어 있는 프로퍼티

End date and time
protected $_end

$_estimated_completion 보호되어 있는 프로퍼티

The estimated completion timestamp
protected $_estimated_completion

$_hash 보호되어 있는 프로퍼티

The stream hash.
protected $_hash

$_name 보호되어 있는 프로퍼티

Historics query name.
protected $_name

$_playback_id 보호되어 있는 프로퍼티

Playback ID
protected $_playback_id

$_progress 보호되어 있는 프로퍼티

Progress counter
protected $_progress

$_sample 보호되어 있는 프로퍼티

Sample size
protected $_sample

$_sources 보호되어 있는 프로퍼티

Data sources.
protected $_sources

$_start 보호되어 있는 프로퍼티

Start date and time
protected $_start

$_status 보호되어 있는 프로퍼티

Historics query status
protected $_status

$_user 보호되어 있는 프로퍼티

The user object.
protected $_user