Skip to content

Commit 693fda9

Browse files
committed
Fix docs
1 parent deea1ea commit 693fda9

6 files changed

Lines changed: 124 additions & 36 deletions

File tree

generator/src/main/resources/line-bot-sdk-ruby-generator/api.pebble

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,10 @@ module Line
179179

180180
response_body
181181
end{% endfor %}
182-
{%- if ["ChannelAccessTokenClient"] contains operations.classname %}
182+
{%- if ["ChannelAccessTokenClient"] contains operations.classname %}
183+
183184
{% include "./body/api/" + operations.classname + ".rb" %}
184-
{%- endif %}
185+
{%- endif %}
185186
end
186187
end
187188
end

generator/src/main/resources/line-bot-sdk-ruby-generator/body/api/ChannelAccessTokenClient.rb

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
# Issues a new stateless channel access token by JWT assertion.
1+
# Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
22
# This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication.
3+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
4+
# When you want to get HTTP status code or response headers, use {{ '{#' }}issue_stateless_channel_token_by_jwt_assertion_with_http_info} instead of this.
35
#
46
# @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.
5-
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse]
7+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
8+
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200
9+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
610
def issue_stateless_channel_token_by_jwt_assertion(
711
client_assertion:
812
)
@@ -13,12 +17,16 @@ def issue_stateless_channel_token_by_jwt_assertion(
1317
)
1418
end
1519

16-
# Issues a new stateless channel access token by client secret.
20+
# Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
1721
# This is a convenience wrapper that only requires the parameters needed for client secret authentication.
22+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
23+
# When you want to get HTTP status code or response headers, use {{ '{#' }}issue_stateless_channel_token_by_client_secret_with_http_info} instead of this.
1824
#
1925
# @param client_id [String] Channel ID.
2026
# @param client_secret [String] Channel secret.
21-
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse]
27+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
28+
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200
29+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
2230
def issue_stateless_channel_token_by_client_secret(
2331
client_id:,
2432
client_secret:
@@ -30,12 +38,15 @@ def issue_stateless_channel_token_by_client_secret(
3038
)
3139
end
3240

33-
# Issues a new stateless channel access token by JWT assertion.
41+
# Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
3442
# This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication.
35-
# When you want to get HTTP status code or response headers, use this instead of {{ '{#' }}issue_stateless_channel_token_by_jwt_assertion}.
43+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
44+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
3645
#
3746
# @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.
38-
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})]
47+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
48+
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200
49+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
3950
def issue_stateless_channel_token_by_jwt_assertion_with_http_info(
4051
client_assertion:
4152
)
@@ -46,13 +57,16 @@ def issue_stateless_channel_token_by_jwt_assertion_with_http_info(
4657
)
4758
end
4859

49-
# Issues a new stateless channel access token by client secret.
60+
# Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
5061
# This is a convenience wrapper that only requires the parameters needed for client secret authentication.
51-
# When you want to get HTTP status code or response headers, use this instead of {{ '{#' }}issue_stateless_channel_token_by_client_secret}.
62+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
63+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
5264
#
5365
# @param client_id [String] Channel ID.
5466
# @param client_secret [String] Channel secret.
55-
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})]
67+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
68+
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200
69+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
5670
def issue_stateless_channel_token_by_client_secret_with_http_info(
5771
client_id:,
5872
client_secret:

generator/src/main/resources/line-bot-sdk-ruby-rbs-generator/api.pebble

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ module Line
119119
| String? # otherwise
120120
)
121121
{%- endfor %}
122-
{%- if ["ChannelAccessTokenClient"] contains operations.classname %}
122+
{%- if ["ChannelAccessTokenClient"] contains operations.classname %}
123+
123124
{% include "./body/api/" + operations.classname + ".rbs" %}
124-
{%- endif %}
125+
{%- endif %}
125126
end
126127
end
127128
end

generator/src/main/resources/line-bot-sdk-ruby-rbs-generator/body/api/ChannelAccessTokenClient.rbs

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
# Issues a new stateless channel access token by JWT assertion.
1+
# Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
22
# This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication.
3+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
4+
# When you want to get HTTP status code or response headers, use {{ '{#' }}issue_stateless_channel_token_by_jwt_assertion_with_http_info} instead of this.
5+
#
6+
# @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.
7+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
8+
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200
9+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
310
def issue_stateless_channel_token_by_jwt_assertion: (
411
client_assertion: String
512
) -> (
613
IssueStatelessChannelAccessTokenResponse # when HTTP status code is 200
714
| String? # otherwise
815
)
916

10-
# Issues a new stateless channel access token by client secret.
17+
# Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
1118
# This is a convenience wrapper that only requires the parameters needed for client secret authentication.
19+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
20+
# When you want to get HTTP status code or response headers, use {{ '{#' }}issue_stateless_channel_token_by_client_secret_with_http_info} instead of this.
21+
#
22+
# @param client_id [String] Channel ID.
23+
# @param client_secret [String] Channel secret.
24+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
25+
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200
26+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
1227
def issue_stateless_channel_token_by_client_secret: (
1328
client_id: String,
1429
client_secret: String
@@ -17,19 +32,32 @@
1732
| String? # otherwise
1833
)
1934

