1 | <?php |
||
24 | class Pinterest { |
||
25 | |||
26 | /** |
||
27 | * Reference to authentication class instance |
||
28 | * |
||
29 | * @var Auth\PinterestOAuth |
||
30 | */ |
||
31 | public $auth; |
||
32 | |||
33 | /** |
||
34 | * A reference to the request class which travels |
||
35 | * through the application |
||
36 | * |
||
37 | * @var Transport\Request |
||
38 | */ |
||
39 | public $request; |
||
40 | |||
41 | /** |
||
42 | * A array containing the cached endpoints |
||
43 | * |
||
44 | * @var array |
||
45 | */ |
||
46 | private $cachedEndpoints = []; |
||
47 | |||
48 | /** |
||
49 | * Constructor |
||
50 | * |
||
51 | * @param string $client_id |
||
52 | * @param string $client_secret |
||
53 | * @param CurlBuilder $curlbuilder |
||
54 | */ |
||
55 | 37 | public function __construct($client_id, $client_secret, $curlbuilder = null) |
|
67 | |||
68 | /** |
||
69 | * Get an Instagram API endpoint |
||
70 | * |
||
71 | * @access public |
||
72 | * @param string $endpoint |
||
73 | * @return mixed |
||
74 | * @throws Exceptions\InvalidEndpointException |
||
75 | */ |
||
76 | 33 | public function __get($endpoint) |
|
98 | |||
99 | /** |
||
100 | * Get rate limit from the headers |
||
101 | * |
||
102 | * @access public |
||
103 | * @return integer |
||
104 | */ |
||
105 | 1 | public function getRateLimit() |
|
110 | |||
111 | /** |
||
112 | * Get rate limit remaining from the headers |
||
113 | * |
||
114 | * @access public |
||
115 | * @return mixed |
||
116 | */ |
||
117 | 1 | public function getRateLimitRemaining() |
|
122 | } |
||
123 |