Documentation

ListClient extends BaseClient
in package

Tags

Table of Contents

$expansions  : string
Twitter Expansions (comma delimited)
$listFields  : string
Twitter List Fields (comma delimited)
$mediaFields  : string
Twitter Media Fields (comma delimited)
$placeFields  : string
Twitter Place Fields (comma delimited)
$pollFields  : string
Twitter Poll Fields (comma delimited)
$spaceFields  : string
Twitter Space Fields (comma delimited)
$tweetFields  : string
Twitter Tweet Fields (comma delimited)
$userFields  : string
Twitter User Fields (comma delimited)
$accessKey  : string
Twitter User OAuth Access Key
$accessSecret  : string
Twitter User OAuth Access Secret
$apiKey  : string
Twitter Developer API Key
$apiSecret  : string
Twitter Developer API Secret
$baseUrl  : string
Twitter API Base URL
$bearerToken  : string
Twitter Developer Bearer Token
$client  : Client
Guzzle Client
$clientId  : string
Twitter Project Client ID
$clientSecret  : string
Twitter Project Client Secret
__construct()  : mixed
The Client Class Constructor
addListMember()  : bool
createList()  : TwitterList
delete()  : TwitterResponse
Make a DELETE request to the Twitter API.
deleteList()  : bool
followList()  : bool
get()  : TwitterResponse
Make a GET request to the Twitter API.
getAccessToken()  : array<string|int, mixed>
getAuthorizeUrl()  : string
getList()  : TwitterList
Get List Details
getListFollowers()  : Users
getListMembers()  : Users
getListTweets()  : Tweets
getRequestToken()  : array<string|int, mixed>
getUserFollowedLists()  : TwitterLists
getUserMemberships()  : TwitterLists
getUserOwnedLists()  : TwitterLists
getUserPinnedLists()  : TwitterLists
pinList()  : bool
post()  : TwitterResponse
Make a POST request to the Twitter API.
put()  : TwitterResponse
Make a PUT request to the Twitter API.
removeListMember()  : bool
unfollowList()  : bool
unpinList()  : bool
updateList()  : TwitterList

Properties

$expansions

Twitter Expansions (comma delimited)

public string $expansions
Tags

$listFields

Twitter List Fields (comma delimited)

public string $listFields
Tags

$mediaFields

Twitter Media Fields (comma delimited)

public string $mediaFields
Tags

$placeFields

Twitter Place Fields (comma delimited)

public string $placeFields
Tags

$pollFields

Twitter Poll Fields (comma delimited)

public string $pollFields
Tags

$spaceFields

Twitter Space Fields (comma delimited)

public string $spaceFields
Tags

$tweetFields

Twitter Tweet Fields (comma delimited)

public string $tweetFields
Tags

$userFields

Twitter User Fields (comma delimited)

public string $userFields
Tags

$accessKey

Twitter User OAuth Access Key

private string $accessKey
Tags

$accessSecret

Twitter User OAuth Access Secret

private string $accessSecret
Tags

$apiKey

Twitter Developer API Key

private string $apiKey
Tags

$apiSecret

Twitter Developer API Secret

private string $apiSecret
Tags

$baseUrl

Twitter API Base URL

private string $baseUrl
Tags

$bearerToken

Twitter Developer Bearer Token

private string $bearerToken
Tags

$client

Guzzle Client

private Client $client
Tags

$clientId

Twitter Project Client ID

private string $clientId
Tags

$clientSecret

Twitter Project Client Secret

private string $clientSecret
Tags

Methods

__construct()

The Client Class Constructor

public __construct([string|null $apiKey = null ][, string|null $apiSecret = null ][, string|null $accessToken = null ][, string|null $accessSecret = null ][, string|null $bearerToken = null ]) : mixed

The client can be initialized with a combination of API keys, depending on the endpoint. Most get requests only require a bearer token, but some require a user access token. Should only be called privately from scoped clients.

Parameters
$apiKey : string|null = null
$apiSecret : string|null = null
$accessToken : string|null = null
$accessSecret : string|null = null
$bearerToken : string|null = null
Tags
Return values
mixed

addListMember()

public addListMember(string $id, string $userId) : bool
Parameters
$id : string
$userId : string
Tags
Return values
bool

createList()

public createList(string $name[, string $description = null ][, bool|null $private = false ]) : TwitterList
Parameters
$name : string
$description : string = null
$private : bool|null = false
Tags
Return values
TwitterList

delete()

Make a DELETE request to the Twitter API.

public delete(string $endpoint, array<string|int, mixed> $data) : TwitterResponse
Parameters
$endpoint : string
$data : array<string|int, mixed>
Tags
Return values
TwitterResponse

deleteList()

public deleteList(string $id) : bool
Parameters
$id : string
Tags
Return values
bool

followList()

public followList(string $listId, string $userId) : bool
Parameters
$listId : string
$userId : string
Tags
Return values
bool

get()

Make a GET request to the Twitter API.

public get(string $endpoint[, array<string|int, mixed>|null $params = null ]) : TwitterResponse
Parameters
$endpoint : string
$params : array<string|int, mixed>|null = null
Tags
Return values
TwitterResponse

getAccessToken()

public getAccessToken(string $oauthToken, string $oauthSecret, string $oauthVerifier) : array<string|int, mixed>
Parameters
$oauthToken : string
$oauthSecret : string
$oauthVerifier : string
Tags
Return values
array<string|int, mixed>

getAuthorizeUrl()

public getAuthorizeUrl(array<string|int, mixed> $requestToken) : string
Parameters
$requestToken : array<string|int, mixed>
Tags
Return values
string

getListFollowers()

public getListFollowers(string $id) : Users
Parameters
$id : string
Tags
Return values
Users

getListMembers()

public getListMembers(string $id) : Users
Parameters
$id : string
Tags
Return values
Users

getListTweets()

public getListTweets(string $id) : Tweets
Parameters
$id : string
Tags
Return values
Tweets

getRequestToken()

public getRequestToken(string $oauthCallback) : array<string|int, mixed>
Parameters
$oauthCallback : string
Tags
Return values
array<string|int, mixed>

pinList()

public pinList(string $listId, string $userId) : bool
Parameters
$listId : string
$userId : string
Tags
Return values
bool

post()

Make a POST request to the Twitter API.

public post(string $endpoint[, array<string|int, mixed>|null $data = null ]) : TwitterResponse
Parameters
$endpoint : string
$data : array<string|int, mixed>|null = null
Tags
Return values
TwitterResponse

put()

Make a PUT request to the Twitter API.

public put(string $endpoint[, array<string|int, mixed>|null $data = null ]) : TwitterResponse
Parameters
$endpoint : string
$data : array<string|int, mixed>|null = null
Tags
Return values
TwitterResponse

removeListMember()

public removeListMember(string $id, string $userId) : bool
Parameters
$id : string
$userId : string
Tags
Return values
bool

unfollowList()

public unfollowList(string $listId, string $userId) : bool
Parameters
$listId : string
$userId : string
Tags
Return values
bool

unpinList()

public unpinList(string $listId, string $userId) : bool
Parameters
$listId : string
$userId : string
Tags
Return values
bool

updateList()

public updateList(string $id, string $name[, string $description = null ][, bool|null $private = false ]) : TwitterList
Parameters
$id : string
$name : string
$description : string = null
$private : bool|null = false
Tags
Return values
TwitterList

        

Search results