PHP 클래스 DataSift_Source

저자: Christopher Hoult ([email protected])
파일 보기 프로젝트 열기: datasift/datasift-php 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( DataSift_User $user, array $data = [] ) Constructs a new DataSift_Source
addAuth ( array $auth, $validate = false ) Adds authorization credentials for this DataSift_Source using the auth/add
addResource ( array $resources, $validate = false ) Adds resources for this DataSift_Source using the resource/add
delete ( ) : DataSift_Source Delete this Source.
fromArray ( array $data ) : DataSift_Source Hydrates this Source from an array of API responses
get ( DataSift_User $user, string $id ) : DataSift_Source Gets a single DataSift_Source object by ID
getAuth ( ) : array Sets the authorization credentials for this DataSift_Source
getCreatedAt ( ) : integer Gets the created-at timestamp
getId ( ) : string Gets this DataSift_Source's unique identifier
getLogs ( integer $page = 1, integer $perPage = 20 ) : array Returns the logs for this source
getName ( ) : string Gets the name of this DataSift_Source
getParameters ( ) : array Gets the parameters for this DataSift_Source
getResources ( ) : array Gets the resources for this DataSift_Source
getSourceType ( ) : string Gets the type of this DataSift_Source
getStatus ( ) : string Gets the status of this DataSift_Source
getUser ( ) : DataSift_User Gets the user this DataSift_Source belongs to
getValidate ( ) : boolean Ssets the validate status
listSources ( DataSift_User $user, integer $page = 1, integer $perPage = 25, string | false $sourceType = false ) : array Gets a page of Sources where each page contains up to $perPage items.
removeAuth ( array $authIds ) Removes authorization credentials for this DataSift_Source using the auth/remove
removeResource ( array $resourceIds ) Removes resources for this DataSift_Source using the resource/remove
save ( boolean $validate = true ) : DataSift_Source Save this Source
setAuth ( array $auth ) Sets the authorization credentials for this DataSift_Source
setCreatedAt ( integer $createdAt ) Sets the created-at timestamp
setId ( string $id ) Sets this DataSift_Source's unique identifier
setName ( string $name ) Sets the name of this DataSift_Source
setParameters ( array $parameters ) Sets the parameters for this DataSift_Source, appropriate to the Source type
setResources ( array $resources ) Sets the resources for this DataSift_Source
setSourceType ( string $sourceType ) Sets the type of this DataSift_Source
setStatus ( string $status ) Sets the status of this DataSift_Source
setUser ( DataSift_User $user ) Sets the user this DataSift_Source belongs to
setValidate ( boolean $validate ) Ssets the validate status
start ( ) : DataSift_Source Start this Source
stop ( ) : DataSift_Source Stop this Source
toArray ( ) : array Converts this Source to an array suitable for transmission to the API

메소드 상세

__construct() 공개 메소드

Constructs a new DataSift_Source
public __construct ( DataSift_User $user, array $data = [] )
$user DataSift_User
$data array

addAuth() 공개 메소드

Adds authorization credentials for this DataSift_Source using the auth/add
public addAuth ( array $auth, $validate = false )
$auth array An array of authorization credentials, appropriate to the Source type

addResource() 공개 메소드

Adds resources for this DataSift_Source using the resource/add
public addResource ( array $resources, $validate = false )
$resources array An array of authorization credentials, appropriate to the Source type

delete() 공개 메소드

Delete this Source.
public delete ( ) : DataSift_Source
리턴 DataSift_Source

fromArray() 공개 메소드

Hydrates this Source from an array of API responses
public fromArray ( array $data ) : DataSift_Source
$data array
리턴 DataSift_Source

get() 공개 정적인 메소드

Gets a single DataSift_Source object by ID
public static get ( DataSift_User $user, string $id ) : DataSift_Source
$user DataSift_User The user making the request.
$id string The id of the Source to fetch
리턴 DataSift_Source

getAuth() 공개 메소드

Sets the authorization credentials for this DataSift_Source
public getAuth ( ) : array
리턴 array

