PHP Класс DataSift_Pylon

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_Pylon class represents a private source
Автор: Paul Mozo ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Datasift_User $user, array $data = false ) : DataSift_Pylon Construct the Datasift_Pylon object
analyze ( array $parameters, string $filter = false, integer $start = false, integer $end = false, string $id = false ) : array Analyze the recording
compile ( string $csdl = false ) : array Compiles the CSDL of this object
create ( $hash = false, $name = false )
find ( string $id ) : DataSift_Pylon Class method to find a Subscription
findAll ( $page = 1, $per_page = 20, $order_by = self::ORDERBY_CREATED_AT, $order_dir = self::ORDERDIR_ASC ) : DataSift_Pylon Class method to find all Subscriptions
fromId ( Datasift_User $user, $id ) : DataSift_Pylon Load an existing pylon from hash
get ( Datasift_User $user, string $id = false ) : DataSift_Pylon Get an existing recordings.
getAll ( Datasift_User $user, $page = 1, $per_page = 20, $order_by = self::ORDERBY_CREATED_AT, $order_dir = self::ORDERDIR_ASC ) : array List recordings
getCsdl ( ) : string Gets the CSDL
getEnd ( ) : integer Gets the end time of this PYLON subscription
getHash ( ) : string Gets the Hash
getId ( ) : string Gets the ID
getIdentityId ( ) : string Gets the id of the Identity this PYLON subscription is owned by
getName ( ) : string Gets the name of this Subscription
getRemainingAccountCapacity ( ) : integer Gets the remaining PYLON account capacity
getRemainingIndexCapacity ( ) : integer Gets the remaining capacity for this PYLON subscription
getStart ( ) : integer Gets the start time of this PYLON subscription
getStatus ( ) : string Gets the status of this PYLON subscription
getVolume ( ) : integer Gets the current volume of this PYLON subscription
hasReachedCapacity ( ) : boolean Has this Subscription reached its capacity?
reload ( ) Updates the object with fresh results from get
restart ( string $id = false ) Restarts the pylon recording
sample ( string $filter = false, integer $start = false, integer $end = false, integer $count = false, string $id = false ) : array Returns a list of sample interactions (super-public)
setCsdl ( string $csdl ) Sets the CSDL
setName ( string $name ) Sets the Name
start ( string $hash = false, string $name = false ) Creates a new recording or restarts an existing one if an ID is present
stop ( string $id = false ) Stops the pylon recording
tags ( string $id = false ) : array Analyze the tags in the data set
update ( string $id = false, string $hash = false, string $name = false ) Updates a recording with a new hash and or name
validate ( Datasift_User $user, string $csdl ) : array Validate CSDL

Приватные методы

Метод Описание
load ( array $data ) Loads an pylon object from the get data

Описание методов

__construct() публичный Метод

Construct the Datasift_Pylon object
public __construct ( Datasift_User $user, array $data = false ) : DataSift_Pylon
$user Datasift_User The Datasift user object
$data array Data used to populate the attributes of this object
Результат DataSift_Pylon

analyze() публичный Метод

Analyze the recording
public analyze ( array $parameters, string $filter = false, integer $start = false, integer $end = false, string $id = false ) : array
$parameters array the parameter array to be used to analyze the data set
$filter string additional CSDL filter
$start integer the start time of the pylon
$end integer the end time of the pylon
$id string If id is provided it will be set
Результат array Response from the compile

compile() публичный Метод

Compiles the CSDL of this object
public compile ( string $csdl = false ) : array
$csdl string If a CSDL string is passed to compile it will set the CSDL for the object
Результат array Response from the compile

create() публичный Метод

public create ( $hash = false, $name = false )

find() публичный Метод

Class method to find a Subscription
public find ( string $id ) : DataSift_Pylon
$id string
Результат DataSift_Pylon

findAll() публичный Метод

Class method to find all Subscriptions
public findAll ( $page = 1, $per_page = 20, $order_by = self::ORDERBY_CREATED_AT, $order_dir = self::ORDERDIR_ASC ) : DataSift_Pylon
Результат DataSift_Pylon