20-
# Issues a new stateless channel access token by JWT assertion.
35+
# Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
2136
# This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication.
22-
# When you want to get HTTP status code or response headers, use this instead of #issue_stateless_channel_token_by_jwt_assertion.
37+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
38+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
39+
#
40+
# @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.
41+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
42+
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200
43+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
2344
def issue_stateless_channel_token_by_jwt_assertion_with_http_info: (
2445
client_assertion: String
2546
) -> (
2647
[IssueStatelessChannelAccessTokenResponse, 200, Hash[untyped, untyped]] # when HTTP status code is 200
2748
| [String?, Integer, Hash[untyped, untyped]] # otherwise
2849
)
2950

30-
# Issues a new stateless channel access token by client secret.
51+
# Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
3152
# This is a convenience wrapper that only requires the parameters needed for client secret authentication.
32-
# When you want to get HTTP status code or response headers, use this instead of #issue_stateless_channel_token_by_client_secret.
53+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
54+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
55+
#
56+
# @param client_id [String] Channel ID.
57+
# @param client_secret [String] Channel secret.
58+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
59+
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200
60+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
3361
def issue_stateless_channel_token_by_client_secret_with_http_info: (
3462
client_id: String,
3563
client_secret: String

lib/line/bot/v2/channel_access_token/api/channel_access_token_client.rb

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,16 @@ def verify_channel_token_by_jwt(
534534

535535
response_body
536536
end
537-
# Issues a new stateless channel access token by JWT assertion.
537+
538+
# Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
538539
# This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication.
540+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
541+
# When you want to get HTTP status code or response headers, use {#issue_stateless_channel_token_by_jwt_assertion_with_http_info} instead of this.
539542
#
540543
# @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.
541-
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse]
544+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
545+
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200
546+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
542547
def issue_stateless_channel_token_by_jwt_assertion(
543548
client_assertion:
544549
)
@@ -549,12 +554,16 @@ def issue_stateless_channel_token_by_jwt_assertion(
549554
)
550555
end
551556

552-
# Issues a new stateless channel access token by client secret.
557+
# Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
553558
# This is a convenience wrapper that only requires the parameters needed for client secret authentication.
559+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
560+
# When you want to get HTTP status code or response headers, use {#issue_stateless_channel_token_by_client_secret_with_http_info} instead of this.
554561
#
555562
# @param client_id [String] Channel ID.
556563
# @param client_secret [String] Channel secret.
557-
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse]
564+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
565+
# @return [Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse] when HTTP status code is 200
566+
# @return [String, nil] when other HTTP status code is returned. This String is HTTP response body itself.
558567
def issue_stateless_channel_token_by_client_secret(
559568
client_id:,
560569
client_secret:
@@ -566,12 +575,15 @@ def issue_stateless_channel_token_by_client_secret(
566575
)
567576
end
568577

569-
# Issues a new stateless channel access token by JWT assertion.
578+
# Issues a new stateless channel access token by JWT assertion, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
570579
# This is a convenience wrapper that only requires the parameters needed for JWT assertion authentication.
571-
# When you want to get HTTP status code or response headers, use this instead of {#issue_stateless_channel_token_by_jwt_assertion}.
580+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
581+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
572582
#
573583
# @param client_assertion [String] A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key.
574-
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})]
584+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
585+
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200
586+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
575587
def issue_stateless_channel_token_by_jwt_assertion_with_http_info(
576588
client_assertion:
577589
)
@@ -582,13 +594,16 @@ def issue_stateless_channel_token_by_jwt_assertion_with_http_info(
582594
)
583595
end
584596

585-
# Issues a new stateless channel access token by client secret.
597+
# Issues a new stateless channel access token by client secret, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires.
586598
# This is a convenience wrapper that only requires the parameters needed for client secret authentication.
587-
# When you want to get HTTP status code or response headers, use this instead of {#issue_stateless_channel_token_by_client_secret}.
599+
# This requests to <code>POST https://api.line.me/oauth2/v3/token</code>
600+
# This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.
588601
#
589602
# @param client_id [String] Channel ID.
590603
# @param client_secret [String] Channel secret.
591-
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})]
604+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
605+
# @return [Array(Line::Bot::V2::ChannelAccessToken::IssueStatelessChannelAccessTokenResponse, Integer, Hash{String => String})] when HTTP status code is 200
606+
# @return [Array((String|nil), Integer, Hash{String => String})] when other HTTP status code is returned. String is HTTP response body itself.
592607
def issue_stateless_channel_token_by_client_secret_with_http_info(
593608
client_id:,
594609
client_secret:

0 commit comments

Comments
 (0)