Version 1
[yaffs-website] / vendor / php-instagram-api / php-instagram-api / Instagram / Collection / TagMediaCollection.php
1 <?php
2
3 /**
4 * Instagram PHP
5 * @author Galen Grover <galenjr@gmail.com>
6 * @license http://opensource.org/licenses/mit-license.php The MIT License
7 */
8
9 namespace Instagram\Collection;
10
11 /**
12  * Tag Media Collection
13  *
14  * Holds a collection of media associated with a tag
15  */
16 class TagMediaCollection extends \Instagram\Collection\MediaCollection {
17
18     /**
19      * Get min tag id
20      *
21      * Get the minimum tag id.
22      * if you're using the Realtime API and fetch media from /media/recent for Tags,
23      * you should save the min_tag_id and pass it in next time you hit that endpoint
24      * in response to a realtime push; you'll receive all media since the last time you checked.
25      *
26      * @return string Return the min tag id
27      * @access public
28      */
29     public function getMinTagId() {
30         return isset( $this->pagination->min_tag_id ) ? $this->pagination->min_tag_id : null;
31     }
32
33     /**
34      * Get next max tag id
35      *
36      * Get the next max tag id for use in pagination
37      *
38      * @return string Returns the next max tag id
39      * @access public
40      */
41     public function getNextMaxTagId() {
42         return isset( $this->pagination->next_max_tag_id ) ? $this->pagination->next_max_tag_id : null;
43     }
44
45     /**
46      * Get next max tag id
47      *
48      * Get the next max tag id for use in pagination
49      *
50      * @return string Returns the next max tag id
51      * @access public
52      */
53     public function getNext() {
54         return $this->getNextMaxTagId();
55     }
56
57 }