getCreatedAt() 공개 메소드

Gets the created-at timestamp
public getCreatedAt ( ) : integer
리턴 integer A UNIX timestamp

getId() 공개 메소드

Gets this DataSift_Source's unique identifier
public getId ( ) : string
리턴 string

getLogs() 공개 메소드

Returns the logs for this source
public getLogs ( integer $page = 1, integer $perPage = 20 ) : array
$page integer
$perPage integer
리턴 array

getName() 공개 메소드

Gets the name of this DataSift_Source
public getName ( ) : string
리턴 string

getParameters() 공개 메소드

Gets the parameters for this DataSift_Source
public getParameters ( ) : array
리턴 array

getResources() 공개 메소드

Gets the resources for this DataSift_Source
public getResources ( ) : array
리턴 array

getSourceType() 공개 메소드

Gets the type of this DataSift_Source
public getSourceType ( ) : string
리턴 string

getStatus() 공개 메소드

Gets the status of this DataSift_Source
public getStatus ( ) : string
리턴 string

getUser() 공개 메소드

Gets the user this DataSift_Source belongs to
public getUser ( ) : DataSift_User
리턴 DataSift_User

getValidate() 공개 메소드

Ssets the validate status
public getValidate ( ) : boolean
리턴 boolean

listSources() 공개 정적인 메소드

Gets a page of Sources where each page contains up to $perPage items.
public static listSources ( DataSift_User $user, integer $page = 1, integer $perPage = 25, string | false $sourceType = false ) : array
$user DataSift_User The user making the request.
$page integer The page number to fetch.
$perPage integer The number of items per page.
$sourceType string | false The type of source to filter by; false for no filter
리턴 array An array containing the number of sources returned in 'count' and a list of DataSift_Sources in 'sources'

removeAuth() 공개 메소드

Removes authorization credentials for this DataSift_Source using the auth/remove
public removeAuth ( array $authIds )
$authIds array An array of authorization IDs to be removed

removeResource() 공개 메소드

Removes resources for this DataSift_Source using the resource/remove
public removeResource ( array $resourceIds )
$resourceIds array An array of resource IDs to be removed

save() 공개 메소드

Save this Source
public save ( boolean $validate = true ) : DataSift_Source
$validate boolean
리턴 DataSift_Source

setAuth() 공개 메소드

Sets the authorization credentials for this DataSift_Source
public setAuth ( array $auth )
$auth array An array of authorization credentials, appropriate to the Source type

setCreatedAt() 공개 메소드

Sets the created-at timestamp
public setCreatedAt ( integer $createdAt )
$createdAt integer

setId() 공개 메소드

Sets this DataSift_Source's unique identifier
public setId ( string $id )
$id string

setName() 공개 메소드

Sets the name of this DataSift_Source
public setName ( string $name )
$name string

setParameters() 공개 메소드

Sets the parameters for this DataSift_Source, appropriate to the Source type
public setParameters ( array $parameters )
$parameters array

setResources() 공개 메소드

Sets the resources for this DataSift_Source
public setResources ( array $resources )
$resources array An array of resource definitions, appropriate to the Source type

setSourceType() 공개 메소드

Sets the type of this DataSift_Source
public setSourceType ( string $sourceType )
$sourceType string

setStatus() 공개 메소드

Sets the status of this DataSift_Source
public setStatus ( string $status )
$status string A status from one of the allowed Source statuses

setUser() 공개 메소드

Sets the user this DataSift_Source belongs to
public setUser ( DataSift_User $user )
$user DataSift_User

setValidate() 공개 메소드

Ssets the validate status
public setValidate ( boolean $validate )
$validate boolean

start() 공개 메소드

Start this Source
public start ( ) : DataSift_Source
리턴 DataSift_Source

stop() 공개 메소드

Stop this Source
public stop ( ) : DataSift_Source
리턴 DataSift_Source

toArray() 공개 메소드

Converts this Source to an array suitable for transmission to the API
public toArray ( ) : array
리턴 array