From 6c3752ba89fb4898770f875907f5398919485049 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 11 Feb 2016 13:11:17 +0100 Subject: [PATCH 1/2] Adding MIN_TAG_ID/MAX_TAG_ID to getTagMedia Adding two parameters for the GET /tags/tag-name/media/recent endpoint. --- src/Instagram.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Instagram.php b/src/Instagram.php index 1fb70f2..19083bf 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -378,13 +378,23 @@ public function getTag($name) * * @return mixed */ - public function getTagMedia($name, $limit = 0) + public function getTagMedia($name, $limit = 0, $minTag = NULL, $maxTag = NULL ) { $params = array(); if ($limit > 0) { $params['count'] = $limit; } + + if( $minTag ) + { + $params['min_tag_id'] = $minTag; + } + + if( $maxTag ) + { + $params['max_tag_id'] = $maxTag; + } return $this->_makeCall('tags/' . $name . '/media/recent', false, $params); } From b137891145993ef41c40a3bf2c3595d20ca45b24 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 11 Feb 2016 13:12:46 +0100 Subject: [PATCH 2/2] Update Instagram.php --- src/Instagram.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Instagram.php b/src/Instagram.php index 19083bf..308f728 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -378,7 +378,7 @@ public function getTag($name) * * @return mixed */ - public function getTagMedia($name, $limit = 0, $minTag = NULL, $maxTag = NULL ) + public function getTagMedia($name, $limit = 0, $minTag = null, $maxTag = null ) { $params = array(); @@ -386,15 +386,13 @@ public function getTagMedia($name, $limit = 0, $minTag = NULL, $maxTag = NULL ) $params['count'] = $limit; } - if( $minTag ) - { - $params['min_tag_id'] = $minTag; - } - - if( $maxTag ) - { - $params['max_tag_id'] = $maxTag; - } + if( $minTag ) { + $params['min_tag_id'] = $minTag; + } + + if( $maxTag ) { + $params['max_tag_id'] = $maxTag; + } return $this->_makeCall('tags/' . $name . '/media/recent', false, $params); }