Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module Line
headers: header_params{% endif %}
)

body = case response.code.to_i
response_body = case response.code.to_i
{%- for response in op.responses %}
when {{ response.code }}
{%- if response.content['application/json'].schema.complexType != null %}
Expand All @@ -89,7 +89,7 @@ module Line
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# {{ op.notes }}
Expand All @@ -113,12 +113,12 @@ module Line
{{param.paramName}}:{{ param.required ? '' : ' nil' }}{{ loop.last ? '' : ',' -}}
{% endfor %}
)
body, _status_code, _headers = {{op.nickname}}_with_http_info({% for param in op.allParams %}
response_body, _status_code, _headers = {{op.nickname}}_with_http_info({% for param in op.allParams %}
{{param.paramName}}: {{param.paramName}}{{ loop.last ? '' : ',' -}}
{% endfor %}
)

body
response_body
end{% endfor %}
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def gets_all_valid_channel_access_token_key_ids_with_http_info(
query_params: query_params,
)

body = case response.code.to_i
response_body = case response.code.to_i
when 200
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
json.transform_keys! do |key|
Expand All @@ -56,7 +56,7 @@ def gets_all_valid_channel_access_token_key_ids_with_http_info(
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# Gets all valid channel access token key IDs.
Expand All @@ -68,12 +68,12 @@ def gets_all_valid_channel_access_token_key_ids(
client_assertion_type:,
client_assertion:
)
body, _status_code, _headers = gets_all_valid_channel_access_token_key_ids_with_http_info(
response_body, _status_code, _headers = gets_all_valid_channel_access_token_key_ids_with_http_info(
client_assertion_type: client_assertion_type,
client_assertion: client_assertion
)

body
response_body
end

# Issue short-lived channel access token
Expand All @@ -100,7 +100,7 @@ def issue_channel_token_with_http_info(
form_params: form_params,
)

body = case response.code.to_i
response_body = case response.code.to_i
when 200
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
json.transform_keys! do |key|
Expand All @@ -117,7 +117,7 @@ def issue_channel_token_with_http_info(
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# Issue short-lived channel access token
Expand All @@ -131,13 +131,13 @@ def issue_channel_token(
client_id:,
client_secret:
)
body, _status_code, _headers = issue_channel_token_with_http_info(
response_body, _status_code, _headers = issue_channel_token_with_http_info(
grant_type: grant_type,
client_id: client_id,
client_secret: client_secret
)

body
response_body
end

# Issues a channel access token that allows you to specify a desired expiration date. This method lets you use JWT assertion for authentication.
Expand All @@ -164,7 +164,7 @@ def issue_channel_token_by_jwt_with_http_info(
form_params: form_params,
)

body = case response.code.to_i
response_body = case response.code.to_i
when 200
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
json.transform_keys! do |key|
Expand All @@ -175,7 +175,7 @@ def issue_channel_token_by_jwt_with_http_info(
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# Issues a channel access token that allows you to specify a desired expiration date. This method lets you use JWT assertion for authentication.
Expand All @@ -189,13 +189,13 @@ def issue_channel_token_by_jwt(
client_assertion_type:,
client_assertion:
)
body, _status_code, _headers = issue_channel_token_by_jwt_with_http_info(
response_body, _status_code, _headers = issue_channel_token_by_jwt_with_http_info(
grant_type: grant_type,
client_assertion_type: client_assertion_type,
client_assertion: client_assertion
)

body
response_body
end

# Issues a new stateless channel access token, 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.
Expand Down Expand Up @@ -228,7 +228,7 @@ def issue_stateless_channel_token_with_http_info(
form_params: form_params,
)

body = case response.code.to_i
response_body = case response.code.to_i
when 200
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
json.transform_keys! do |key|
Expand All @@ -239,7 +239,7 @@ def issue_stateless_channel_token_with_http_info(
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# Issues a new stateless channel access token, 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.
Expand All @@ -257,15 +257,15 @@ def issue_stateless_channel_token(
client_id: nil,
client_secret: nil
)
body, _status_code, _headers = issue_stateless_channel_token_with_http_info(
response_body, _status_code, _headers = issue_stateless_channel_token_with_http_info(
grant_type: grant_type,
client_assertion_type: client_assertion_type,
client_assertion: client_assertion,
client_id: client_id,
client_secret: client_secret
)

body
response_body
end

# Revoke short-lived or long-lived channel access token
Expand All @@ -286,14 +286,14 @@ def revoke_channel_token_with_http_info(
form_params: form_params,
)

body = case response.code.to_i
response_body = case response.code.to_i
when 200
response.body
else
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# Revoke short-lived or long-lived channel access token
Expand All @@ -303,11 +303,11 @@ def revoke_channel_token_with_http_info(
def revoke_channel_token(
access_token:
)
body, _status_code, _headers = revoke_channel_token_with_http_info(
response_body, _status_code, _headers = revoke_channel_token_with_http_info(
access_token: access_token
)

body
response_body
end

# Revoke channel access token v2.1
Expand All @@ -334,14 +334,14 @@ def revoke_channel_token_by_jwt_with_http_info(
form_params: form_params,
)

body = case response.code.to_i
response_body = case response.code.to_i
when 200
response.body
else
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# Revoke channel access token v2.1
Expand All @@ -355,13 +355,13 @@ def revoke_channel_token_by_jwt(
client_secret:,
access_token:
)
body, _status_code, _headers = revoke_channel_token_by_jwt_with_http_info(
response_body, _status_code, _headers = revoke_channel_token_by_jwt_with_http_info(
client_id: client_id,
client_secret: client_secret,
access_token: access_token
)

body
response_body
end

# Verify the validity of short-lived and long-lived channel access tokens
Expand All @@ -382,7 +382,7 @@ def verify_channel_token_with_http_info(
form_params: form_params,
)

body = case response.code.to_i
response_body = case response.code.to_i
when 200
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
json.transform_keys! do |key|
Expand All @@ -393,7 +393,7 @@ def verify_channel_token_with_http_info(
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# Verify the validity of short-lived and long-lived channel access tokens
Expand All @@ -403,11 +403,11 @@ def verify_channel_token_with_http_info(
def verify_channel_token(
access_token:
)
body, _status_code, _headers = verify_channel_token_with_http_info(
response_body, _status_code, _headers = verify_channel_token_with_http_info(
access_token: access_token
)

body
response_body
end

# You can verify whether a Channel access token with a user-specified expiration (Channel Access Token v2.1) is valid.
Expand All @@ -427,7 +427,7 @@ def verify_channel_token_by_jwt_with_http_info(
query_params: query_params,
)

body = case response.code.to_i
response_body = case response.code.to_i
when 200
json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
json.transform_keys! do |key|
Expand All @@ -438,7 +438,7 @@ def verify_channel_token_by_jwt_with_http_info(
response.body
end

[body, response.code.to_i, response.each_header.to_h]
[response_body, response.code.to_i, response.each_header.to_h]
end

# You can verify whether a Channel access token with a user-specified expiration (Channel Access Token v2.1) is valid.
Expand All @@ -448,11 +448,11 @@ def verify_channel_token_by_jwt_with_http_info(
def verify_channel_token_by_jwt(
access_token:
)
body, _status_code, _headers = verify_channel_token_by_jwt_with_http_info(
response_body, _status_code, _headers = verify_channel_token_by_jwt_with_http_info(
access_token: access_token
)

body
response_body
end
end
end
Expand Down
Loading