File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module Bot
19
19
module API
20
20
DEFAULT_ENDPOINT = "https://api.line.me/v2"
21
21
DEFAULT_BLOB_ENDPOINT = "https://api-data.line.me/v2"
22
+ DEFAULT_LIFF_ENDPOINT = "https://api.line.me/liff/v1"
22
23
23
24
DEFAULT_HEADERS = {
24
25
'Content-Type' => 'application/json; charset=UTF-8' ,
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def blob_endpoint
67
67
end
68
68
69
69
def liff_endpoint
70
- @liff_endpoint ||= endpoint . sub ( %r{/v2 \z } , '' )
70
+ @liff_endpoint ||= API :: DEFAULT_LIFF_ENDPOINT
71
71
end
72
72
73
73
# @return [Hash]
@@ -648,28 +648,28 @@ def get_bot_info
648
648
def get_liff_apps
649
649
channel_token_required
650
650
651
- endpoint_path = '/liff/v1/ apps'
651
+ endpoint_path = '/apps'
652
652
get ( liff_endpoint , endpoint_path , credentials )
653
653
end
654
654
655
655
def create_liff_app ( app )
656
656
channel_token_required
657
657
658
- endpoint_path = '/liff/v1/ apps'
658
+ endpoint_path = '/apps'
659
659
post ( liff_endpoint , endpoint_path , app . to_json , credentials )
660
660
end
661
661
662
662
def update_liff_app ( liff_id , app )
663
663
channel_token_required
664
664
665
- endpoint_path = "/liff/v1/ apps/#{ liff_id } "
665
+ endpoint_path = "/apps/#{ liff_id } "
666
666
put ( liff_endpoint , endpoint_path , app . to_json , credentials )
667
667
end
668
668
669
669
def delete_liff_app ( liff_id )
670
670
channel_token_required
671
671
672
- endpoint_path = "/liff/v1/ apps/#{ liff_id } "
672
+ endpoint_path = "/apps/#{ liff_id } "
673
673
delete ( liff_endpoint , endpoint_path , credentials )
674
674
end
675
675
You can’t perform that action at this time.
0 commit comments