@@ -144,7 +144,7 @@ public function issueChannelAccessToken($channelId, $channelSecret)
144144 ),
145145 ));
146146
147- $ response = file_get_contents (" self::API_HOST/v2/oauth/accessToken " , false , $ context );
147+ $ response = file_get_contents (self ::API_HOST . " /v2/oauth/accessToken " , false , $ context );
148148 if (strpos ($ http_response_header [0 ], "200 " ) === false ) {
149149 http_response_code (500 );
150150 error_log ("Request failed: " . $ response );
@@ -181,7 +181,7 @@ public function revokeChannelAccessToken()
181181 ),
182182 ));
183183
184- $ response = file_get_contents (" self::API_HOST/v2/oauth/revoke " , false , $ context );
184+ $ response = file_get_contents (self ::API_HOST . " /v2/oauth/revoke " , false , $ context );
185185 if (strpos ($ http_response_header [0 ], "200 " ) === false ) {
186186 http_response_code (500 );
187187 error_log ("Request failed: " . $ response );
@@ -201,7 +201,7 @@ public function revokeChannelAccessToken()
201201 public function getMessageDeliveriesCount ($ date )
202202 {
203203 return $ this ->requestFactory (
204- " self::API_HOST/v2/bot/insight/message/delivery?date= $ date " ,
204+ self ::API_HOST . " /v2/bot/insight/message/delivery?date= $ date " ,
205205 self ::HTTP_METHOD_GET
206206 );
207207 }
@@ -217,7 +217,7 @@ public function getMessageDeliveriesCount($date)
217217 public function getFollowersCount ($ date )
218218 {
219219 return $ this ->requestFactory (
220- " self::API_HOST/v2/bot/insight/followers?date= $ date " ,
220+ self ::API_HOST . " /v2/bot/insight/followers?date= $ date " ,
221221 self ::HTTP_METHOD_GET
222222 );
223223 }
@@ -231,7 +231,7 @@ public function getFollowersCount($date)
231231 public function getFriendDemographics ()
232232 {
233233 return $ this ->requestFactory (
234- " self::API_HOST/v2/bot/insight/demographic " ,
234+ self ::API_HOST . " /v2/bot/insight/demographic " ,
235235 self ::HTTP_METHOD_GET
236236 );
237237 }
@@ -247,7 +247,7 @@ public function getFriendDemographics()
247247 public function getUserInteractionStatistics ($ requestId )
248248 {
249249 return $ this ->requestFactory (
250- " self::API_HOST/v2/bot/insight/message/event?requestId= $ requestId " ,
250+ self ::API_HOST . " /v2/bot/insight/message/event?requestId= $ requestId " ,
251251 self ::HTTP_METHOD_GET
252252 );
253253 }
@@ -263,7 +263,7 @@ public function getUserInteractionStatistics($requestId)
263263 public function issueUserLinkToken ($ userId )
264264 {
265265 return $ this ->requestFactory (
266- " self::API_HOST/v2/bot/user/ $ userId/linkToken " ,
266+ self ::API_HOST . " /v2/bot/user/ $ userId/linkToken " ,
267267 self ::HTTP_METHOD_POST
268268 );
269269 }
@@ -279,7 +279,7 @@ public function issueUserLinkToken($userId)
279279 public function getProfile ($ userId )
280280 {
281281 return $ this ->requestFactory (
282- " self::API_HOST/v2/bot/profile/ $ userId " ,
282+ self ::API_HOST . " /v2/bot/profile/ $ userId " ,
283283 self ::HTTP_METHOD_GET
284284 );
285285 }
@@ -297,7 +297,7 @@ public function getFollowersIds($groupId, $continuationToken = null)
297297 {
298298 $ next = $ continuationToken != null ? "?start= $ continuationToken " : "" ;
299299 return $ this ->requestFactory (
300- " self::API_HOST/v2/bot/followers/ids $ next " ,
300+ self ::API_HOST . " /v2/bot/followers/ids $ next " ,
301301 self ::HTTP_METHOD_GET
302302 );
303303 }
@@ -313,7 +313,7 @@ public function getFollowersIds($groupId, $continuationToken = null)
313313 public function getGroup ($ groupId )
314314 {
315315 return $ this ->requestFactory (
316- " self::API_HOST/v2/bot/group/ $ groupId/summary " ,
316+ self ::API_HOST . " /v2/bot/group/ $ groupId/summary " ,
317317 self ::HTTP_METHOD_GET
318318 );
319319 }
@@ -329,7 +329,7 @@ public function getGroup($groupId)
329329 public function getGroupMemberCount ($ groupId )
330330 {
331331 return $ this ->requestFactory (
332- " self::API_HOST/v2/bot/group/ $ groupId/members/count " ,
332+ self ::API_HOST . " /v2/bot/group/ $ groupId/members/count " ,
333333 self ::HTTP_METHOD_GET
334334 );
335335 }
@@ -346,7 +346,7 @@ public function getGroupMemberCount($groupId)
346346 public function getGroupMemberInfo ($ groupId , $ userId )
347347 {
348348 return $ this ->requestFactory (
349- " self::API_HOST/v2/bot/group/ $ groupId/member/ $ userId " ,
349+ self ::API_HOST . " /v2/bot/group/ $ groupId/member/ $ userId " ,
350350 self ::HTTP_METHOD_GET
351351 );
352352 }
@@ -364,7 +364,7 @@ public function getGroupMemberIds($groupId, $continuationToken = null)
364364 {
365365 $ next = $ continuationToken != null ? "?start= $ continuationToken " : "" ;
366366 return $ this ->requestFactory (
367- " self::API_HOST/v2/bot/group/ $ groupId/members/ids $ next " ,
367+ self ::API_HOST . " /v2/bot/group/ $ groupId/members/ids $ next " ,
368368 self ::HTTP_METHOD_GET
369369 );
370370 }
@@ -380,7 +380,7 @@ public function getGroupMemberIds($groupId, $continuationToken = null)
380380 public function leaveGroup ($ groupId )
381381 {
382382 return $ this ->requestFactory (
383- " self::API_HOST/v2/bot/group/ $ groupId/leave " ,
383+ self ::API_HOST . " /v2/bot/group/ $ groupId/leave " ,
384384 self ::HTTP_METHOD_POST
385385 );
386386 }
@@ -396,7 +396,7 @@ public function leaveGroup($groupId)
396396 public function getRoomMemberCount ($ roomId )
397397 {
398398 return $ this ->requestFactory (
399- " self::API_HOST/v2/bot/room/ $ roomId/members/count " ,
399+ self ::API_HOST . " /v2/bot/room/ $ roomId/members/count " ,
400400 self ::HTTP_METHOD_GET
401401 );
402402 }
@@ -413,7 +413,7 @@ public function getRoomMemberCount($roomId)
413413 public function getRoomMemberInfo ($ roomId , $ userId )
414414 {
415415 return $ this ->requestFactory (
416- " self::API_HOST/v2/bot/room/ $ roomId/member/ $ userId " ,
416+ self ::API_HOST . " /v2/bot/room/ $ roomId/member/ $ userId " ,
417417 self ::HTTP_METHOD_GET
418418 );
419419 }
@@ -431,7 +431,7 @@ public function getRoomMemberIds($roomId, $continuationToken = null)
431431 {
432432 $ next = $ continuationToken != null ? "?start= $ continuationToken " : "" ;
433433 return $ this ->requestFactory (
434- " self::API_HOST/v2/bot/room/ $ roomId/members/ids $ next " ,
434+ self ::API_HOST . " /v2/bot/room/ $ roomId/members/ids $ next " ,
435435 self ::HTTP_METHOD_GET
436436 );
437437 }
@@ -448,7 +448,7 @@ public function leaveRoom($roomId)
448448 {
449449 $ next = $ continuationToken != null ? "?start= $ continuationToken " : "" ;
450450 return $ this ->requestFactory (
451- " self::API_HOST/v2/bot/room/ $ roomId/leave " ,
451+ self ::API_HOST . " /v2/bot/room/ $ roomId/leave " ,
452452 self ::HTTP_METHOD_POST
453453 );
454454 }
@@ -478,7 +478,7 @@ public function replyMessage($replyToken, $message, $notificationDisabled = fals
478478 );
479479
480480 return $ this ->requestFactory (
481- " self::API_HOST/v2/bot/message/reply " ,
481+ self ::API_HOST . " /v2/bot/message/reply " ,
482482 self ::HTTP_METHOD_POST ,
483483 $ content
484484 );
@@ -509,7 +509,7 @@ public function pushMessage($targetId, $message, $notificationDisabled = false)
509509 );
510510
511511 return $ this ->requestFactory (
512- " self::API_HOST/v2/bot/message/push " ,
512+ self ::API_HOST . " /v2/bot/message/push " ,
513513 self ::HTTP_METHOD_POST ,
514514 $ content
515515 );
@@ -540,7 +540,7 @@ public function multicast($targetIds, $message, $notificationDisabled = false)
540540 );
541541
542542 return $ this ->requestFactory (
543- " self::API_HOST/v2/bot/message/multicast " ,
543+ self ::API_HOST . " /v2/bot/message/multicast " ,
544544 self ::HTTP_METHOD_POST ,
545545 $ content
546546 );
@@ -569,7 +569,7 @@ public function broadcast($targetIds, $message, $notificationDisabled = false)
569569 );
570570
571571 return $ this ->requestFactory (
572- " self::API_HOST/v2/bot/message/broadcast " ,
572+ self ::API_HOST . " /v2/bot/message/broadcast " ,
573573 self ::HTTP_METHOD_POST ,
574574 $ content
575575 );
@@ -584,7 +584,7 @@ public function broadcast($targetIds, $message, $notificationDisabled = false)
584584 public function getSendMessagesQuota ($ audienceGroupId )
585585 {
586586 return $ this ->requestFactory (
587- " self::API_HOST/v2/bot/message/quota " ,
587+ self ::API_HOST . " /v2/bot/message/quota " ,
588588 self ::HTTP_METHOD_GET
589589 );
590590 }
@@ -598,7 +598,7 @@ public function getSendMessagesQuota($audienceGroupId)
598598 public function getAllMessagesSentCount ($ audienceGroupId )
599599 {
600600 return $ this ->requestFactory (
601- " self::API_HOST/v2/bot/message/quota/consumption " ,
601+ self ::API_HOST . " /v2/bot/message/quota/consumption " ,
602602 self ::HTTP_METHOD_GET
603603 );
604604 }
@@ -612,7 +612,7 @@ public function getAllMessagesSentCount($audienceGroupId)
612612 public function getReplyMessagesSentCount ($ audienceGroupId )
613613 {
614614 return $ this ->requestFactory (
615- " self::API_HOST/v2/bot/message/delivery/reply " ,
615+ self ::API_HOST . " /v2/bot/message/delivery/reply " ,
616616 self ::HTTP_METHOD_GET
617617 );
618618 }
@@ -626,7 +626,7 @@ public function getReplyMessagesSentCount($audienceGroupId)
626626 public function getPushMessagesSentCount ($ audienceGroupId )
627627 {
628628 return $ this ->requestFactory (
629- " self::API_HOST/v2/bot/message/delivery/push " ,
629+ self ::API_HOST . " /v2/bot/message/delivery/push " ,
630630 self ::HTTP_METHOD_GET
631631 );
632632 }
@@ -640,7 +640,7 @@ public function getPushMessagesSentCount($audienceGroupId)
640640 public function getMulticastMessagesSentCount ($ audienceGroupId )
641641 {
642642 return $ this ->requestFactory (
643- " self::API_HOST/v2/bot/message/delivery/multicast " ,
643+ self ::API_HOST . " /v2/bot/message/delivery/multicast " ,
644644 self ::HTTP_METHOD_GET
645645 );
646646 }
@@ -654,7 +654,7 @@ public function getMulticastMessagesSentCount($audienceGroupId)
654654 public function getBroadcastMessagesSentCount ($ audienceGroupId )
655655 {
656656 return $ this ->requestFactory (
657- " self::API_HOST/v2/bot/message/delivery/broadcast " ,
657+ self ::API_HOST . " /v2/bot/message/delivery/broadcast " ,
658658 self ::HTTP_METHOD_GET
659659 );
660660 }
@@ -670,7 +670,7 @@ public function getBroadcastMessagesSentCount($audienceGroupId)
670670 public function confirmingAudienceGroupStatus ($ audienceGroupId )
671671 {
672672 return $ this ->requestFactory (
673- " self::API_HOST/v2/bot/audienceGroup/ $ audienceGroupId " ,
673+ self ::API_HOST . " /v2/bot/audienceGroup/ $ audienceGroupId " ,
674674 self ::HTTP_METHOD_GET
675675 );
676676 }
@@ -686,7 +686,7 @@ public function confirmingAudienceGroupStatus($audienceGroupId)
686686 public function getMessageObject ($ messageId )
687687 {
688688 return $ this ->requestFactory (
689- " self::API_DATA_HOST/v2/bot/message/ $ messageId/content " ,
689+ self ::API_DATA_HOST . " /v2/bot/message/ $ messageId/content " ,
690690 self ::HTTP_METHOD_GET ,
691691 $ decode = false
692692 );
@@ -721,7 +721,7 @@ public function downloadMessageObject($messageId, $path = "./")
721721 public function getRichMenuList ()
722722 {
723723 return $ this ->requestFactory (
724- " self::API_HOST/v2/bot/richmenu/list " ,
724+ self ::API_HOST . " /v2/bot/richmenu/list " ,
725725 self ::HTTP_METHOD_GET
726726 );
727727 }
@@ -737,7 +737,7 @@ public function getRichMenuList()
737737 public function getRichMenu ($ richMenuId )
738738 {
739739 return $ this ->requestFactory (
740- " self::API_HOST/v2/bot/richmenu/ $ richMenuId " ,
740+ self ::API_HOST . " /v2/bot/richmenu/ $ richMenuId " ,
741741 self ::HTTP_METHOD_GET
742742 );
743743 }
@@ -753,7 +753,7 @@ public function getRichMenu($richMenuId)
753753 public function createRichMenu ($ content )
754754 {
755755 return $ this ->requestFactory (
756- " self::API_HOST/v2/bot/richmenu " ,
756+ self ::API_HOST . " /v2/bot/richmenu " ,
757757 self ::HTTP_METHOD_POST ,
758758 $ content
759759 );
@@ -770,7 +770,7 @@ public function createRichMenu($content)
770770 public function deleteRichMenu ($ richMenuId )
771771 {
772772 return $ this ->requestFactory (
773- " self::API_HOST/v2/bot/richmenu/ $ richMenuId " ,
773+ self ::API_HOST . " /v2/bot/richmenu/ $ richMenuId " ,
774774 self ::HTTP_METHOD_DELETE
775775 );
776776 }
@@ -786,7 +786,7 @@ public function deleteRichMenu($richMenuId)
786786 public function getRichMenuIdOfUser ($ userId )
787787 {
788788 return $ this ->requestFactory (
789- " self::API_HOST/v2/bot/user/ $ userId/richmenu " ,
789+ self ::API_HOST . " /v2/bot/user/ $ userId/richmenu " ,
790790 self ::HTTP_METHOD_GET
791791 );
792792 }
@@ -803,7 +803,7 @@ public function getRichMenuIdOfUser($userId)
803803 public function linkRichMenuToUser ($ userId , $ richMenuId )
804804 {
805805 return $ this ->requestFactory (
806- " self::API_HOST/v2/bot/user/ $ userId/richmenu/ $ richMenuId " ,
806+ self ::API_HOST . " /v2/bot/user/ $ userId/richmenu/ $ richMenuId " ,
807807 self ::HTTP_METHOD_POST
808808 );
809809 }
@@ -820,7 +820,7 @@ public function linkRichMenuToUser($userId, $richMenuId)
820820 public function unlinkRichMenuFromUser ($ userId , $ richMenuId )
821821 {
822822 return $ this ->requestFactory (
823- " self::API_HOST/v2/bot/user/ $ userId/richmenu/ $ richMenuId " ,
823+ self ::API_HOST . " /v2/bot/user/ $ userId/richmenu/ $ richMenuId " ,
824824 self ::HTTP_METHOD_DELETE
825825 );
826826 }
@@ -837,7 +837,7 @@ public function unlinkRichMenuFromUser($userId, $richMenuId)
837837 */
838838 public function uploadRichMenuImage ($ richMenuId , $ path )
839839 {
840- $ ch = curl_init (" self::API_DATA_HOST/v2/bot/richmenu/ $ richMenuId/content " );
840+ $ ch = curl_init (self ::API_DATA_HOST . " /v2/bot/richmenu/ $ richMenuId/content " );
841841 curl_setopt ($ ch , CURLOPT_POST , true );
842842 curl_setopt ($ ch , CURLOPT_POSTFIELDS , array (
843843 "file_input " => $ path ,
@@ -856,7 +856,7 @@ public function uploadRichMenuImage($richMenuId, $path)
856856 public function getRichMenuImage ($ richMenuId )
857857 {
858858 return $ this ->requestFactory (
859- " self::API_DATA_HOST/v2/bot/richmenu/ $ richMenuId/content " ,
859+ self ::API_DATA_HOST . " /v2/bot/richmenu/ $ richMenuId/content " ,
860860 self ::HTTP_METHOD_GET ,
861861 $ decode = false
862862 );
0 commit comments