fromId() публичный статический Метод

Previously called fromHash
public static fromId ( Datasift_User $user, $id ) : DataSift_Pylon
$user Datasift_User The Datasift user object
Результат DataSift_Pylon

get() публичный статический Метод

Get an existing recordings.
public static get ( Datasift_User $user, string $id = false ) : DataSift_Pylon
$user Datasift_User The Datasift user object
$id string The id of the existing pylon
Результат DataSift_Pylon

getAll() публичный статический Метод

List recordings
public static getAll ( Datasift_User $user, $page = 1, $per_page = 20, $order_by = self::ORDERBY_CREATED_AT, $order_dir = self::ORDERDIR_ASC ) : array
$user Datasift_User The Datasift user object
Результат array

getCsdl() публичный Метод

Gets the CSDL
public getCsdl ( ) : string
Результат string The CSDL assigned to the object

getEnd() публичный Метод

Gets the end time of this PYLON subscription
public getEnd ( ) : integer
Результат integer

getHash() публичный Метод

Gets the Hash
public getHash ( ) : string
Результат string $hash The hash of the pylon recording

getId() публичный Метод

Gets the ID
public getId ( ) : string
Результат string $id The ID of the pylon

getIdentityId() публичный Метод

Gets the id of the Identity this PYLON subscription is owned by
public getIdentityId ( ) : string
Результат string

getName() публичный Метод

Gets the name of this Subscription
public getName ( ) : string
Результат string

getRemainingAccountCapacity() публичный Метод

Gets the remaining PYLON account capacity
public getRemainingAccountCapacity ( ) : integer
Результат integer

getRemainingIndexCapacity() публичный Метод

Gets the remaining capacity for this PYLON subscription
public getRemainingIndexCapacity ( ) : integer
Результат integer

getStart() публичный Метод

Gets the start time of this PYLON subscription
public getStart ( ) : integer
Результат integer

getStatus() публичный Метод

Gets the status of this PYLON subscription
public getStatus ( ) : string
Результат string

getVolume() публичный Метод

Gets the current volume of this PYLON subscription
public getVolume ( ) : integer
Результат integer

hasReachedCapacity() публичный Метод

Has this Subscription reached its capacity?
public hasReachedCapacity ( ) : boolean
Результат boolean

reload() публичный Метод

Updates the object with fresh results from get
public reload ( )

restart() публичный Метод

Restarts the pylon recording
public restart ( string $id = false )
$id string If ID is provided it will be set

sample() публичный Метод

Returns a list of sample interactions (super-public)
public sample ( string $filter = false, integer $start = false, integer $end = false, integer $count = false, string $id = false ) : array
$filter string additional CSDL filter
$start integer the start time of the pylon
$end integer the end time of the pylon
$count integer optional value to set the count
$id string The id of the existing pylon
Результат array Response from the sample endpoint

setCsdl() публичный Метод

Sets the CSDL
public setCsdl ( string $csdl )
$csdl string the csdl string.

setName() публичный Метод

Sets the Name
public setName ( string $name )
$name string The name of the pylon

start() публичный Метод

Creates a new recording or restarts an existing one if an ID is present
public start ( string $hash = false, string $name = false )
$hash string If hash is provided it will be set
$name string If name is provided it will be set

stop() публичный Метод

Stops the pylon recording
public stop ( string $id = false )
$id string If ID is provided it will be set

tags() публичный Метод

Analyze the tags in the data set
public tags ( string $id = false ) : array
$id string If ID is provided it will be set
Результат array Response from the tags endpoint

update() публичный Метод

Updates a recording with a new hash and or name
public update ( string $id = false, string $hash = false, string $name = false )
$id string The id of the existing recording
$hash string The new hash of the pylon recording
$name string The new updated name of the recording

validate() публичный статический Метод

Validate CSDL
public static validate ( Datasift_User $user, string $csdl ) : array
$user Datasift_User The Datasift user object
$csdl string The CSDL to validate
Результат array The response from validating the CSDL