1 <?php
2 /**
3 * @package Joomla.Platform
4 * @subpackage Twitter
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 */
9
10 defined('JPATH_PLATFORM') or die();
11
12 /**
13 * Twitter API Help class for the Joomla Platform.
14 *
15 * @since 12.3
16 * @deprecated 4.0 Use the `joomla/twitter` package via Composer instead
17 */
18 class JTwitterHelp extends JTwitterObject
19 {
20 /**
21 * Method to get the supported languages from the API.
22 *
23 * @return array The decoded JSON response
24 *
25 * @since 12.3
26 */
27 public function getLanguages()
28 {
29 // Check the rate limit for remaining hits
30 $this->checkRateLimit('help', 'languages');
31
32 // Set the API path
33 $path = '/help/languages.json';
34
35 // Send the request.
36 return $this->sendRequest($path);
37 }
38
39 /**
40 * Method to get the current configuration used by Twitter including twitter.com slugs which are not usernames,
41 * maximum photo resolutions, and t.co URL lengths.
42 *
43 * @return array The decoded JSON response
44 *
45 * @since 12.3
46 */
47 public function getConfiguration()
48 {
49 // Check the rate limit for remaining hits
50 $this->checkRateLimit('help', 'configuration');
51
52 // Set the API path
53 $path = '/help/configuration.json';
54
55 // Send the request.
56 return $this->sendRequest($path);
57 }
58 }
59