Spade

Mini Shell

Directory:~$ /proc/self/root/home/lmsyaran/public_html/css/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/home/lmsyaran/public_html/css/twitter.zip

PK���[�v^�	block.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Block class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterBlock extends JTwitterObject
{
	/**
	 * Method to get the user ids the authenticating user is blocking.
	 *
	 * @param   boolean  $stringifyIds  Provide this option to have ids
returned as strings instead.
	 * @param   integer  $cursor        Causes the list of IDs to be broken
into pages of no more than 5000 IDs at a time. The number of IDs returned
	 *                                  is not guaranteed to be 5000 as
suspended users are filtered out after connections are queried. If no
cursor
	 *                                  is provided, a value of -1 will be
assumed, which is the first "page."
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getBlocking($stringifyIds = null, $cursor = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('blocks', 'ids');

		$data = array();

		// Check if stringify_ids is specified
		if (!is_null($stringifyIds))
		{
			$data['stringify_ids'] = $stringifyIds;
		}

		// Check if cursor is specified
		if (!is_null($stringifyIds))
		{
			$data['cursor'] = $cursor;
		}

		// Set the API path
		$path = '/blocks/ids.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to block the specified user from following the authenticating
user.
	 *
	 * @param   mixed    $user        Either an integer containing the user ID
or a string containing the screen name.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
	 *                                variety of metadata about the tweet in a
discreet structure, including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function block($user, $entities = null, $skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('blocks', 'create');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_statuses is specified
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Set the API path
		$path = '/blocks/create.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to unblock the specified user from following the authenticating
user.
	 *
	 * @param   mixed    $user        Either an integer containing the user ID
or a string containing the screen name.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
	 *                                variety of metadata about the tweet in a
discreet structure, including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function unblock($user, $entities = null, $skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('blocks', 'destroy');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_statuses is specified
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Set the API path
		$path = '/blocks/destroy.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}
}
PK���[$/����directmessages.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Direct Messages class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterDirectmessages extends JTwitterObject
{
	/**
	 * Method to get the most recent direct messages sent to the
authenticating user.
	 *
	 * @param   integer  $sinceId     Returns results with an ID greater than
(that is, more recent than) the specified ID.
	 * @param   integer  $maxId       Returns results with an ID less than
(that is, older than) or equal to the specified ID.
	 * @param   integer  $count       Specifies the number of direct messages
to try and retrieve, up to a maximum of 200.
	 * @param   boolean  $entities    When set to true,  each tweet will
include a node called "entities,". This node offers a variety of
metadata
	 *                                about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getDirectMessages($sinceId = 0, $maxId =  0, $count = 20,
$entities = null, $skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('direct_messages');

		// Set the API path
		$path = '/direct_messages.json';

		// Check if since_id is specified.
		if ($sinceId)
		{
			$data['since_id'] = $sinceId;
		}

		// Check if max_id is specified.
		if ($maxId)
		{
			$data['max_id'] = $maxId;
		}

		// Check if count is specified.
		if ($count)
		{
			$data['count'] = $count;
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified.
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get the most recent direct messages sent by the
authenticating user.
	 *
	 * @param   integer  $sinceId   Returns results with an ID greater than
(that is, more recent than) the specified ID.
	 * @param   integer  $maxId     Returns results with an ID less than (that
is, older than) or equal to the specified ID.
	 * @param   integer  $count     Specifies the number of direct messages to
try and retrieve, up to a maximum of 200.
	 * @param   integer  $page      Specifies the page of results to retrieve.
	 * @param   boolean  $entities  When set to true,  each tweet will include
a node called "entities,". This node offers a variety of metadata
	 *                              about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getSentDirectMessages($sinceId = 0, $maxId =  0, $count =
20, $page = 0, $entities = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('direct_messages', 'sent');

		// Set the API path
		$path = '/direct_messages/sent.json';

		// Check if since_id is specified.
		if ($sinceId)
		{
			$data['since_id'] = $sinceId;
		}

		// Check if max_id is specified.
		if ($maxId)
		{
			$data['max_id'] = $maxId;
		}

		// Check if count is specified.
		if ($count)
		{
			$data['count'] = $count;
		}

		// Check if page is specified.
		if ($page)
		{
			$data['page'] = $page;
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to send a new direct message to the specified user from the
authenticating user.
	 *
	 * @param   mixed   $user  Either an integer containing the user ID or a
string containing the screen name.
	 * @param   string  $text  The text of your direct message. Be sure to
keep the message under 140 characters.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function sendDirectMessages($user, $text)
	{
		// Set the API path
		$path = '/direct_messages/new.json';

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		$data['text'] = $text;

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to get a single direct message, specified by an id parameter.
	 *
	 * @param   integer  $id  The ID of the direct message.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getDirectMessagesById($id)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('direct_messages', 'show');

		// Set the API path
		$path = '/direct_messages/show.json';

		$data['id'] = $id;

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to delete the direct message specified in the required ID
parameter.
	 *
	 * @param   integer  $id        The ID of the direct message.
	 * @param   boolean  $entities  When set to true,  each tweet will include
a node called "entities,". This node offers a variety of metadata
	 *                              about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function deleteDirectMessages($id, $entities = null)
	{
		// Set the API path
		$path = '/direct_messages/destroy.json';

		$data['id'] = $id;

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}
}
PK���[�lS���
favorites.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Favorites class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterFavorites extends JTwitterObject
{
	/**
	 * Method to get the most recent favorite statuses for the authenticating
or specified user.
	 *
	 * @param   mixed    $user      Either an integer containing the user ID
or a string containing the screen name.
	 * @param   integer  $count     Specifies the number of tweets to try and
retrieve, up to a maximum of 200.  Retweets are always included
	 *                              in the count, so it is always suggested to
set $includeRts to true
	 * @param   integer  $sinceId   Returns results with an ID greater than
(that is, more recent than) the specified ID.
	 * @param   integer  $maxId     Returns results with an ID less than (that
is, older than) the specified ID.
	 * @param   boolean  $entities  When set to true,  each tweet will include
a node called "entities,". This node offers a variety
	 * 								of metadata about the tweet in a discreet structure, including:
user_mentions, urls, and hashtags.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getFavorites($user = null, $count = 20, $sinceId = 0,
$maxId = 0, $entities = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('favorites', 'list');

		// Set the API path.
		$path = '/favorites/list.json';

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}

		// Set the count string
		$data['count'] = $count;

		// Check if since_id is specified.
		if ($sinceId > 0)
		{
			$data['since_id'] = $sinceId;
		}

		// Check if max_id is specified.
		if ($maxId > 0)
		{
			$data['max_id'] = $maxId;
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to favorite the status specified in the ID parameter as the
authenticating user
	 *
	 * @param   integer  $id        The numerical ID of the desired status.
	 * @param   boolean  $entities  When set to true,  each tweet will include
a node called "entities,". This node offers a variety
	 * 								of metadata about the tweet in a discreet structure, including:
user_mentions, urls, and hashtags.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function createFavorites($id, $entities = null)
	{
		// Set the API path.
		$path = '/favorites/create.json';

		$data['id'] = $id;

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to un-favorites the status specified in the ID parameter as the
authenticating user.
	 *
	 * @param   integer  $id        The numerical ID of the desired status.
	 * @param   boolean  $entities  When set to true,  each tweet will include
a node called "entities,". This node offers a variety
	 * 								of metadata about the tweet in a discreet structure, including:
user_mentions, urls, and hashtags.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function deleteFavorites($id, $entities = null)
	{
		// Set the API path.
		$path = '/favorites/destroy.json';

		$data['id'] = $id;

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}
}
PK���[��33friends.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Friends class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterFriends extends JTwitterObject
{
	/**
	 * Method to get an array of user IDs the specified user follows.
	 *
	 * @param   mixed    $user       Either an integer containing the user ID
or a string containing the screen name.
	 * @param   integer  $cursor     Causes the list of connections to be
broken into pages of no more than 5000 IDs at a time.
	 * 							     The number of IDs returned is not guaranteed to be 5000 as
suspended users are filtered out
	 * 								 after connections are queried. If no cursor is provided, a
value of -1 will be assumed, which is the first "page."
	 * @param   boolean  $stringIds  Set to true to return IDs as strings,
false to return as integers.
	 * @param   integer  $count      Specifies the number of IDs attempt
retrieval of, up to a maximum of 5,000 per distinct request.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getFriendIds($user, $cursor = null, $stringIds = null,
$count = 0)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('friends', 'ids');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Check if cursor is specified
		if (!is_null($cursor))
		{
			$data['cursor'] = $cursor;
		}

		// Check if string_ids is true
		if ($stringIds)
		{
			$data['stringify_ids'] = $stringIds;
		}

		// Check if count is specified
		if ($count > 0)
		{
			$data['count'] = $count;
		}

		// Set the API path
		$path = '/friends/ids.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to display detailed friend information between two users.
	 *
	 * @param   mixed  $userA  Either an integer containing the user ID or a
string containing the screen name of the first user.
	 * @param   mixed  $userB  Either an integer containing the user ID or a
string containing the screen name of the second user.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getFriendshipDetails($userA, $userB)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('friendships', 'show');

		// Determine which type of data was passed for $userA
		if (is_numeric($userA))
		{
			$data['source_id'] = $userA;
		}
		elseif (is_string($userA))
		{
			$data['source_screen_name'] = $userA;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The first specified username is not in
the correct format; must use integer or string');
		}

		// Determine which type of data was passed for $userB
		if (is_numeric($userB))
		{
			$data['target_id'] = $userB;
		}
		elseif (is_string($userB))
		{
			$data['target_screen_name'] = $userB;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The second specified username is not in
the correct format; must use integer or string');
		}

		// Set the API path
		$path = '/friendships/show.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get an array of user IDs the specified user is followed by.
	 *
	 * @param   mixed    $user       Either an integer containing the user ID
or a string containing the screen name.
	 * @param   integer  $cursor     Causes the list of IDs to be broken into
pages of no more than 5000 IDs at a time. The number of IDs returned
	 *                               is not guaranteed to be 5000 as suspended
users are filtered out after connections are queried. If no cursor
	 * 								 is provided, a value of -1 will be assumed, which is the first
"page."
	 * @param   boolean  $stringIds  Set to true to return IDs as strings,
false to return as integers.
	 * @param   integer  $count      Specifies the number of IDs attempt
retrieval of, up to a maximum of 5,000 per distinct request.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getFollowerIds($user, $cursor = null, $stringIds = null,
$count = 0)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('followers', 'ids');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/followers/ids.json';

		// Check if cursor is specified
		if (!is_null($cursor))
		{
			$data['cursor'] = $cursor;
		}

		// Check if string_ids is specified
		if (!is_null($stringIds))
		{
			$data['stringify_ids'] = $stringIds;
		}

		// Check if count is specified
		if (!is_null($count))
		{
			$data['count'] = $count;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to determine pending requests to follow the authenticating user.
	 *
	 * @param   integer  $cursor     Causes the list of IDs to be broken into
pages of no more than 5000 IDs at a time. The number of IDs returned
	 * 								 is not guaranteed to be 5000 as suspended users are filtered
out after connections are queried. If no cursor
	 * 								 is provided, a value of -1 will be assumed, which is the first
"page."
	 * @param   boolean  $stringIds  Set to true to return IDs as strings,
false to return as integers.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getFriendshipsIncoming($cursor = null, $stringIds = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('friendships', 'incoming');

		$data = array();

		// Check if cursor is specified
		if (!is_null($cursor))
		{
			$data['cursor'] = $cursor;
		}

		// Check if string_ids is specified
		if (!is_null($stringIds))
		{
			$data['stringify_ids'] = $stringIds;
		}

		// Set the API path
		$path = '/friendships/incoming.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to determine every protected user for whom the authenticating
user has a pending follow request.
	 *
	 * @param   integer  $cursor     Causes the list of IDs to be broken into
pages of no more than 5000 IDs at a time. The number of IDs returned
	 * 								 is not guaranteed to be 5000 as suspended users are filtered
out after connections are queried. If no cursor
	 *                               is provided, a value of -1 will be
assumed, which is the first "page."
	 * @param   boolean  $stringIds  Set to true to return IDs as strings,
false to return as integers.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getFriendshipsOutgoing($cursor = null, $stringIds = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('friendships', 'outgoing');

		$data = array();

		// Check if cursor is specified
		if (!is_null($cursor))
		{
			$data['cursor'] = $cursor;
		}

		// Check if string_ids is specified
		if (!is_null($stringIds))
		{
			$data['stringify_ids'] = $stringIds;
		}

		// Set the API path
		$path = '/friendships/outgoing.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Allows the authenticating users to follow the user specified in the ID
parameter.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the screen name.
	 * @param   boolean  $follow  Enable notifications for the target user.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function follow($user, $follow = false)
	{
		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Check if follow is true
		if ($follow)
		{
			$data['follow'] = $follow;
		}

		// Set the API path
		$path = '/friendships/create.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Allows the authenticating users to unfollow the user specified in the
ID parameter.
	 *
	 * @param   mixed  $user  Either an integer containing the user ID or a
string containing the screen name.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function unfollow($user)
	{
		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/friendships/destroy.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to get the relationship of the authenticating user to the comma
separated list of up to 100 screen_names or user_ids provided.
	 *
	 * @param   string  $screenName  A comma separated list of screen names,
up to 100 are allowed in a single request.
	 * @param   string  $id          A comma separated list of user IDs, up to
100 are allowed in a single request.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getFriendshipsLookup($screenName = null, $id = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('friendships', 'lookup');

		// Set user IDs and screen names.
		if ($id)
		{
			$data['user_id'] = $id;
		}

		if ($screenName)
		{
			$data['screen_name'] = $screenName;
		}

		if ($id == null && $screenName == null)
		{
			// We don't have a valid entry
			throw new RuntimeException('You must specify either a comma
separated list of screen names, user IDs, or a combination of the
two');
		}

		// Set the API path
		$path = '/friendships/lookup.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Allows one to enable or disable retweets and device notifications from
the specified user.
	 *
	 * @param   mixed    $user      Either an integer containing the user ID
or a string containing the screen name.
	 * @param   boolean  $device    Enable/disable device notifications from
the target user.
	 * @param   boolean  $retweets  Enable/disable retweets from the target
user.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function updateFriendship($user, $device = null, $retweets = null)
	{
		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Check if device is specified.
		if (!is_null($device))
		{
			$data['device'] = $device;
		}

		// Check if retweets is specified.
		if (!is_null($retweets))
		{
			$data['retweets'] = $retweets;
		}

		// Set the API path
		$path = '/friendships/update.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to get the user ids that currently authenticated user does not
want to see retweets from.
	 *
	 * @param   boolean  $stringIds  Set to true to return IDs as strings,
false to return as integers.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getFriendshipNoRetweetIds($stringIds = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('friendships',
'no_retweets/ids');

		$data = array();

		// Check if string_ids is specified
		if (!is_null($stringIds))
		{
			$data['stringify_ids'] = $stringIds;
		}

		// Set the API path
		$path = '/friendships/no_retweets/ids.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}
}
PK���[BD�]]help.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Help class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterHelp extends JTwitterObject
{
	/**
	 * Method to get the supported languages from the API.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getLanguages()
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('help', 'languages');

		// Set the API path
		$path = '/help/languages.json';

		// Send the request.
		return $this->sendRequest($path);
	}

	/**
	 * Method to get the current configuration used by Twitter including
twitter.com slugs which are not usernames,
	 * maximum photo resolutions, and t.co URL lengths.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getConfiguration()
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('help', 'configuration');

		// Set the API path
		$path = '/help/configuration.json';

		// Send the request.
		return $this->sendRequest($path);
	}
}
PK���[���(m(m	lists.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Lists class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterLists extends JTwitterObject
{
	/**
	 * Method to get all lists the authenticating or specified user subscribes
to, including their own.
	 *
	 * @param   mixed    $user     Either an integer containing the user ID or
a string containing the screen name.
	 * @param   boolean  $reverse  Set this to true if you would like owned
lists to be returned first. See description
	 * 					 above for information on how this parameter works.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getLists($user, $reverse = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'list');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Check if reverse is specified.
		if (!is_null($reverse))
		{
			$data['reverse'] = $reverse;
		}

		// Set the API path
		$path = '/lists/list.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get tweet timeline for members of the specified list
	 *
	 * @param   mixed    $list        Either an integer containing the list ID
or a string containing the list slug.
	 * @param   mixed    $owner       Either an integer containing the user ID
or a string containing the screen name.
	 * @param   integer  $sinceId     Returns results with an ID greater than
(that is, more recent than) the specified ID.
	 * @param   integer  $maxId       Returns results with an ID less than
(that is, older than) or equal to the specified ID.
	 * @param   integer  $count       Specifies the number of results to
retrieve per "page."
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities". This node offers a
variety
	 * 								  of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $includeRts  When set to either true, t or 1, the
list timeline will contain native retweets (if they exist) in addition
	 * 								  to the standard stream of tweets.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getStatuses($list, $owner = null, $sinceId = 0, $maxId =
0, $count = 0, $entities = null, $includeRts = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'statuses');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/statuses.json';

		// Check if since_id is specified
		if ($sinceId > 0)
		{
			$data['since_id'] = $sinceId;
		}

		// Check if max_id is specified
		if ($maxId > 0)
		{
			$data['max_id'] = $maxId;
		}

		// Check if count is specified
		if ($count > 0)
		{
			$data['count'] = $count;
		}

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if include_rts is specified
		if (!is_null($includeRts))
		{
			$data['include_rts'] = $includeRts;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get the subscribers of the specified list.
	 *
	 * @param   mixed    $list        Either an integer containing the list ID
or a string containing the list slug.
	 * @param   mixed    $owner       Either an integer containing the user ID
or a string containing the screen name.
	 * @param   integer  $cursor      Breaks the results into pages. A single
page contains 20 lists. Provide a value of -1 to begin paging.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities". This node offers a
variety
	 * 								  of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getSubscribers($list, $owner = null, $cursor = null,
$entities = null, $skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'subscribers');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/subscribers.json';

		// Check if cursor is specified
		if (!is_null($cursor))
		{
			$data['cursor'] = $cursor;
		}

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to remove multiple members from a list, by specifying a
comma-separated list of member ids or screen names.
	 *
	 * @param   mixed   $list        Either an integer containing the list ID
or a string containing the list slug.
	 * @param   string  $userId      A comma separated list of user IDs, up to
100 are allowed in a single request.
	 * @param   string  $screenName  A comma separated list of screen names,
up to 100 are allowed in a single request.
	 * @param   mixed   $owner       Either an integer containing the user ID
or a string containing the screen name of the owner.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function deleteMembers($list, $userId = null, $screenName = null,
$owner = null)
	{
		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username for owner is
not in the correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		if ($userId)
		{
			$data['user_id'] = $userId;
		}

		if ($screenName)
		{
			$data['screen_name'] = $screenName;
		}

		if ($userId == null && $screenName == null)
		{
			// We don't have a valid entry
			throw new RuntimeException('You must specify either a comma
separated list of screen names, user IDs, or a combination of the
two');
		}

		// Set the API path
		$path = '/lists/members/destroy_all.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to subscribe the authenticated user to the specified list.
	 *
	 * @param   mixed  $list   Either an integer containing the list ID or a
string containing the list slug.
	 * @param   mixed  $owner  Either an integer containing the user ID or a
string containing the screen name of the owner.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function subscribe($list, $owner = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists',
'subscribers/create');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username for owner is
not in the correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/subscribers/create.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to check if the specified user is a member of the specified
list.
	 *
	 * @param   mixed    $list        Either an integer containing the list ID
or a string containing the list slug.
	 * @param   mixed    $user        Either an integer containing the user ID
or a string containing the screen name of the user to remove.
	 * @param   mixed    $owner       Either an integer containing the user ID
or a string containing the screen name of the owner.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities". This node offers a
	 * 								  variety of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function isMember($list, $user, $owner = null, $entities = null,
$skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'members/show');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/members/show.json';

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to check if the specified user is a subscriber of the specified
list.
	 *
	 * @param   mixed    $list        Either an integer containing the list ID
or a string containing the list slug.
	 * @param   mixed    $user        Either an integer containing the user ID
or a string containing the screen name of the user to remove.
	 * @param   mixed    $owner       Either an integer containing the user ID
or a string containing the screen name of the owner.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities". This node offers a
	 * 								  variety of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function isSubscriber($list, $user, $owner = null, $entities =
null, $skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists',
'subscribers/show');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/subscribers/show.json';

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to unsubscribe the authenticated user from the specified list.
	 *
	 * @param   mixed  $list   Either an integer containing the list ID or a
string containing the list slug.
	 * @param   mixed  $owner  Either an integer containing the user ID or a
string containing the screen name of the owner.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function unsubscribe($list, $owner = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists',
'subscribers/destroy');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/subscribers/destroy.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to add multiple members to a list, by specifying a
comma-separated list of member ids or screen names.
	 *
	 * @param   mixed   $list        Either an integer containing the list ID
or a string containing the list slug.
	 * @param   string  $userId      A comma separated list of user IDs, up to
100 are allowed in a single request.
	 * @param   string  $screenName  A comma separated list of screen names,
up to 100 are allowed in a single request.
	 * @param   mixed   $owner       Either an integer containing the user ID
or a string containing the screen name of the owner.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function addMembers($list, $userId = null, $screenName = null,
$owner = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists',
'members/create_all');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		if ($userId)
		{
			$data['user_id'] = $userId;
		}

		if ($screenName)
		{
			$data['screen_name'] = $screenName;
		}

		if ($userId == null && $screenName == null)
		{
			// We don't have a valid entry
			throw new RuntimeException('You must specify either a comma
separated list of screen names, user IDs, or a combination of the
two');
		}

		// Set the API path
		$path = '/lists/members/create_all.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to get the members of the specified list.
	 *
	 * @param   mixed    $list        Either an integer containing the list ID
or a string containing the list slug.
	 * @param   mixed    $owner       Either an integer containing the user ID
or a string containing the screen name.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities". This node offers a
variety
	 * 								  of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getMembers($list, $owner = null, $entities = null,
$skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'members');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/members.json';

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get the specified list.
	 *
	 * @param   mixed  $list   Either an integer containing the list ID or a
string containing the list slug.
	 * @param   mixed  $owner  Either an integer containing the user ID or a
string containing the screen name.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getListById($list, $owner = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'show');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/show.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get a collection of the lists the specified user is
subscribed to, 20 lists per page by default. Does not include the
user's own lists.
	 *
	 * @param   mixed    $user    Either an integer containing the user ID or
a string containing the screen name.
	 * @param   integer  $count   The amount of results to return per page.
Defaults to 20. Maximum of 1,000 when using cursors.
	 * @param   integer  $cursor  Breaks the results into pages. Provide a
value of -1 to begin paging.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getSubscriptions($user, $count = 0, $cursor = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'subscriptions');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Check if count is specified.
		if ($count > 0)
		{
			$data['count'] = $count;
		}

		// Check if cursor is specified.
		if (!is_null($cursor))
		{
			$data['cursor'] = $cursor;
		}

		// Set the API path
		$path = '/lists/subscriptions.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to update the specified list
	 *
	 * @param   mixed   $list         Either an integer containing the list ID
or a string containing the list slug.
	 * @param   mixed   $owner        Either an integer containing the user ID
or a string containing the screen name of the owner.
	 * @param   string  $name         The name of the list.
	 * @param   string  $mode         Whether your list is public or private.
Values can be public or private. If no mode is
	 * 								  specified the list will be public.
	 * @param   string  $description  The description to give the list.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function update($list, $owner = null, $name = null, $mode = null,
$description = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'update');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		// Check if name is specified.
		if ($name)
		{
			$data['name'] = $name;
		}

		// Check if mode is specified.
		if ($mode)
		{
			$data['mode'] = $mode;
		}

		// Check if description is specified.
		if ($description)
		{
			$data['description'] = $description;
		}

		// Set the API path
		$path = '/lists/update.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to create a new list for the authenticated user.
	 *
	 * @param   string  $name         The name of the list.
	 * @param   string  $mode         Whether your list is public or private.
Values can be public or private. If no mode is
	 * 								  specified the list will be public.
	 * @param   string  $description  The description to give the list.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function create($name, $mode = null, $description = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'create');

		// Check if name is specified.
		if ($name)
		{
			$data['name'] = $name;
		}

		// Check if mode is specified.
		if ($mode)
		{
			$data['mode'] = $mode;
		}

		// Check if description is specified.
		if ($description)
		{
			$data['description'] = $description;
		}

		// Set the API path
		$path = '/lists/create.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to delete a specified list.
	 *
	 * @param   mixed  $list   Either an integer containing the list ID or a
string containing the list slug.
	 * @param   mixed  $owner  Either an integer containing the user ID or a
string containing the screen name of the owner.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function delete($list, $owner = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('lists', 'destroy');

		// Determine which type of data was passed for $list
		if (is_numeric($list))
		{
			$data['list_id'] = $list;
		}
		elseif (is_string($list))
		{
			$data['slug'] = $list;

			// In this case the owner is required.
			if (is_numeric($owner))
			{
				$data['owner_id'] = $owner;
			}
			elseif (is_string($owner))
			{
				$data['owner_screen_name'] = $owner;
			}
			else
			{
				// We don't have a valid entry
				throw new RuntimeException('The specified username for owner is
not in the correct format; must use integer or string');
			}
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified list is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/lists/destroy.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}
}
PK���[9�%�n
n
	oauth.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

use Joomla\Registry\Registry;

/**
 * Joomla Platform class for generating Twitter API access token.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterOAuth extends JOAuth1Client
{
	/**
	* @var    Registry  Options for the JTwitterOauth object.
	* @since  3.1.4
	*/
	protected $options;

	/**
	 * Constructor.
	 *
	 * @param   Registry         $options      JTwitterOauth options object.
	 * @param   JHttp            $client       The HTTP client object.
	 * @param   JInput           $input        The input object.
	 * @param   JApplicationWeb  $application  The application object.
	 *
	 * @since   3.1.4
	 */
	public function __construct(Registry $options = null, JHttp $client =
null, JInput $input = null, JApplicationWeb $application = null)
	{
		$this->options = isset($options) ? $options : new Registry;

		$this->options->def('accessTokenURL',
'https://api.twitter.com/oauth/access_token');
		$this->options->def('authenticateURL',
'https://api.twitter.com/oauth/authenticate');
		$this->options->def('authoriseURL',
'https://api.twitter.com/oauth/authorize');
		$this->options->def('requestTokenURL',
'https://api.twitter.com/oauth/request_token');

		// Call the JOAuth1Client constructor to setup the object.
		parent::__construct($this->options, $client, $input, $application);
	}

	/**
	 * Method to verify if the access token is valid by making a request.
	 *
	 * @return  boolean  Returns true if the access token is valid and false
otherwise.
	 *
	 * @since   3.1.4
	 */
	public function verifyCredentials()
	{
		$token = $this->getToken();

		// Set the parameters.
		$parameters = array('oauth_token' =>
$token['key']);

		// Set the API base
		$path =
'https://api.twitter.com/1.1/account/verify_credentials.json';

		// Send the request.
		$response = $this->oauthRequest($path, 'GET', $parameters);

		// Verify response
		if ($response->code == 200)
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	/**
	 * Ends the session of the authenticating user, returning a null cookie.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function endSession()
	{
		$token = $this->getToken();

		// Set parameters.
		$parameters = array('oauth_token' =>
$token['key']);

		// Set the API base
		$path = 'https://api.twitter.com/1.1/account/end_session.json';

		// Send the request.
		$response = $this->oauthRequest($path, 'POST', $parameters);

		return json_decode($response->body);
	}

	/**
	 * Method to validate a response.
	 *
	 * @param   string         $url       The request URL.
	 * @param   JHttpResponse  $response  The response to validate.
	 *
	 * @return  void
	 *
	 * @since  3.1.4
	 * @throws DomainException
	 */
	public function validateResponse($url, $response)
	{
		if (strpos($url, 'verify_credentials') === false &&
$response->code != 200)
		{
			$error = json_decode($response->body);

			if (property_exists($error, 'error'))
			{
				throw new DomainException($error->error);
			}
			else
			{
				$error = $error->errors;
				throw new DomainException($error[0]->message, $error[0]->code);
			}
		}
	}
}
PK���[,�bBB
object.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

use Joomla\Registry\Registry;

/**
 * Twitter API object class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
abstract class JTwitterObject
{
	/**
	 * @var    Registry  Options for the Twitter object.
	 * @since  3.1.4
	 */
	protected $options;

	/**
	 * @var    JHttp  The HTTP client object to use in sending HTTP requests.
	 * @since  3.1.4
	 */
	protected $client;

	/**
	 * @var    JTwitterOAuth The OAuth client.
	 * @since  3.1.4
	 */
	protected $oauth;

	/**
	 * Constructor.
	 *
	 * @param   Registry       &$options  Twitter options object.
	 * @param   JHttp          $client    The HTTP client object.
	 * @param   JTwitterOAuth  $oauth     The OAuth client.
	 *
	 * @since   3.1.4
	 */
	public function __construct(Registry &$options = null, JHttp $client =
null, JTwitterOAuth $oauth = null)
	{
		$this->options = isset($options) ? $options : new Registry;
		$this->client = isset($client) ? $client : new
JHttp($this->options);
		$this->oauth = $oauth;
	}

	/**
	 * Method to check the rate limit for the requesting IP address
	 *
	 * @param   string  $resource  A resource or a comma-separated list of
resource families you want to know the current rate limit disposition for.
	 * @param   string  $action    An action for the specified resource, if
only one resource is specified.
	 *
	 * @return  void
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function checkRateLimit($resource = null, $action = null)
	{
		// Check the rate limit for remaining hits
		$rate_limit = $this->getRateLimit($resource);

		$property = '/' . $resource;

		if (!is_null($action))
		{
			$property .= '/' . $action;
		}

		if ($rate_limit->resources->$resource->$property->remaining
== 0)
		{
			// The IP has exceeded the Twitter API rate limit
			throw new RuntimeException('This server has exceed the Twitter API
rate limit for the given period.  The limit will reset at '
				. $rate_limit->resources->$resource->$property->reset
			);
		}
	}

	/**
	 * Method to build and return a full request URL for the request.  This
method will
	 * add appropriate pagination details if necessary and also prepend the
API url
	 * to have a complete URL for the request.
	 *
	 * @param   string  $path        URL to inflect
	 * @param   array   $parameters  The parameters passed in the URL.
	 *
	 * @return  string  The request URL.
	 *
	 * @since   3.1.4
	 */
	public function fetchUrl($path, $parameters = null)
	{
		if ($parameters)
		{
			foreach ($parameters as $key => $value)
			{
				if (strpos($path, '?') === false)
				{
					$path .= '?' . $key . '=' . $value;
				}
				else
				{
					$path .= '&' . $key . '=' . $value;
				}
			}
		}

		// Get a new JUri object focusing the api url and given path.
		if (strpos($path, 'http://search.twitter.com/search.json') ===
false)
		{
			$uri = new JUri($this->options->get('api.url') . $path);
		}
		else
		{
			$uri = new JUri($path);
		}

		return (string) $uri;
	}

	/**
	 * Method to retrieve the rate limit for the requesting IP address
	 *
	 * @param   string  $resource  A resource or a comma-separated list of
resource families you want to know the current rate limit disposition for.
	 *
	 * @return  array  The JSON response decoded
	 *
	 * @since   3.1.4
	 */
	public function getRateLimit($resource)
	{
		// Build the request path.
		$path = '/application/rate_limit_status.json';

		if (!is_null($resource))
		{
			return $this->sendRequest($path, 'GET', 
array('resources' => $resource));
		}

		return $this->sendRequest($path);
	}

	/**
	 * Method to send the request.
	 *
	 * @param   string  $path     The path of the request to make
	 * @param   string  $method   The request method.
	 * @param   mixed   $data     Either an associative array or a string to
be sent with the post request.
	 * @param   array   $headers  An array of name-value pairs to include in
the header of the request
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function sendRequest($path, $method = 'GET', $data =
array(), $headers = array())
	{
		// Get the access token.
		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters['oauth_token'] = $token['key'];

		// Send the request.
		$response = $this->oauth->oauthRequest($this->fetchUrl($path),
$method, $parameters, $data, $headers);

		if (strpos($path, 'update_with_media') !== false)
		{
			// Check Media Rate Limit.
			$response_headers = $response->headers;

			if ($response_headers['x-mediaratelimit-remaining'] == 0)
			{
				// The IP has exceeded the Twitter API media rate limit
				throw new RuntimeException('This server has exceed the Twitter API
media rate limit for the given period.  The limit will reset in '
					. $response_headers['x-mediaratelimit-reset'] .
'seconds.'
				);
			}
		}

		if (strpos($response->body, 'redirected') !== false)
		{
			return $response->headers['Location'];
		}

		return json_decode($response->body);
	}

	/**
	 * Get an option from the JTwitterObject instance.
	 *
	 * @param   string  $key  The name of the option to get.
	 *
	 * @return  mixed  The option value.
	 *
	 * @since   3.1.4
	 */
	public function getOption($key)
	{
		return $this->options->get($key);
	}

	/**
	 * Set an option for the JTwitterObject instance.
	 *
	 * @param   string  $key    The name of the option to set.
	 * @param   mixed   $value  The option value to set.
	 *
	 * @return  JTwitterObject  This object for method chaining.
	 *
	 * @since   3.1.4
	 */
	public function setOption($key, $value)
	{
		$this->options->set($key, $value);

		return $this;
	}
}
PK���[�ԯ�!�!
places.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Places & Geo class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterPlaces extends JTwitterObject
{
	/**
	 * Method to get all the information about a known place.
	 *
	 * @param   string  $id  A place in the world. These IDs can be retrieved
using getGeocode.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getPlace($id)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('geo', 'id/:place_id');

		// Set the API path
		$path = '/geo/id/' . $id . '.json';

		// Send the request.
		return $this->sendRequest($path);
	}

	/**
	 * Method to get up to 20 places that can be used as a place_id when
updating a status.
	 *
	 * @param   float    $lat          The latitude to search around.
	 * @param   float    $long         The longitude to search around.
	 * @param   string   $accuracy     A hint on the "region" in
which to search. If a number, then this is a radius in meters,
	 * 								   but it can also take a string that is suffixed with ft to
specify feet.
	 * @param   string   $granularity  This is the minimal granularity of
place types to return and must be one of: poi, neighborhood,
	 * 								   city, admin or country.
	 * @param   integer  $maxResults   A hint as to the number of results to
return.
	 * @param   string   $callback     If supplied, the response will use the
JSONP format with a callback of the given name.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getGeocode($lat, $long, $accuracy = null, $granularity =
null, $maxResults = 0, $callback = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('geo', 'reverse_geocode');

		// Set the API path
		$path = '/geo/reverse_geocode.json';

		// Set the request parameters
		$data['lat'] = $lat;
		$data['long'] = $long;

		// Check if accuracy is specified
		if ($accuracy)
		{
			$data['accuracy'] = $accuracy;
		}

		// Check if granularity is specified
		if ($granularity)
		{
			$data['granularity'] = $granularity;
		}

		// Check if max_results is specified
		if ($maxResults)
		{
			$data['max_results'] = $maxResults;
		}

		// Check if callback is specified
		if ($callback)
		{
			$data['callback'] = $callback;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to search for places that can be attached to a statuses/update.
	 *
	 * @param   float    $lat          The latitude to search around.
	 * @param   float    $long         The longitude to search around.
	 * @param   string   $query        Free-form text to match against while
executing a geo-based query, best suited for finding nearby
	 * 								   locations by name.
	 * @param   string   $ip           An IP address.
	 * @param   string   $granularity  This is the minimal granularity of
place types to return and must be one of: poi, neighborhood, city,
	 * 								   admin or country.
	 * @param   string   $accuracy     A hint on the "region" in
which to search. If a number, then this is a radius in meters, but it can
	 * 								   also take a string that is suffixed with ft to specify feet.
	 * @param   integer  $maxResults   A hint as to the number of results to
return.
	 * @param   string   $within       This is the place_id which you would
like to restrict the search results to.
	 * @param   string   $attribute    This parameter searches for places
which have this given street address.
	 * @param   string   $callback     If supplied, the response will use the
JSONP format with a callback of the given name.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function search($lat = null, $long = null, $query = null, $ip =
null, $granularity = null, $accuracy = null, $maxResults = 0,
		$within = null, $attribute = null, $callback = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('geo', 'search');

		// Set the API path
		$path = '/geo/search.json';

		// At least one of the following parameters must be provided: lat, long,
ip, or query.
		if ($lat == null && $long == null && $ip == null
&& $query == null)
		{
			throw new RuntimeException('At least one of the following
parameters must be provided: lat, long, ip, or query.');
		}

		// Check if lat is specified.
		if ($lat)
		{
			$data['lat'] = $lat;
		}

		// Check if long is specified.
		if ($long)
		{
			$data['long'] = $long;
		}

		// Check if query is specified.
		if ($query)
		{
			$data['query'] = rawurlencode($query);
		}

		// Check if ip is specified.
		if ($ip)
		{
			$data['ip'] = $ip;
		}

		// Check if granularity is specified
		if ($granularity)
		{
			$data['granularity'] = $granularity;
		}

		// Check if accuracy is specified
		if ($accuracy)
		{
			$data['accuracy'] = $accuracy;
		}

		// Check if max_results is specified
		if ($maxResults)
		{
			$data['max_results'] = $maxResults;
		}

		// Check if within is specified
		if ($within)
		{
			$data['contained_within'] = $within;
		}

		// Check if attribute is specified
		if ($attribute)
		{
			$data['attribute:street_address'] = rawurlencode($attribute);
		}

		// Check if callback is specified
		if ($callback)
		{
			$data['callback'] = $callback;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to locate places near the given coordinates which are similar in
name.
	 *
	 * @param   float   $lat        The latitude to search around.
	 * @param   float   $long       The longitude to search around.
	 * @param   string  $name       The name a place is known as.
	 * @param   string  $within     This is the place_id which you would like
to restrict the search results to.
	 * @param   string  $attribute  This parameter searches for places which
have this given street address.
	 * @param   string  $callback   If supplied, the response will use the
JSONP format with a callback of the given name.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getSimilarPlaces($lat, $long, $name, $within = null,
$attribute = null, $callback = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('geo', 'similar_places');

		// Set the API path
		$path = '/geo/similar_places.json';

		$data['lat'] = $lat;
		$data['long'] = $long;
		$data['name'] = rawurlencode($name);

		// Check if within is specified
		if ($within)
		{
			$data['contained_within'] = $within;
		}

		// Check if attribute is specified
		if ($attribute)
		{
			$data['attribute:street_address'] = rawurlencode($attribute);
		}

		// Check if callback is specified
		if ($callback)
		{
			$data['callback'] = $callback;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to create a new place object at the given latitude and
longitude.
	 *
	 * @param   float   $lat        The latitude to search around.
	 * @param   float   $long       The longitude to search around.
	 * @param   string  $name       The name a place is known as.
	 * @param   string  $geoToken   The token found in the response from
geo/similar_places.
	 * @param   string  $within     This is the place_id which you would like
to restrict the search results to.
	 * @param   string  $attribute  This parameter searches for places which
have this given street address.
	 * @param   string  $callback   If supplied, the response will use the
JSONP format with a callback of the given name.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function createPlace($lat, $long, $name, $geoToken, $within,
$attribute = null, $callback = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('geo', 'place');

		$data['lat'] = $lat;
		$data['long'] = $long;
		$data['name'] = rawurlencode($name);
		$data['token'] = $geoToken;
		$data['contained_within'] = $within;

		// Check if attribute is specified
		if ($attribute)
		{
			$data['attribute:street_address'] = rawurlencode($attribute);
		}

		// Check if callback is specified
		if ($callback)
		{
			$data['callback'] = $callback;
		}

		// Set the API path
		$path = '/geo/place.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}
}
PK���[z�_��'�'profile.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Profile class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterProfile extends JTwitterObject
{
	/**
	 * Method to et values that users are able to set under the
"Account" tab of their settings page.
	 *
	 * @param   string   $name         Full name associated with the profile.
Maximum of 20 characters.
	 * @param   string   $url          URL associated with the profile. Will
be prepended with "http://" if not present. Maximum of 100
characters.
	 * @param   string   $location     The city or country describing where
the user of the account is located. The contents are not normalized
	 * 								   or geocoded in any way. Maximum of 30 characters.
	 * @param   string   $description  A description of the user owning the
account. Maximum of 160 characters.
	 * @param   boolean  $entities     When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
	 * 								   variety of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus   When set to either true, t or 1
statuses will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function updateProfile($name = null, $url = null, $location = null,
$description = null, $entities = null, $skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('account',
'update_profile');

		$data = array();

		// Check if name is specified.
		if ($name)
		{
			$data['name'] = $name;
		}

		// Check if url is specified.
		if ($url)
		{
			$data['url'] = $url;
		}

		// Check if location is specified.
		if ($location)
		{
			$data['location'] = $location;
		}

		// Check if description is specified.
		if ($description)
		{
			$data['description'] = $description;
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified.
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Set the API path
		$path = '/account/update_profile.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to update the authenticating user's profile background
image. This method can also be used to enable or disable the profile
	 * background image.
	 *
	 * @param   string   $image       The background image for the profile.
	 * @param   boolean  $tile        Whether or not to tile the background
image.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
	 * 								  variety of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 * @param   boolean  $use         Determines whether to display the
profile background image or not.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function updateProfileBackgroundImage($image = null, $tile = false,
$entities = null, $skipStatus = null, $use = false)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('account',
'update_profile_background_image');

		$data = array();

		// Check if image is specified.
		if ($image)
		{
			$data['image'] = "@{$image}";
		}

		// Check if url is true.
		if ($tile)
		{
			$data['tile'] = $tile;
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified.
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Check if use is true.
		if ($use)
		{
			$data['use'] = $use;
		}

		// Set the API path
		$path = '/account/update_profile_background_image.json';

		$header = array('Content-Type' =>
'multipart/form-data', 'Expect' => '');

		// Send the request.
		return $this->sendRequest($path, 'POST', $data, $header);
	}

	/**
	 * Method to update the authenticating user's profile image.
	 *
	 * @param   string   $image       The background image for the profile.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
	 * 								  variety of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function updateProfileImage($image = null, $entities = null,
$skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('account',
'update_profile_image');

		$data = array();

		// Check if image is specified.
		if ($image)
		{
			$data['image'] = "@{$image}";
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified.
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Set the API path
		$path = '/account/update_profile_image.json';

		$header = array('Content-Type' =>
'multipart/form-data', 'Expect' => '');

		// Send the request.
		return $this->sendRequest($path, 'POST', $data, $header);
	}

	/**
	 * Method to set one or more hex values that control the color scheme of
the authenticating user's profile page on twitter.com.
	 *
	 * @param   string   $background     Profile background color.
	 * @param   string   $link           Profile link color.
	 * @param   string   $sidebarBorder  Profile sidebar's border color.
	 * @param   string   $sidebarFill    Profile sidebar's fill color.
	 * @param   string   $text           Profile text color.
	 * @param   boolean  $entities       When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
	 * 									 variety of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $skipStatus     When set to either true, t or 1
statuses will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function updateProfileColors($background = null, $link = null,
$sidebarBorder = null, $sidebarFill = null, $text = null,
		$entities = null, $skipStatus = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('account',
'update_profile_colors');

		$data = array();

		// Check if background is specified.
		if ($background)
		{
			$data['profile_background_color'] = $background;
		}

		// Check if link is specified.
		if ($link)
		{
			$data['profile_link_color'] = $link;
		}

		// Check if sidebar_border is specified.
		if ($sidebarBorder)
		{
			$data['profile_sidebar_border_color'] = $sidebarBorder;
		}

		// Check if sidebar_fill is specified.
		if ($sidebarFill)
		{
			$data['profile_sidebar_fill_color'] = $sidebarFill;
		}

		// Check if text is specified.
		if ($text)
		{
			$data['profile_text_color'] = $text;
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is true.
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Set the API path
		$path = '/account/update_profile_colors.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to get the settings (including current trend, geo and sleep time
information) for the authenticating user.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getSettings()
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('account', 'settings');

		// Set the API path
		$path = '/account/settings.json';

		// Send the request.
		return $this->sendRequest($path);
	}

	/**
	 * Method to update the authenticating user's settings.
	 *
	 * @param   integer  $location    The Yahoo! Where On Earth ID to use as
the user's default trend location.
	 * @param   boolean  $sleepTime   When set to true, t or 1, will enable
sleep time for the user.
	 * @param   integer  $startSleep  The hour that sleep time should begin if
it is enabled.
	 * @param   integer  $endSleep    The hour that sleep time should end if
it is enabled.
	 * @param   string   $timeZone    The timezone dates and times should be
displayed in for the user. The timezone must be one of the
	 * 								  Rails TimeZone names.
	 * @param   string   $lang        The language which Twitter should render
in for this user.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function updateSettings($location = null, $sleepTime = false,
$startSleep = null, $endSleep = null,
		$timeZone = null, $lang = null)
	{
		$data = array();

		// Check if location is specified.
		if ($location)
		{
			$data['trend_location_woeid '] = $location;
		}

		// Check if sleep_time is true.
		if ($sleepTime)
		{
			$data['sleep_time_enabled'] = $sleepTime;
		}

		// Check if start_sleep is specified.
		if ($startSleep)
		{
			$data['start_sleep_time'] = $startSleep;
		}

		// Check if end_sleep is specified.
		if ($endSleep)
		{
			$data['end_sleep_time'] = $endSleep;
		}

		// Check if time_zone is specified.
		if ($timeZone)
		{
			$data['time_zone'] = $timeZone;
		}

		// Check if lang is specified.
		if ($lang)
		{
			$data['lang'] = $lang;
		}

		// Set the API path
		$path = '/account/settings.json';

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}
}
PK���[)��}::
search.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Search class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwittersearch extends JTwitterObject
{
	/**
	 * Method to get tweets that match a specified query.
	 *
	 * @param   string   $query       Search query. Should be URL encoded.
Queries will be limited by complexity.
	 * @param   string   $callback    If supplied, the response will use the
JSONP format with a callback of the given name
	 * @param   string   $geocode     Returns tweets by users located within a
given radius of the given latitude/longitude. The parameter value is
	 * 								  specified by "latitude,longitude,radius", where
radius units must be specified as either "mi" (miles) or
"km" (kilometers).
	 * @param   string   $lang        Restricts tweets to the given language,
given by an ISO 639-1 code.
	 * @param   string   $locale      Specify the language of the query you
are sending (only ja is currently effective). This is intended for
	 * 								  language-specific clients and the default should work in the
majority of cases.
	 * @param   string   $resultType  Specifies what type of search results
you would prefer to receive. The current default is "mixed."
	 * @param   integer  $count       The number of tweets to return per page,
up to a maximum of 100. Defaults to 15.
	 * @param   string   $until       Returns tweets generated before the
given date. Date should be formatted as YYYY-MM-DD.
	 * @param   integer  $sinceId     Returns results with an ID greater than
(that is, more recent than) the specified ID.
	 * @param   integer  $maxId       Returns results with an ID less than
(that is, older than) or equal to the specified ID.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
	 * 								  variety of metadata about the tweet in a discrete structure,
including: urls, media and hashtags.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function search($query, $callback = null, $geocode = null, $lang =
null, $locale = null, $resultType = null, $count = 15,
		$until = null, $sinceId = 0, $maxId = 0, $entities = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('search', 'tweets');

		// Set the API path
		$path = '/search/tweets.json';

		// Set query parameter.
		$data['q'] = rawurlencode($query);

		// Check if callback is specified.
		if ($callback)
		{
			$data['callback'] = $callback;
		}

		// Check if geocode is specified.
		if ($geocode)
		{
			$data['geocode'] = $geocode;
		}

		// Check if lang is specified.
		if ($lang)
		{
			$data['lang'] = $lang;
		}

		// Check if locale is specified.
		if ($locale)
		{
			$data['locale'] = $locale;
		}

		// Check if result_type is specified.
		if ($resultType)
		{
			$data['result_type'] = $resultType;
		}

		// Check if count is specified.
		if ($count != 15)
		{
			$data['count'] = $count;
		}

		// Check if until is specified.
		if ($until)
		{
			$data['until'] = $until;
		}

		// Check if since_id is specified.
		if ($sinceId > 0)
		{
			$data['since_id'] = $sinceId;
		}

		// Check if max_id is specified.
		if ($maxId > 0)
		{
			$data['max_id'] = $maxId;
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get the authenticated user's saved search queries.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getSavedSearches()
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('saved_searches', 'list');

		// Set the API path
		$path = '/saved_searches/list.json';

		// Send the request.
		return $this->sendRequest($path);
	}

	/**
	 * Method to get the information for the saved search represented by the
given id.
	 *
	 * @param   integer  $id  The ID of the saved search.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getSavedSearchesById($id)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('saved_searches',
'show/:id');

		// Set the API path
		$path = '/saved_searches/show/' . $id . '.json';

		// Send the request.
		return $this->sendRequest($path);
	}

	/**
	 * Method to create a new saved search for the authenticated user.
	 *
	 * @param   string  $query  The query of the search the user would like to
save.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function createSavedSearch($query)
	{
		// Set the API path
		$path = '/saved_searches/create.json';

		// Set POST request data
		$data['query'] = rawurlencode($query);

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to delete a saved search for the authenticating user.
	 *
	 * @param   integer  $id  The ID of the saved search.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function deleteSavedSearch($id)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('saved_searches',
'destroy/:id');

		// Set the API path
		$path = '/saved_searches/destroy/' . $id . '.json';

		// Send the request.
		return $this->sendRequest($path, 'POST');
	}
}
PK���[�G5�VTVTstatuses.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Statuses class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterStatuses extends JTwitterObject
{
	/**
	 * Method to get a single tweet with the given ID.
	 *
	 * @param   integer  $id         The ID of the tweet to retrieve.
	 * @param   boolean  $trimUser   When set to true, each tweet returned in
a timeline will include a user object including only
	 *                               the status author's numerical ID.
	 * @param   boolean  $entities   When set to true,  each tweet will
include a node called "entities,". This node offers a variety of
metadata
	 *                               about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 * @param   boolean  $myRetweet  When set to either true, t or 1, any
statuses returned that have been retweeted by the authenticating user will
	 *                               include an additional
current_user_retweet node, containing the ID of the source status for the
retweet.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getTweetById($id, $trimUser = null, $entities = null,
$myRetweet = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('statuses', 'show/:id');

		// Set the API base
		$path = '/statuses/show/' . $id . '.json';

		$data = array();

		// Check if trim_user is specified
		if (!is_null($trimUser))
		{
			$data['trim_user'] = $trimUser;
		}

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if my_retweet is specified
		if (!is_null($myRetweet))
		{
			$data['include_my_retweet'] = $myRetweet;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to retrieve the latest statuses from the specified user
timeline.
	 *
	 * @param   mixed    $user         Either an integer containing the user
ID or a string containing the screen name.
	 * @param   integer  $count        Specifies the number of tweets to try
and retrieve, up to a maximum of 200.  Retweets are always included
	 *                                 in the count, so it is always suggested
to set $includeRts to true
	 * @param   boolean  $includeRts   When set to true, the timeline will
contain native retweets in addition to the standard stream of tweets.
	 * @param   boolean  $noReplies    This parameter will prevent replies
from appearing in the returned timeline. This parameter is only supported
	 *                                 for JSON and XML responses.
	 * @param   integer  $sinceId      Returns results with an ID greater than
(that is, more recent than) the specified ID.
	 * @param   integer  $maxId        Returns results with an ID less than
(that is, older than) the specified ID.
	 * @param   boolean  $trimUser     When set to true, each tweet returned
in a timeline will include a user object including only
	 *                                 the status author's numerical ID.
	 * @param   boolean  $contributor  This parameter enhances the
contributors element of the status response to include the screen_name of
the
	 *                                 contributor. By default only the
user_id of the contributor is included.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getUserTimeline($user, $count = 20, $includeRts = null,
$noReplies = null, $sinceId = 0, $maxId = 0, $trimUser = null,
		$contributor = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('statuses',
'user_timeline');

		$data = array();

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Set the API base
		$path = '/statuses/user_timeline.json';

		// Set the count string
		$data['count'] = $count;

		// Check if include_rts is specified
		if (!is_null($includeRts))
		{
			$data['include_rts'] = $includeRts;
		}

		// Check if no_replies is specified
		if (!is_null($noReplies))
		{
			$data['exclude_replies'] = $noReplies;
		}

		// Check if a since_id is specified
		if ($sinceId > 0)
		{
			$data['since_id'] = (int) $sinceId;
		}

		// Check if a max_id is specified
		if ($maxId > 0)
		{
			$data['max_id'] = (int) $maxId;
		}

		// Check if trim_user is specified
		if (!is_null($trimUser))
		{
			$data['trim_user'] = $trimUser;
		}

		// Check if contributor details is specified
		if (!is_null($contributor))
		{
			$data['contributor_details'] = $contributor;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to post a tweet.
	 *
	 * @param   string   $status              The text of the tweet.
	 * @param   integer  $inReplyToStatusId   The ID of an existing status
that the update is in reply to.
	 * @param   float    $lat                 The latitude of the location
this tweet refers to.
	 * @param   float    $long                The longitude of the location
this tweet refers to.
	 * @param   string   $placeId             A place in the world.
	 * @param   boolean  $displayCoordinates  Whether or not to put a pin on
the exact coordinates a tweet has been sent from.
	 * @param   boolean  $trimUser            When set to true, each tweet
returned in a timeline will include a user object including only
	 *                                        the status author's
numerical ID.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function tweet($status, $inReplyToStatusId = null, $lat = null,
$long = null, $placeId = null, $displayCoordinates = null,
		$trimUser = null)
	{
		// Set the API base.
		$path = '/statuses/update.json';

		// Set POST data.
		$data = array('status' => utf8_encode($status));

		// Check if in_reply_to_status_id is specified.
		if ($inReplyToStatusId)
		{
			$data['in_reply_to_status_id'] = $inReplyToStatusId;
		}

		// Check if lat is specified.
		if ($lat)
		{
			$data['lat'] = $lat;
		}

		// Check if long is specified.
		if ($long)
		{
			$data['long'] = $long;
		}

		// Check if place_id is specified.
		if ($placeId)
		{
			$data['place_id'] = $placeId;
		}

		// Check if display_coordinates is specified.
		if (!is_null($displayCoordinates))
		{
			$data['display_coordinates'] = $displayCoordinates;
		}

		// Check if trim_user is specified.
		if (!is_null($trimUser))
		{
			$data['trim_user'] = $trimUser;
		}

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to retrieve the most recent mentions for the authenticating
user.
	 *
	 * @param   integer  $count        Specifies the number of tweets to try
and retrieve, up to a maximum of 200.  Retweets are always included
	 *                                 in the count, so it is always suggested
to set $includeRts to true
	 * @param   boolean  $includeRts   When set to true, the timeline will
contain native retweets in addition to the standard stream of tweets.
	 * @param   boolean  $entities     When set to true,  each tweet will
include a node called "entities,". This node offers a variety of
metadata
	 *                                 about the tweet in a discreet
structure, including: user_mentions, urls, and hashtags.
	 * @param   integer  $sinceId      Returns results with an ID greater than
(that is, more recent than) the specified ID.
	 * @param   integer  $maxId        Returns results with an ID less than
(that is, older than) the specified ID.
	 * @param   boolean  $trimUser     When set to true, each tweet returned
in a timeline will include a user object including only
	 *                                 the status author's numerical ID.
	 * @param   string   $contributor  This parameter enhances the
contributors element of the status response to include the screen_name
	 *                                 of the contributor.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getMentions($count = 20, $includeRts = null, $entities =
null, $sinceId = 0, $maxId = 0,
		$trimUser = null, $contributor = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('statuses',
'mentions_timeline');

		// Set the API base
		$path = '/statuses/mentions_timeline.json';

		// Set the count string
		$data['count'] = $count;

		// Check if include_rts is specified
		if (!is_null($includeRts))
		{
			$data['include_rts'] = $includeRts;
		}

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if a since_id is specified
		if ($sinceId > 0)
		{
			$data['since_id'] = (int) $sinceId;
		}

		// Check if a max_id is specified
		if ($maxId > 0)
		{
			$data['max_id'] = (int) $maxId;
		}

		// Check if trim_user is specified
		if (!is_null($trimUser))
		{
			$data['trim_user'] = $trimUser;
		}

		// Check if contributor is specified
		if (!is_null($contributor))
		{
			$data['contributor_details'] = $contributor;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get the most recent tweets of the authenticated user that
have been retweeted by others.
	 *
	 * @param   integer  $count         Specifies the number of tweets to try
and retrieve, up to a maximum of 200.  Retweets are always included
	 *                                  in the count, so it is always
suggested to set $includeRts to true
	 * @param   integer  $sinceId       Returns results with an ID greater
than (that is, more recent than) the specified ID.
	 * @param   boolean  $entities      When set to true,  each tweet will
include a node called "entities,". This node offers a variety of
metadata
	 *                                  about the tweet in a discreet
structure, including: user_mentions, urls, and hashtags.
	 * @param   boolean  $userEntities  The user entities node will be
disincluded when set to false.
	 * @param   integer  $maxId         Returns results with an ID less than
(that is, older than) the specified ID.
	 * @param   boolean  $trimUser      When set to true, each tweet returned
in a timeline will include a user object including only
	 *                                  the status author's numerical ID.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getRetweetsOfMe($count = 20, $sinceId = 0, $entities =
null, $userEntities = null, $maxId = 0, $trimUser = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('statuses',
'retweets_of_me');

		// Set the API path
		$path = '/statuses/retweets_of_me.json';

		// Set the count string
		$data['count'] = $count;

		// Check if a since_id is specified
		if ($sinceId > 0)
		{
			$data['since_id'] = (int) $sinceId;
		}

		// Check if a max_id is specified
		if ($maxId > 0)
		{
			$data['max_id'] = (int) $maxId;
		}

		// Check if trim_user is specified
		if (!is_null($trimUser))
		{
			$data['trim_user'] = $trimUser;
		}

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if entities is specified
		if (!is_null($userEntities))
		{
			$data['include_user_entities'] = $userEntities;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to show user objects of up to 100 members who retweeted the
status.
	 *
	 * @param   integer  $id            The numerical ID of the desired
status.
	 * @param   integer  $count         Specifies the number of retweets to
try and retrieve, up to a maximum of 100.
	 * @param   integer  $cursor        Causes the list of IDs to be broken
into pages of no more than 100 IDs at a time.
	 *                                  The number of IDs returned is not
guaranteed to be 100 as suspended users are
	 *                                  filtered out after connections are
queried. If no cursor is provided, a value of
	 *                                  -1 will be assumed, which is the first
"page."
	 * @param   boolean  $stringifyIds  Set to true to return IDs as strings,
false to return as integers.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getRetweeters($id, $count = 20, $cursor = null,
$stringifyIds = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('statuses',
'retweeters/ids');

		// Set the API path
		$path = '/statuses/retweeters/ids.json';

		// Set the status id.
		$data['id'] = $id;

		// Set the count string
		$data['count'] = $count;

		// Check if cursor is specified
		if (!is_null($cursor))
		{
			$data['cursor'] = $cursor;
		}

		// Check if entities is specified
		if (!is_null($stringifyIds))
		{
			$data['stringify_ids'] = $stringifyIds;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get up to 100 of the first retweets of a given tweet.
	 *
	 * @param   integer  $id        The numerical ID of the desired status.
	 * @param   integer  $count     Specifies the number of tweets to try and
retrieve, up to a maximum of 200.  Retweets are always included
	 *                              in the count, so it is always suggested to
set $includeRts to true
	 * @param   boolean  $trimUser  When set to true, each tweet returned in a
timeline will include a user object including only
	 *                              the status author's numerical ID.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getRetweetsById($id, $count = 20, $trimUser = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('statuses', 'retweets/:id');

		// Set the API path
		$path = '/statuses/retweets/' . $id . '.json';

		// Set the count string
		$data['count'] = $count;

		// Check if trim_user is specified
		if (!is_null($trimUser))
		{
			$data['trim_user'] = $trimUser;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to delete the status specified by the required ID parameter.
	 *
	 * @param   integer  $id        The numerical ID of the desired status.
	 * @param   boolean  $trimUser  When set to true, each tweet returned in a
timeline will include a user object including only
	 *                              the status author's numerical ID.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function deleteTweet($id, $trimUser = null)
	{
		// Set the API path
		$path = '/statuses/destroy/' . $id . '.json';

		$data = array();

		// Check if trim_user is specified
		if (!is_null($trimUser))
		{
			$data['trim_user'] = $trimUser;
		}

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to retweet a tweet.
	 *
	 * @param   integer  $id        The numerical ID of the desired status.
	 * @param   boolean  $trimUser  When set to true, each tweet returned in a
timeline will include a user object including only
	 *                              the status author's numerical ID.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function retweet($id, $trimUser = null)
	{
		// Set the API path
		$path = '/statuses/retweet/' . $id . '.json';

		$data = array();

		// Check if trim_user is specified
		if (!is_null($trimUser))
		{
			$data['trim_user'] = $trimUser;
		}

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to post a tweet with media.
	 *
	 * @param   string   $status              The text of the tweet.
	 * @param   string   $media               File to upload
	 * @param   integer  $inReplyToStatusId   The ID of an existing status
that the update is in reply to.
	 * @param   float    $lat                 The latitude of the location
this tweet refers to.
	 * @param   float    $long                The longitude of the location
this tweet refers to.
	 * @param   string   $placeId             A place in the world.
	 * @param   boolean  $displayCoordinates  Whether or not to put a pin on
the exact coordinates a tweet has been sent from.
	 * @param   boolean  $sensitive           Set to true for content which
may not be suitable for every audience.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function tweetWithMedia($status, $media, $inReplyToStatusId = null,
$lat = null, $long = null, $placeId = null,
		$displayCoordinates = null, $sensitive = null)
	{
		// Set the API request path.
		$path = '/statuses/update_with_media.json';

		// Set POST data.
		$data = array(
			'status' => utf8_encode($status),
			'media[]' => "@{$media}",
		);

		$header = array('Content-Type' =>
'multipart/form-data');

		// Check if in_reply_to_status_id is specified.
		if (!is_null($inReplyToStatusId))
		{
			$data['in_reply_to_status_id'] = $inReplyToStatusId;
		}

		// Check if lat is specified.
		if ($lat)
		{
			$data['lat'] = $lat;
		}

		// Check if long is specified.
		if ($long)
		{
			$data['long'] = $long;
		}

		// Check if place_id is specified.
		if ($placeId)
		{
			$data['place_id'] = $placeId;
		}

		// Check if display_coordinates is specified.
		if (!is_null($displayCoordinates))
		{
			$data['display_coordinates'] = $displayCoordinates;
		}

		// Check if sensitive is specified.
		if (!is_null($sensitive))
		{
			$data['possibly_sensitive'] = $sensitive;
		}

		// Send the request.
		return $this->sendRequest($path, 'POST', $data, $header);
	}

	/**
	 * Method to get information allowing the creation of an embedded
representation of a Tweet on third party sites.
	 * Note: either the id or url parameters must be specified in a request.
It is not necessary to include both.
	 *
	 * @param   integer  $id          The Tweet/status ID to return embed code
for.
	 * @param   string   $url         The URL of the Tweet/status to be
embedded.
	 * @param   integer  $maxWidth    The maximum width in pixels that the
embed should be rendered at. This value is constrained to be
	 *                                between 250 and 550 pixels.
	 * @param   boolean  $hideMedia   Specifies whether the embedded Tweet
should automatically expand images which were uploaded via
	 *                                POST statuses/update_with_media.
	 * @param   boolean  $hideThread  Specifies whether the embedded Tweet
should automatically show the original message in the case that
	 *                                the embedded Tweet is a reply.
	 * @param   boolean  $omitScript  Specifies whether the embedded Tweet
HTML should include a `<script>` element pointing to widgets.js.
	 *                                In cases where a page already includes
widgets.js, setting this value to true will prevent a redundant
	 *                                script element from being included.
	 * @param   string   $align       Specifies whether the embedded Tweet
should be left aligned, right aligned, or centered in the page.
	 *                                Valid values are left, right, center,
and none.
	 * @param   string   $related     A value for the TWT related parameter,
as described in Web Intents. This value will be forwarded to all
	 *                                Web Intents calls.
	 * @param   string   $lang        Language code for the rendered embed.
This will affect the text and localization of the rendered HTML.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getOembed($id = null, $url = null, $maxWidth = null,
$hideMedia = null, $hideThread = null, $omitScript = null,
		$align = null, $related = null, $lang = null)
	{
		// Check the rate limit for remaining hits.
		$this->checkRateLimit('statuses', 'oembed');

		// Set the API request path.
		$path = '/statuses/oembed.json';

		// Determine which of $id and $url is specified.
		if ($id)
		{
			$data['id'] = $id;
		}
		elseif ($url)
		{
			$data['url'] = rawurlencode($url);
		}
		else
		{
			// We don't have a valid entry.
			throw new RuntimeException('Either the id or url parameters must be
specified in a request.');
		}

		// Check if maxwidth is specified.
		if ($maxWidth)
		{
			$data['maxwidth'] = $maxWidth;
		}

		// Check if hide_media is specified.
		if (!is_null($hideMedia))
		{
			$data['hide_media'] = $hideMedia;
		}

		// Check if hide_thread is specified.
		if (!is_null($hideThread))
		{
			$data['hide_thread'] = $hideThread;
		}

		// Check if omit_script is specified.
		if (!is_null($omitScript))
		{
			$data['omit_script'] = $omitScript;
		}

		// Check if align is specified.
		if ($align)
		{
			$data['align'] = $align;
		}

		// Check if related is specified.
		if ($related)
		{
			$data['related'] = $related;
		}

		// Check if lang is specified.
		if ($lang)
		{
			$data['lang'] = $lang;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}
}
PK���[|p�~�	�	
trends.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Trends class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterTrends extends JTwitterObject
{
	/**
	 * Method to get the top 10 trending topics for a specific WOEID, if
trending information is available for it.
	 *
	 * @param   integer  $id       The Yahoo! Where On Earth ID of the
location to return trending information for.
	 * 							   Global information is available by using 1 as the WOEID.
	 * @param   string   $exclude  Setting this equal to hashtags will remove
all hashtags from the trends list.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getTrends($id, $exclude = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('trends', 'place');

		// Set the API path
		$path = '/trends/place.json';

		$data['id'] = $id;

		// Check if exclude is specified
		if ($exclude)
		{
			$data['exclude'] = $exclude;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get the locations that Twitter has trending topic information
for.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getLocations()
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('trends', 'available');

		// Set the API path
		$path = '/trends/available.json';

		// Send the request.
		return $this->sendRequest($path);
	}

	/**
	 * Method to get the locations that Twitter has trending topic information
for, closest to a specified location.
	 *
	 * @param   float  $lat   The latitude to search around.
	 * @param   float  $long  The longitude to search around.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getClosest($lat = null, $long = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('trends', 'closest');

		// Set the API path
		$path = '/trends/closest.json';

		$data = array();

		// Check if lat is specified
		if ($lat)
		{
			$data['lat'] = $lat;
		}

		// Check if long is specified
		if ($long)
		{
			$data['long'] = $long;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}
}
PK���[�֮��twitter.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

use Joomla\Registry\Registry;

/**
 * Joomla Platform class for interacting with a Twitter API instance.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitter
{
	/**
	 * @var    Registry  Options for the JTwitter object.
	 * @since  3.1.4
	 */
	protected $options;

	/**
	 * @var    JHttp  The HTTP client object to use in sending HTTP requests.
	 * @since  3.1.4
	 */
	protected $client;

	/**
	 * @var    JTwitterOAuth The OAuth client.
	 * @since  3.1.4
	 */
	protected $oauth;

	/**
	 * @var    JTwitterFriends  Twitter API object for friends.
	 * @since  3.1.4
	 */
	protected $friends;

	/**
	 * @var    JTwitterUsers  Twitter API object for users.
	 * @since  3.1.4
	 */
	protected $users;

	/**
	 * @var    JTwitterHelp  Twitter API object for help.
	 * @since  3.1.4
	 */
	protected $help;

	/**
	 * @var    JTwitterStatuses  Twitter API object for statuses.
	 * @since  3.1.4
	 */
	protected $statuses;

	/**
	 * @var    JTwitterSearch  Twitter API object for search.
	 * @since  3.1.4
	 */
	protected $search;

	/**
	 * @var    JTwitterFavorites  Twitter API object for favorites.
	 * @since  3.1.4
	 */
	protected $favorites;

	/**
	 * @var    JTwitterDirectMessages  Twitter API object for direct messages.
	 * @since  3.1.4
	 */
	protected $directMessages;

	/**
	 * @var    JTwitterLists  Twitter API object for lists.
	 * @since  3.1.4
	 */
	protected $lists;

	/**
	 * @var    JTwitterPlaces  Twitter API object for places & geo.
	 * @since  3.1.4
	 */
	protected $places;

	/**
	 * @var    JTwitterTrends  Twitter API object for trends.
	 * @since  3.1.4
	 */
	protected $trends;

	/**
	 * @var    JTwitterBlock  Twitter API object for block.
	 * @since  3.1.4
	 */
	protected $block;

	/**
	 * @var    JTwitterProfile  Twitter API object for profile.
	 * @since  3.1.4
	 */
	protected $profile;

	/**
	 * Constructor.
	 *
	 * @param   JTwitterOauth  $oauth    The oauth client.
	 * @param   Registry       $options  Twitter options object.
	 * @param   JHttp          $client   The HTTP client object.
	 *
	 * @since   3.1.4
	 */
	public function __construct(JTwitterOAuth $oauth = null, Registry $options
= null, JHttp $client = null)
	{
		$this->oauth = $oauth;
		$this->options = isset($options) ? $options : new Registry;
		$this->client  = isset($client) ? $client : new
JHttp($this->options);

		// Setup the default API url if not already set.
		$this->options->def('api.url',
'https://api.twitter.com/1.1');
	}

	/**
	 * Magic method to lazily create API objects
	 *
	 * @param   string  $name  Name of property to retrieve
	 *
	 * @return  JTwitterObject  Twitter API object (statuses, users,
favorites, etc.).
	 *
	 * @since   3.1.4
	 * @throws  InvalidArgumentException
	 */
	public function __get($name)
	{
		$class = 'JTwitter' . ucfirst($name);

		if (class_exists($class))
		{
			if (false == isset($this->$name))
			{
				$this->$name = new $class($this->options, $this->client,
$this->oauth);
			}

			return $this->$name;
		}

		throw new InvalidArgumentException(sprintf('Argument %s produced an
invalid class name: %s', $name, $class));
	}

	/**
	 * Get an option from the JTwitter instance.
	 *
	 * @param   string  $key  The name of the option to get.
	 *
	 * @return  mixed  The option value.
	 *
	 * @since   3.1.4
	 */
	public function getOption($key)
	{
		return $this->options->get($key);
	}

	/**
	 * Set an option for the JTwitter instance.
	 *
	 * @param   string  $key    The name of the option to set.
	 * @param   mixed   $value  The option value to set.
	 *
	 * @return  JTwitter  This object for method chaining.
	 *
	 * @since   3.1.4
	 */
	public function setOption($key, $value)
	{
		$this->options->set($key, $value);

		return $this;
	}
}
PK���[�:��'('(	users.phpnu�[���<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Twitter
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die();

/**
 * Twitter API Users class for the Joomla Platform.
 *
 * @since       3.1.4
 * @deprecated  4.0  Use the `joomla/twitter` package via Composer instead
 */
class JTwitterUsers extends JTwitterObject
{
	/**
	 * Method to get up to 100 users worth of extended information, specified
by either ID, screen name, or combination of the two.
	 *
	 * @param   string   $screenName  A comma separated list of screen names,
up to 100 are allowed in a single request.
	 * @param   string   $id          A comma separated list of user IDs, up
to 100 are allowed in a single request.
	 * @param   boolean  $entities    When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
variety of
	 * 								  metadata about the tweet in a discreet structure, including:
user_mentions, urls, and hashtags.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getUsersLookup($screenName = null, $id = null, $entities =
null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users', 'lookup');

		// Set user IDs and screen names.
		if ($id)
		{
			$data['user_id'] = $id;
		}

		if ($screenName)
		{
			$data['screen_name'] = $screenName;
		}

		if ($id == null && $screenName == null)
		{
			// We don't have a valid entry
			throw new RuntimeException('You must specify either a comma
separated list of screen names, user IDs, or a combination of the
two');
		}

		// Set the API path
		$path = '/users/lookup.json';

		// Check if string_ids is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Send the request.
		return $this->sendRequest($path, 'POST', $data);
	}

	/**
	 * Method to access the profile banner in various sizes for the user with
the indicated screen_name.
	 *
	 * @param   mixed  $user  Either an integer containing the user ID or a
string containing the screen name.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getUserProfileBanner($user)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users', 'profile_banner');

		// Set the API path
		$path = '/users/profile_banner.json';

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method used to search for users
	 *
	 * @param   string   $query     The search query to run against people
search.
	 * @param   integer  $page      Specifies the page of results to retrieve.
	 * @param   integer  $count     The number of people to retrieve. Maximum
of 20 allowed per page.
	 * @param   boolean  $entities  When set to either true, t or 1, each
tweet will include a node called "entities,". This node offers a
	 * 								variety of metadata about the tweet in a discreet structure,
including: user_mentions, urls, and hashtags.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function searchUsers($query, $page = 0, $count = 0, $entities =
null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users', 'search');

		$data['q'] = rawurlencode($query);

		// Check if page is specified.
		if ($page > 0)
		{
			$data['page'] = $page;
		}

		// Check if per_page is specified
		if ($count > 0)
		{
			$data['count'] = $count;
		}

		// Check if entities is specified.
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Set the API path
		$path = '/users/search.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get extended information of a given user, specified by ID or
screen name as per the required id parameter.
	 *
	 * @param   mixed    $user      Either an integer containing the user ID
or a string containing the screen name.
	 * @param   boolean  $entities  Set to true to return IDs as strings,
false to return as integers.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getUser($user, $entities = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users', 'show/:id');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/users/show.json';

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get an array of users that the specified user can contribute
to.
	 *
	 * @param   mixed    $user        Either an integer containing the user ID
or a string containing the screen name.
	 * @param   boolean  $entities    Set to true to return IDs as strings,
false to return as integers.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getContributees($user, $entities = null, $skipStatus =
null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users', 'contributees');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/users/contributees.json';

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to get an array of users who can contribute to the specified
account.
	 *
	 * @param   mixed    $user        Either an integer containing the user ID
or a string containing the screen name.
	 * @param   boolean  $entities    Set to true to return IDs as strings,
false to return as integers.
	 * @param   boolean  $skipStatus  When set to either true, t or 1 statuses
will not be included in the returned user objects.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 * @throws  RuntimeException
	 */
	public function getContributors($user, $entities = null, $skipStatus =
null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users', 'contributors');

		// Determine which type of data was passed for $user
		if (is_numeric($user))
		{
			$data['user_id'] = $user;
		}
		elseif (is_string($user))
		{
			$data['screen_name'] = $user;
		}
		else
		{
			// We don't have a valid entry
			throw new RuntimeException('The specified username is not in the
correct format; must use integer or string');
		}

		// Set the API path
		$path = '/users/contributors.json';

		// Check if entities is specified
		if (!is_null($entities))
		{
			$data['include_entities'] = $entities;
		}

		// Check if skip_status is specified
		if (!is_null($skipStatus))
		{
			$data['skip_status'] = $skipStatus;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method access to Twitter's suggested user list.
	 *
	 * @param   boolean  $lang  Restricts the suggested categories to the
requested language.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getSuggestions($lang = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users', 'suggestions');

		// Set the API path
		$path = '/users/suggestions.json';

		$data = array();

		// Check if entities is true
		if ($lang)
		{
			$data['lang'] = $lang;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * method to access the users in a given category of the Twitter suggested
user list.
	 *
	 * @param   string   $slug  The short name of list or a category.
	 * @param   boolean  $lang  Restricts the suggested categories to the
requested language.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getSuggestionsSlug($slug, $lang = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users',
'suggestions/:slug');

		// Set the API path
		$path = '/users/suggestions/' . $slug . '.json';

		$data = array();

		// Check if entities is true
		if ($lang)
		{
			$data['lang'] = $lang;
		}

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}

	/**
	 * Method to access the users in a given category of the Twitter suggested
user list and return
	 * their most recent status if they are not a protected user.
	 *
	 * @param   string  $slug  The short name of list or a category.
	 *
	 * @return  array  The decoded JSON response
	 *
	 * @since   3.1.4
	 */
	public function getSuggestionsSlugMembers($slug)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('users',
'suggestions/:slug/members');

		// Set the API path
		$path = '/users/suggestions/' . $slug .
'/members.json';

		// Send the request.
		return $this->sendRequest($path);
	}
}
PK���[�v^�	block.phpnu�[���PK���[$/����@directmessages.phpnu�[���PK���[�lS���
$,favorites.phpnu�[���PK���[��33<friends.phpnu�[���PK���[BD�]]fohelp.phpnu�[���PK���[���(m(m	�tlists.phpnu�[���PK���[9�%�n
n
	\�oauth.phpnu�[���PK���[,�bBB
�object.phpnu�[���PK���[�ԯ�!�!
places.phpnu�[���PK���[z�_��'�'�)profile.phpnu�[���PK���[)��}::
�Qsearch.phpnu�[���PK���[�G5�VTVT"hstatuses.phpnu�[���PK���[|p�~�	�	
��trends.phpnu�[���PK���[�֮����twitter.phpnu�[���PK���[�:��'('(	��users.phpnu�[���PK`L