@@ -8,8 +8,8 @@ public function __construct($token)
88 }
99
1010 /**
11- * @throws NotFoundException
12- * @throws BadResponseException
11+ * @throws Exceptions\ NotFoundException
12+ * @throws Exceptions\ BadResponseException
1313 */
1414 protected function request ($ method , $ data )
1515 {
@@ -18,18 +18,18 @@ protected function request($method, $data)
1818 if ($ response ['response ' ]['status_code ' ] == 200 && $ response ['response ' ]['content_type ' ] == 'application/json ' ) {
1919 return $ response ['response ' ]['body ' ];
2020 } else if ($ response ['response ' ]['status_code ' ] == 404 ) {
21- throw new NotFoundException ('Instagram resource not found ' );
21+ throw new Exceptions \ NotFoundException ('Instagram resource not found ' );
2222 } else {
23- throw new BadResponseException ('Bad response from Instagram ' );
23+ throw new Exceptions \ BadResponseException ('Bad response from Instagram ' );
2424 }
2525 } else {
26- throw new BadResponseException ('Bad response from RocketAPI ' );
26+ throw new Exceptions \ BadResponseException ('Bad response from RocketAPI ' );
2727 }
2828 }
2929
3030 /**
31- * @throws NotFoundException
32- * @throws BadResponseException
31+ * @throws Exceptions\ NotFoundException
32+ * @throws Exceptions\ BadResponseException
3333 */
3434 public function search ($ query ) {
3535 return $ this ->request ('instagram/search ' , [
@@ -38,8 +38,8 @@ public function search($query) {
3838 }
3939
4040 /**
41- * @throws NotFoundException
42- * @throws BadResponseException
41+ * @throws Exceptions\ NotFoundException
42+ * @throws Exceptions\ BadResponseException
4343 */
4444 public function getUserInfo ($ username ) {
4545 return $ this ->request ('instagram/user/get_info ' , [
@@ -48,8 +48,8 @@ public function getUserInfo($username) {
4848 }
4949
5050 /**
51- * @throws NotFoundException
52- * @throws BadResponseException
51+ * @throws Exceptions\ NotFoundException
52+ * @throws Exceptions\ BadResponseException
5353 */
5454 public function getUserInfoById ($ user_id ) {
5555 return $ this ->request ('instagram/user/get_info_by_id ' , [
@@ -58,8 +58,8 @@ public function getUserInfoById($user_id) {
5858 }
5959
6060 /**
61- * @throws NotFoundException
62- * @throws BadResponseException
61+ * @throws Exceptions\ NotFoundException
62+ * @throws Exceptions\ BadResponseException
6363 */
6464 public function getUserMedia ($ user_id , $ count =12 , $ max_id =null ) {
6565 $ payload = ['id ' => $ user_id , 'count ' => $ count ];
@@ -70,8 +70,8 @@ public function getUserMedia($user_id, $count=12, $max_id=null) {
7070 }
7171
7272 /**
73- * @throws NotFoundException
74- * @throws BadResponseException
73+ * @throws Exceptions\ NotFoundException
74+ * @throws Exceptions\ BadResponseException
7575 */
7676 public function getUserFollowing ($ user_id , $ count =12 , $ max_id =null ) {
7777 $ payload = ['id ' => $ user_id , 'count ' => $ count ];
@@ -82,8 +82,8 @@ public function getUserFollowing($user_id, $count=12, $max_id=null) {
8282 }
8383
8484 /**
85- * @throws NotFoundException
86- * @throws BadResponseException
85+ * @throws Exceptions\ NotFoundException
86+ * @throws Exceptions\ BadResponseException
8787 */
8888 public function getUserFollowers ($ user_id , $ count =12 , $ max_id =null )
8989 {
@@ -95,8 +95,8 @@ public function getUserFollowers($user_id, $count=12, $max_id=null)
9595 }
9696
9797 /**
98- * @throws NotFoundException
99- * @throws BadResponseException
98+ * @throws Exceptions\ NotFoundException
99+ * @throws Exceptions\ BadResponseException
100100 */
101101 public function searchUserFollowers ($ user_id , $ query ) {
102102 return $ this ->request ('instagram/user/get_followers ' , [
@@ -106,8 +106,8 @@ public function searchUserFollowers($user_id, $query) {
106106 }
107107
108108 /**
109- * @throws NotFoundException
110- * @throws BadResponseException
109+ * @throws Exceptions\ NotFoundException
110+ * @throws Exceptions\ BadResponseException
111111 */
112112 public function getUserStoriesBulk ($ user_ids ) {
113113 return $ this ->request ('instagram/user/get_stories ' , [
@@ -116,16 +116,16 @@ public function getUserStoriesBulk($user_ids) {
116116 }
117117
118118 /**
119- * @throws NotFoundException
120- * @throws BadResponseException
119+ * @throws Exceptions\ NotFoundException
120+ * @throws Exceptions\ BadResponseException
121121 */
122122 public function getUserStories ($ user_id ) {
123123 return $ this ->getUserStoriesBulk ([$ user_id ]);
124124 }
125125
126126 /**
127- * @throws NotFoundException
128- * @throws BadResponseException
127+ * @throws Exceptions\ NotFoundException
128+ * @throws Exceptions\ BadResponseException
129129 */
130130 public function getMediaInfo ($ media_id ) {
131131 return $ this ->request ('instagram/media/get_info ' , [
@@ -134,8 +134,8 @@ public function getMediaInfo($media_id) {
134134 }
135135
136136 /**
137- * @throws NotFoundException
138- * @throws BadResponseException
137+ * @throws Exceptions\ NotFoundException
138+ * @throws Exceptions\ BadResponseException
139139 */
140140 public function getMediaLikes ($ shortcode , $ count =12 , $ max_id =null ) {
141141 $ payload = ['shortcode ' => $ shortcode , 'count ' => $ count ];
@@ -146,8 +146,8 @@ public function getMediaLikes($shortcode, $count=12, $max_id=null) {
146146 }
147147
148148 /**
149- * @throws NotFoundException
150- * @throws BadResponseException
149+ * @throws Exceptions\ NotFoundException
150+ * @throws Exceptions\ BadResponseException
151151 */
152152 public function getMediaComments ($ media_id , $ can_support_threading =true , $ min_id =null ) {
153153 $ payload = ['id ' => $ media_id , 'can_support_threading ' => $ can_support_threading ];
@@ -158,8 +158,8 @@ public function getMediaComments($media_id, $can_support_threading=true, $min_id
158158 }
159159
160160 /**
161- * @throws NotFoundException
162- * @throws BadResponseException
161+ * @throws Exceptions\ NotFoundException
162+ * @throws Exceptions\ BadResponseException
163163 */
164164 public function getCommentLikes ($ comment_id , $ max_id =null ) {
165165 $ payload = ['id ' => $ comment_id ];
0 commit comments