Class: Line::Bot::V2::MessagingApi::ApiClient

Inherits:
Object
  • Object
show all
Defined in:
lib/line/bot/v2/messaging_api/api/messaging_api_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_url: nil, channel_access_token:, http_options: {}) ⇒ ApiClient

Initializes a new Line::Bot::V2::MessagingApi::ApiClient instance.

Examples:

@client ||= Line::Bot::V2::MessagingApi::ApiClient.new(
  channel_access_token: "YOUR_CHANNEL_ACCESS_TOKEN",
  http_options: {
    open_timeout: 5,
    read_timeout: 5,
  }
)

Parameters:

  • base_url (String) (defaults to: nil)

    The base URL for requests (optional). Defaults to ‘api.line.me’ if none is provided. You can override this for testing or to use a mock server.

  • channel_access_token (String)

    The channel access token for authorization.

  • http_options (Hash) (defaults to: {})

    HTTP options (same as Net::HTTP options). See: docs.ruby-lang.org/en/3.4/Net/HTTP.html to understand the options.



38
39
40
41
42
43
44
45
46
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 38

def initialize(base_url: nil, channel_access_token:, http_options: {})
  @http_client = HttpClient.new(
    base_url: base_url || 'https://api.line.me',
    http_headers: {
      Authorization: "Bearer #{channel_access_token}"
    },
    http_options: http_options
  )
end

Instance Method Details

#broadcast(broadcast_request:, x_line_retry_key: nil) ⇒ String, ...

Sends a message to multiple users at any time. This requests to POST https://api.line.me/v2/bot/message/broadcast When you want to get HTTP status code or response headers, use #broadcast_with_http_info instead of this.

Parameters:

  • broadcast_request (BroadcastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil)

    Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



125
126
127
128
129
130
131
132
133
134
135
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 125

def broadcast(
  broadcast_request:,
  x_line_retry_key: nil
)
  response_body, _status_code, _headers = broadcast_with_http_info(
    broadcast_request: broadcast_request,
    x_line_retry_key: x_line_retry_key
  )

  response_body
end

#broadcast_with_http_info(broadcast_request:, x_line_retry_key: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Sends a message to multiple users at any time. This requests to POST https://api.line.me/v2/bot/message/broadcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • broadcast_request (BroadcastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil)

    Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 61

def broadcast_with_http_info( 
  broadcast_request:, 
  x_line_retry_key: nil
)
  path = "/v2/bot/message/broadcast"
  header_params = {
    "X-Line-Retry-Key": x_line_retry_key
  }.compact

  response = @http_client.post(
    path: path,
    body_params: broadcast_request,
    headers: header_params
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 403
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 403, response.each_header.to_h]
  when 409
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 409, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#cancel_default_rich_menuString?

Cancel default rich menu This requests to DELETE https://api.line.me/v2/bot/user/all/richmenu When you want to get HTTP status code or response headers, use #cancel_default_rich_menu_with_http_info instead of this.

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



167
168
169
170
171
172
173
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 167

def cancel_default_rich_menu(
)
  response_body, _status_code, _headers = cancel_default_rich_menu_with_http_info(
  )

  response_body
end

#cancel_default_rich_menu_with_http_infoArray((String|nil), Integer, Hash{String => String})

Cancel default rich menu This requests to DELETE https://api.line.me/v2/bot/user/all/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 144

def cancel_default_rich_menu_with_http_info(
)
  path = "/v2/bot/user/all/richmenu"

  response = @http_client.delete(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#close_coupon(coupon_id:) ⇒ String, ...

Close coupon This requests to PUT https://api.line.me/v2/bot/coupon/{couponId}/close When you want to get HTTP status code or response headers, use #close_coupon_with_http_info instead of this.

Parameters:

  • coupon_id (String)

Returns:

See Also:



237
238
239
240
241
242
243
244
245
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 237

def close_coupon(
  coupon_id:
)
  response_body, _status_code, _headers = close_coupon_with_http_info(
    coupon_id: coupon_id
  )

  response_body
end

#close_coupon_with_http_info(coupon_id:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Close coupon This requests to PUT https://api.line.me/v2/bot/coupon/{couponId}/close This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • coupon_id (String)

Returns:

See Also:



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 186

def close_coupon_with_http_info( 
  coupon_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/coupon/{couponId}/close", {
    "couponId": coupon_id
  })

  response = @http_client.put(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  when 410
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 410, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#create_coupon(coupon_create_request: nil) ⇒ Line::Bot::V2::MessagingApi::CouponCreateResponse, ...

Create a new coupon. Define coupon details such as type, title, and validity period. This requests to POST https://api.line.me/v2/bot/coupon When you want to get HTTP status code or response headers, use #create_coupon_with_http_info instead of this.

Parameters:

Returns:

See Also:



295
296
297
298
299
300
301
302
303
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 295

def create_coupon(
  coupon_create_request: nil
)
  response_body, _status_code, _headers = create_coupon_with_http_info(
    coupon_create_request: coupon_create_request
  )

  response_body
end

#create_coupon_with_http_info(coupon_create_request: nil) ⇒ Array(Line::Bot::V2::MessagingApi::CouponCreateResponse, Integer, Hash{String => String}), ...

Create a new coupon. Define coupon details such as type, title, and validity period. This requests to POST https://api.line.me/v2/bot/coupon This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

See Also:



256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 256

def create_coupon_with_http_info( 
  coupon_create_request: nil
)
  path = "/v2/bot/coupon"

  response = @http_client.post(
    path: path,
    body_params: coupon_create_request,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::CouponCreateResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#create_rich_menu(rich_menu_request:) ⇒ Line::Bot::V2::MessagingApi::RichMenuIdResponse, ...

Create rich menu This requests to POST https://api.line.me/v2/bot/richmenu When you want to get HTTP status code or response headers, use #create_rich_menu_with_http_info instead of this.

Parameters:

Returns:

See Also:



344
345
346
347
348
349
350
351
352
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 344

def create_rich_menu(
  rich_menu_request:
)
  response_body, _status_code, _headers = create_rich_menu_with_http_info(
    rich_menu_request: rich_menu_request
  )

  response_body
end

#create_rich_menu_alias(create_rich_menu_alias_request:) ⇒ String, ...

Create rich menu alias This requests to POST https://api.line.me/v2/bot/richmenu/alias When you want to get HTTP status code or response headers, use #create_rich_menu_alias_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse)

    when HTTP status code is 400

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



397
398
399
400
401
402
403
404
405
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 397

def create_rich_menu_alias(
  create_rich_menu_alias_request:
)
  response_body, _status_code, _headers = create_rich_menu_alias_with_http_info(
    create_rich_menu_alias_request: create_rich_menu_alias_request
  )

  response_body
end

#create_rich_menu_alias_with_http_info(create_rich_menu_alias_request:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Create rich menu alias This requests to POST https://api.line.me/v2/bot/richmenu/alias This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String}))

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 363

def create_rich_menu_alias_with_http_info( 
  create_rich_menu_alias_request:
)
  path = "/v2/bot/richmenu/alias"

  response = @http_client.post(
    path: path,
    body_params: create_rich_menu_alias_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#create_rich_menu_with_http_info(rich_menu_request:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Create rich menu This requests to POST https://api.line.me/v2/bot/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 313

def create_rich_menu_with_http_info( 
  rich_menu_request:
)
  path = "/v2/bot/richmenu"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_request,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#delete_rich_menu(rich_menu_id:) ⇒ String?

Deletes a rich menu. This requests to DELETE https://api.line.me/v2/bot/richmenu/{richMenuId} When you want to get HTTP status code or response headers, use #delete_rich_menu_with_http_info instead of this.

Parameters:

  • rich_menu_id (String)

    ID of a rich menu

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



442
443
444
445
446
447
448
449
450
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 442

def delete_rich_menu(
  rich_menu_id:
)
  response_body, _status_code, _headers = delete_rich_menu_with_http_info(
    rich_menu_id: rich_menu_id
  )

  response_body
end

#delete_rich_menu_alias(rich_menu_alias_id:) ⇒ String, ...

Delete rich menu alias This requests to DELETE https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId} When you want to get HTTP status code or response headers, use #delete_rich_menu_alias_with_http_info instead of this.

Parameters:

  • rich_menu_alias_id (String)

    Rich menu alias ID that you want to delete.

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse)

    when HTTP status code is 400

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



496
497
498
499
500
501
502
503
504
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 496

def delete_rich_menu_alias(
  rich_menu_alias_id:
)
  response_body, _status_code, _headers = delete_rich_menu_alias_with_http_info(
    rich_menu_alias_id: rich_menu_alias_id
  )

  response_body
end

#delete_rich_menu_alias_with_http_info(rich_menu_alias_id:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Delete rich menu alias This requests to DELETE https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_alias_id (String)

    Rich menu alias ID that you want to delete.

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String}))

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 461

def delete_rich_menu_alias_with_http_info( 
  rich_menu_alias_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/alias/{richMenuAliasId}", {
    "richMenuAliasId": rich_menu_alias_id
  })

  response = @http_client.delete(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#delete_rich_menu_with_http_info(rich_menu_id:) ⇒ Array((String|nil), Integer, Hash{String => String})

Deletes a rich menu. This requests to DELETE https://api.line.me/v2/bot/richmenu/{richMenuId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_id (String)

    ID of a rich menu

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 415

def delete_rich_menu_with_http_info( 
  rich_menu_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/{richMenuId}", {
    "richMenuId": rich_menu_id
  })

  response = @http_client.delete(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_aggregation_unit_name_list(limit: nil, start: nil) ⇒ Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse, ...

Get name list of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/list When you want to get HTTP status code or response headers, use #get_aggregation_unit_name_list_with_http_info instead of this.

Parameters:

  • limit (String, nil) (defaults to: nil)

    The maximum number of aggregation units you can get per request.

  • start (String, nil) (defaults to: nil)

    Value of the continuation token found in the next property of the JSON object returned in the response. If you can’t get all the aggregation units in one request, include this parameter to get the remaining array.

Returns:

See Also:



552
553
554
555
556
557
558
559
560
561
562
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 552

def get_aggregation_unit_name_list(
  limit: nil,
  start: nil
)
  response_body, _status_code, _headers = get_aggregation_unit_name_list_with_http_info(
    limit: limit,
    start: start
  )

  response_body
end

#get_aggregation_unit_name_list_with_http_info(limit: nil, start: nil) ⇒ Array(Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get name list of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/list This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • limit (String, nil) (defaults to: nil)

    The maximum number of aggregation units you can get per request.

  • start (String, nil) (defaults to: nil)

    Value of the continuation token found in the next property of the JSON object returned in the response. If you can’t get all the aggregation units in one request, include this parameter to get the remaining array.

Returns:

See Also:



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 515

def get_aggregation_unit_name_list_with_http_info( 
  limit: nil, 
  start: nil
)
  path = "/v2/bot/message/aggregation/list"
  query_params = {
    "limit": limit,
    "start": start
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetAggregationUnitNameListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_aggregation_unit_usageLine::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse, ...

Get number of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/info When you want to get HTTP status code or response headers, use #get_aggregation_unit_usage_with_http_info instead of this.

Returns:

See Also:



599
600
601
602
603
604
605
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 599

def get_aggregation_unit_usage(
)
  response_body, _status_code, _headers = get_aggregation_unit_usage_with_http_info(
  )

  response_body
end

#get_aggregation_unit_usage_with_http_infoArray(Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of units used this month This requests to GET https://api.line.me/v2/bot/message/aggregation/info This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

See Also:



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 571

def get_aggregation_unit_usage_with_http_info(
)
  path = "/v2/bot/message/aggregation/info"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetAggregationUnitUsageResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_bot_infoLine::Bot::V2::MessagingApi::BotInfoResponse, ...

Get bot info This requests to GET https://api.line.me/v2/bot/info When you want to get HTTP status code or response headers, use #get_bot_info_with_http_info instead of this.

Returns:

See Also:



642
643
644
645
646
647
648
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 642

def get_bot_info(
)
  response_body, _status_code, _headers = get_bot_info_with_http_info(
  )

  response_body
end

#get_bot_info_with_http_infoArray(Line::Bot::V2::MessagingApi::BotInfoResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get bot info This requests to GET https://api.line.me/v2/bot/info This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::BotInfoResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 614

def get_bot_info_with_http_info(
)
  path = "/v2/bot/info"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::BotInfoResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_coupon_detail(coupon_id:) ⇒ Line::Bot::V2::MessagingApi::CouponResponse, ...

Get coupon detail This requests to GET https://api.line.me/v2/bot/coupon/{couponId} When you want to get HTTP status code or response headers, use #get_coupon_detail_with_http_info instead of this.

Parameters:

  • coupon_id (String)

Returns:

See Also:



708
709
710
711
712
713
714
715
716
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 708

def get_coupon_detail(
  coupon_id:
)
  response_body, _status_code, _headers = get_coupon_detail_with_http_info(
    coupon_id: coupon_id
  )

  response_body
end

#get_coupon_detail_with_http_info(coupon_id:) ⇒ Array(Line::Bot::V2::MessagingApi::CouponResponse, Integer, Hash{String => String}), ...

Get coupon detail This requests to GET https://api.line.me/v2/bot/coupon/{couponId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • coupon_id (String)

Returns:

See Also:



660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 660

def get_coupon_detail_with_http_info( 
  coupon_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/coupon/{couponId}", {
    "couponId": coupon_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::CouponResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_default_rich_menu_idLine::Bot::V2::MessagingApi::RichMenuIdResponse, ...

Gets the ID of the default rich menu set with the Messaging API. This requests to GET https://api.line.me/v2/bot/user/all/richmenu When you want to get HTTP status code or response headers, use #get_default_rich_menu_id_with_http_info instead of this.

Returns:

See Also:



753
754
755
756
757
758
759
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 753

def get_default_rich_menu_id(
)
  response_body, _status_code, _headers = get_default_rich_menu_id_with_http_info(
  )

  response_body
end

#get_default_rich_menu_id_with_http_infoArray(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets the ID of the default rich menu set with the Messaging API. This requests to GET https://api.line.me/v2/bot/user/all/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 725

def get_default_rich_menu_id_with_http_info(
)
  path = "/v2/bot/user/all/richmenu"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_followers(start: nil, limit: nil) ⇒ Line::Bot::V2::MessagingApi::GetFollowersResponse, ...

Get a list of users who added your LINE Official Account as a friend This requests to GET https://api.line.me/v2/bot/followers/ids When you want to get HTTP status code or response headers, use #get_followers_with_http_info instead of this.

Parameters:

  • start (String, nil) (defaults to: nil)

    Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs.

  • limit (Integer, nil) (defaults to: nil)

    The maximum number of user IDs to retrieve in a single request.

Returns:

See Also:



807
808
809
810
811
812
813
814
815
816
817
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 807

def get_followers(
  start: nil,
  limit: nil
)
  response_body, _status_code, _headers = get_followers_with_http_info(
    start: start,
    limit: limit
  )

  response_body
end

#get_followers_with_http_info(start: nil, limit: nil) ⇒ Array(Line::Bot::V2::MessagingApi::GetFollowersResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get a list of users who added your LINE Official Account as a friend This requests to GET https://api.line.me/v2/bot/followers/ids This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • start (String, nil) (defaults to: nil)

    Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs.

  • limit (Integer, nil) (defaults to: nil)

    The maximum number of user IDs to retrieve in a single request.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::GetFollowersResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 770

def get_followers_with_http_info( 
  start: nil, 
  limit: nil
)
  path = "/v2/bot/followers/ids"
  query_params = {
    "start": start,
    "limit": limit
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetFollowersResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_group_member_count(group_id:) ⇒ Line::Bot::V2::MessagingApi::GroupMemberCountResponse, ...

Get number of users in a group chat This requests to GET https://api.line.me/v2/bot/group/{groupId}/members/count When you want to get HTTP status code or response headers, use #get_group_member_count_with_http_info instead of this.

Parameters:

  • group_id (String)

    Group ID

Returns:

See Also:



859
860
861
862
863
864
865
866
867
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 859

def get_group_member_count(
  group_id:
)
  response_body, _status_code, _headers = get_group_member_count_with_http_info(
    group_id: group_id
  )

  response_body
end

#get_group_member_count_with_http_info(group_id:) ⇒ Array(Line::Bot::V2::MessagingApi::GroupMemberCountResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of users in a group chat This requests to GET https://api.line.me/v2/bot/group/{groupId}/members/count This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String)

    Group ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::GroupMemberCountResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 827

def get_group_member_count_with_http_info( 
  group_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/members/count", {
    "groupId": group_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GroupMemberCountResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_group_member_profile(group_id:, user_id:) ⇒ Line::Bot::V2::MessagingApi::GroupUserProfileResponse, ...

Get group chat member profile This requests to GET https://api.line.me/v2/bot/group/{groupId}/member/{userId} When you want to get HTTP status code or response headers, use #get_group_member_profile_with_http_info instead of this.

Parameters:

  • group_id (String)

    Group ID

  • user_id (String)

    User ID

Returns:

See Also:



913
914
915
916
917
918
919
920
921
922
923
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 913

def get_group_member_profile(
  group_id:,
  user_id:
)
  response_body, _status_code, _headers = get_group_member_profile_with_http_info(
    group_id: group_id,
    user_id: user_id
  )

  response_body
end

#get_group_member_profile_with_http_info(group_id:, user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::GroupUserProfileResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get group chat member profile This requests to GET https://api.line.me/v2/bot/group/{groupId}/member/{userId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String)

    Group ID

  • user_id (String)

    User ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::GroupUserProfileResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 878

def get_group_member_profile_with_http_info( 
  group_id:, 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/member/{userId}", {
    "groupId": group_id,
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GroupUserProfileResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_group_members_ids(group_id:, start: nil) ⇒ Line::Bot::V2::MessagingApi::MembersIdsResponse, ...

Get group chat member user IDs This requests to GET https://api.line.me/v2/bot/group/{groupId}/members/ids When you want to get HTTP status code or response headers, use #get_group_members_ids_with_http_info instead of this.

Parameters:

  • group_id (String)

    Group ID

  • start (String, nil) (defaults to: nil)

    Value of the continuation token found in the ‘next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.

Returns:

See Also:



972
973
974
975
976
977
978
979
980
981
982
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 972

def get_group_members_ids(
  group_id:,
  start: nil
)
  response_body, _status_code, _headers = get_group_members_ids_with_http_info(
    group_id: group_id,
    start: start
  )

  response_body
end

#get_group_members_ids_with_http_info(group_id:, start: nil) ⇒ Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get group chat member user IDs This requests to GET https://api.line.me/v2/bot/group/{groupId}/members/ids This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String)

    Group ID

  • start (String, nil) (defaults to: nil)

    Value of the continuation token found in the ‘next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 934

def get_group_members_ids_with_http_info( 
  group_id:, 
  start: nil
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/members/ids", {
    "groupId": group_id
  })
  query_params = {
    "start": start
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MembersIdsResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_group_summary(group_id:) ⇒ Line::Bot::V2::MessagingApi::GroupSummaryResponse, ...

Get group chat summary This requests to GET https://api.line.me/v2/bot/group/{groupId}/summary When you want to get HTTP status code or response headers, use #get_group_summary_with_http_info instead of this.

Parameters:

  • group_id (String)

    Group ID

Returns:

See Also:



1024
1025
1026
1027
1028
1029
1030
1031
1032
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1024

def get_group_summary(
  group_id:
)
  response_body, _status_code, _headers = get_group_summary_with_http_info(
    group_id: group_id
  )

  response_body
end

#get_group_summary_with_http_info(group_id:) ⇒ Array(Line::Bot::V2::MessagingApi::GroupSummaryResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get group chat summary This requests to GET https://api.line.me/v2/bot/group/{groupId}/summary This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String)

    Group ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::GroupSummaryResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 992

def get_group_summary_with_http_info( 
  group_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/summary", {
    "groupId": group_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GroupSummaryResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_joined_membership_users(membership_id:, start: nil, limit: nil) ⇒ Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse, ...

Get a list of user IDs who joined the membership. This requests to GET https://api.line.me/v2/bot/membership/{membershipId}/users/ids When you want to get HTTP status code or response headers, use #get_joined_membership_users_with_http_info instead of this.

Parameters:

  • membership_id (Integer)

    Membership plan ID.

  • start (String, nil) (defaults to: nil)

    A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren’t returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds).

  • limit (Integer, nil) (defaults to: nil)

    The max number of items to return for this API call. The value is set to 300 by default, but the max acceptable value is 1000.

Returns:

See Also:



1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1103

def get_joined_membership_users(
  membership_id:,
  start: nil,
  limit: nil
)
  response_body, _status_code, _headers = get_joined_membership_users_with_http_info(
    membership_id: membership_id,
    start: start,
    limit: limit
  )

  response_body
end

#get_joined_membership_users_with_http_info(membership_id:, start: nil, limit: nil) ⇒ Array(Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse, Integer, Hash{String => String}), ...

Get a list of user IDs who joined the membership. This requests to GET https://api.line.me/v2/bot/membership/{membershipId}/users/ids This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • membership_id (Integer)

    Membership plan ID.

  • start (String, nil) (defaults to: nil)

    A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren’t returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds).

  • limit (Integer, nil) (defaults to: nil)

    The max number of items to return for this API call. The value is set to 300 by default, but the max acceptable value is 1000.

Returns:

See Also:



1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1046

def get_joined_membership_users_with_http_info( 
  membership_id:, 
  start: nil, 
  limit: nil
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/membership/{membershipId}/users/ids", {
    "membershipId": membership_id
  })
  query_params = {
    "start": start,
    "limit": limit
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetJoinedMembershipUsersResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_membership_listLine::Bot::V2::MessagingApi::MembershipListResponse, ...

Get a list of memberships. This requests to GET https://api.line.me/v2/bot/membership/list When you want to get HTTP status code or response headers, use #get_membership_list_with_http_info instead of this.

Returns:

See Also:



1161
1162
1163
1164
1165
1166
1167
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1161

def get_membership_list(
)
  response_body, _status_code, _headers = get_membership_list_with_http_info(
  )

  response_body
end

#get_membership_list_with_http_infoArray(Line::Bot::V2::MessagingApi::MembershipListResponse, Integer, Hash{String => String}), ...

Get a list of memberships. This requests to GET https://api.line.me/v2/bot/membership/list This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

See Also:



1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1125

def get_membership_list_with_http_info(
)
  path = "/v2/bot/membership/list"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MembershipListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_membership_subscription(user_id:) ⇒ Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse, ...

Get a user’s membership subscription. This requests to GET https://api.line.me/v2/bot/membership/subscription/{userId} When you want to get HTTP status code or response headers, use #get_membership_subscription_with_http_info instead of this.

Parameters:

  • user_id (String)

    User ID

Returns:

See Also:



1227
1228
1229
1230
1231
1232
1233
1234
1235
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1227

def get_membership_subscription(
  user_id:
)
  response_body, _status_code, _headers = get_membership_subscription_with_http_info(
    user_id: user_id
  )

  response_body
end

#get_membership_subscription_with_http_info(user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse, Integer, Hash{String => String}), ...

Get a user’s membership subscription. This requests to GET https://api.line.me/v2/bot/membership/subscription/{userId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String)

    User ID

Returns:

See Also:



1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1179

def get_membership_subscription_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/membership/subscription/{userId}", {
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetMembershipSubscriptionResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_message_quotaLine::Bot::V2::MessagingApi::MessageQuotaResponse, ...

Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned. This requests to GET https://api.line.me/v2/bot/message/quota When you want to get HTTP status code or response headers, use #get_message_quota_with_http_info instead of this.

Returns:

See Also:



1272
1273
1274
1275
1276
1277
1278
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1272

def get_message_quota(
)
  response_body, _status_code, _headers = get_message_quota_with_http_info(
  )

  response_body
end

#get_message_quota_consumptionLine::Bot::V2::MessagingApi::QuotaConsumptionResponse, ...

Gets the number of messages sent in the current month. This requests to GET https://api.line.me/v2/bot/message/quota/consumption When you want to get HTTP status code or response headers, use #get_message_quota_consumption_with_http_info instead of this.

Returns:

See Also:



1315
1316
1317
1318
1319
1320
1321
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1315

def get_message_quota_consumption(
)
  response_body, _status_code, _headers = get_message_quota_consumption_with_http_info(
  )

  response_body
end

#get_message_quota_consumption_with_http_infoArray(Line::Bot::V2::MessagingApi::QuotaConsumptionResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets the number of messages sent in the current month. This requests to GET https://api.line.me/v2/bot/message/quota/consumption This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::QuotaConsumptionResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1287

def get_message_quota_consumption_with_http_info(
)
  path = "/v2/bot/message/quota/consumption"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::QuotaConsumptionResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_message_quota_with_http_infoArray(Line::Bot::V2::MessagingApi::MessageQuotaResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned. This requests to GET https://api.line.me/v2/bot/message/quota This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::MessageQuotaResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1244

def get_message_quota_with_http_info(
)
  path = "/v2/bot/message/quota"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MessageQuotaResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_narrowcast_progress(request_id:) ⇒ Line::Bot::V2::MessagingApi::NarrowcastProgressResponse, ...

Gets the status of a narrowcast message. This requests to GET https://api.line.me/v2/bot/message/progress/narrowcast When you want to get HTTP status code or response headers, use #get_narrowcast_progress_with_http_info instead of this.

Parameters:

  • request_id (String)

    The narrowcast message’s request ID. Each Messaging API request has a request ID.

Returns:

See Also:



1365
1366
1367
1368
1369
1370
1371
1372
1373
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1365

def get_narrowcast_progress(
  request_id:
)
  response_body, _status_code, _headers = get_narrowcast_progress_with_http_info(
    request_id: request_id
  )

  response_body
end

#get_narrowcast_progress_with_http_info(request_id:) ⇒ Array(Line::Bot::V2::MessagingApi::NarrowcastProgressResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets the status of a narrowcast message. This requests to GET https://api.line.me/v2/bot/message/progress/narrowcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • request_id (String)

    The narrowcast message’s request ID. Each Messaging API request has a request ID.

Returns:

See Also:



1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1331

def get_narrowcast_progress_with_http_info( 
  request_id:
)
  path = "/v2/bot/message/progress/narrowcast"
  query_params = {
    "requestId": request_id
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NarrowcastProgressResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_number_of_sent_broadcast_messages(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent broadcast messages This requests to GET https://api.line.me/v2/bot/message/delivery/broadcast When you want to get HTTP status code or response headers, use #get_number_of_sent_broadcast_messages_with_http_info instead of this.

Parameters:

  • date (String)

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

See Also:



1417
1418
1419
1420
1421
1422
1423
1424
1425
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1417

def get_number_of_sent_broadcast_messages(
  date:
)
  response_body, _status_code, _headers = get_number_of_sent_broadcast_messages_with_http_info(
    date: date
  )

  response_body
end

#get_number_of_sent_broadcast_messages_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent broadcast messages This requests to GET https://api.line.me/v2/bot/message/delivery/broadcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String)

    Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1383

def get_number_of_sent_broadcast_messages_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/broadcast"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_number_of_sent_multicast_messages(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent multicast messages This requests to GET https://api.line.me/v2/bot/message/delivery/multicast When you want to get HTTP status code or response headers, use #get_number_of_sent_multicast_messages_with_http_info instead of this.

Parameters:

  • date (String)

    Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9

Returns:

See Also:



1469
1470
1471
1472
1473
1474
1475
1476
1477
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1469

def get_number_of_sent_multicast_messages(
  date:
)
  response_body, _status_code, _headers = get_number_of_sent_multicast_messages_with_http_info(
    date: date
  )

  response_body
end

#get_number_of_sent_multicast_messages_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent multicast messages This requests to GET https://api.line.me/v2/bot/message/delivery/multicast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String)

    Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1435

def get_number_of_sent_multicast_messages_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/multicast"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_number_of_sent_push_messages(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent push messages This requests to GET https://api.line.me/v2/bot/message/delivery/push When you want to get HTTP status code or response headers, use #get_number_of_sent_push_messages_with_http_info instead of this.

Parameters:

  • date (String)

    Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9

Returns:

See Also:



1521
1522
1523
1524
1525
1526
1527
1528
1529
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1521

def get_number_of_sent_push_messages(
  date:
)
  response_body, _status_code, _headers = get_number_of_sent_push_messages_with_http_info(
    date: date
  )

  response_body
end

#get_number_of_sent_push_messages_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent push messages This requests to GET https://api.line.me/v2/bot/message/delivery/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String)

    Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1487

def get_number_of_sent_push_messages_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/push"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_number_of_sent_reply_messages(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent reply messages This requests to GET https://api.line.me/v2/bot/message/delivery/reply When you want to get HTTP status code or response headers, use #get_number_of_sent_reply_messages_with_http_info instead of this.

Parameters:

  • date (String)

    Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9

Returns:

See Also:



1573
1574
1575
1576
1577
1578
1579
1580
1581
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1573

def get_number_of_sent_reply_messages(
  date:
)
  response_body, _status_code, _headers = get_number_of_sent_reply_messages_with_http_info(
    date: date
  )

  response_body
end

#get_number_of_sent_reply_messages_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent reply messages This requests to GET https://api.line.me/v2/bot/message/delivery/reply This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String)

    Date the messages were sent Format: ‘yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1539

def get_number_of_sent_reply_messages_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/reply"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_pnp_message_statistics(date:) ⇒ Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, ...

Get number of sent LINE notification messages This requests to GET https://api.line.me/v2/bot/message/delivery/pnp When you want to get HTTP status code or response headers, use #get_pnp_message_statistics_with_http_info instead of this.

Parameters:

  • date (String)

    Date the message was sent Format: ‘yyyyMMdd` (Example:`20211231`) Time zone: UTC+9

Returns:

See Also:



1625
1626
1627
1628
1629
1630
1631
1632
1633
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1625

def get_pnp_message_statistics(
  date:
)
  response_body, _status_code, _headers = get_pnp_message_statistics_with_http_info(
    date: date
  )

  response_body
end

#get_pnp_message_statistics_with_http_info(date:) ⇒ Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of sent LINE notification messages This requests to GET https://api.line.me/v2/bot/message/delivery/pnp This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • date (String)

    Date the message was sent Format: ‘yyyyMMdd` (Example:`20211231`) Time zone: UTC+9

Returns:

  • (Array(Line::Bot::V2::MessagingApi::NumberOfMessagesResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1591

def get_pnp_message_statistics_with_http_info( 
  date:
)
  path = "/v2/bot/message/delivery/pnp"
  query_params = {
    "date": date
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::NumberOfMessagesResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_profile(user_id:) ⇒ Line::Bot::V2::MessagingApi::UserProfileResponse, ...

Get profile This requests to GET https://api.line.me/v2/bot/profile/{userId} When you want to get HTTP status code or response headers, use #get_profile_with_http_info instead of this.

Parameters:

  • user_id (String)

    User ID

Returns:

See Also:



1675
1676
1677
1678
1679
1680
1681
1682
1683
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1675

def get_profile(
  user_id:
)
  response_body, _status_code, _headers = get_profile_with_http_info(
    user_id: user_id
  )

  response_body
end

#get_profile_with_http_info(user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::UserProfileResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get profile This requests to GET https://api.line.me/v2/bot/profile/{userId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String)

    User ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::UserProfileResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1643

def get_profile_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/profile/{userId}", {
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::UserProfileResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu(rich_menu_id:) ⇒ Line::Bot::V2::MessagingApi::RichMenuResponse, ...

Gets a rich menu via a rich menu ID. This requests to GET https://api.line.me/v2/bot/richmenu/{richMenuId} When you want to get HTTP status code or response headers, use #get_rich_menu_with_http_info instead of this.

Parameters:

  • rich_menu_id (String)

    ID of a rich menu

Returns:

See Also:



1725
1726
1727
1728
1729
1730
1731
1732
1733
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1725

def get_rich_menu(
  rich_menu_id:
)
  response_body, _status_code, _headers = get_rich_menu_with_http_info(
    rich_menu_id: rich_menu_id
  )

  response_body
end

#get_rich_menu_alias(rich_menu_alias_id:) ⇒ Line::Bot::V2::MessagingApi::RichMenuAliasResponse, ...

Get rich menu alias information This requests to GET https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId} When you want to get HTTP status code or response headers, use #get_rich_menu_alias_with_http_info instead of this.

Parameters:

  • rich_menu_alias_id (String)

    The rich menu alias ID whose information you want to obtain.

Returns:

See Also:



1775
1776
1777
1778
1779
1780
1781
1782
1783
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1775

def get_rich_menu_alias(
  rich_menu_alias_id:
)
  response_body, _status_code, _headers = get_rich_menu_alias_with_http_info(
    rich_menu_alias_id: rich_menu_alias_id
  )

  response_body
end

#get_rich_menu_alias_listLine::Bot::V2::MessagingApi::RichMenuAliasListResponse, ...

Get list of rich menu alias This requests to GET https://api.line.me/v2/bot/richmenu/alias/list When you want to get HTTP status code or response headers, use #get_rich_menu_alias_list_with_http_info instead of this.

Returns:

See Also:



1820
1821
1822
1823
1824
1825
1826
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1820

def get_rich_menu_alias_list(
)
  response_body, _status_code, _headers = get_rich_menu_alias_list_with_http_info(
  )

  response_body
end

#get_rich_menu_alias_list_with_http_infoArray(Line::Bot::V2::MessagingApi::RichMenuAliasListResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get list of rich menu alias This requests to GET https://api.line.me/v2/bot/richmenu/alias/list This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

See Also:



1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1792

def get_rich_menu_alias_list_with_http_info(
)
  path = "/v2/bot/richmenu/alias/list"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuAliasListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_alias_with_http_info(rich_menu_alias_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuAliasResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get rich menu alias information This requests to GET https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_alias_id (String)

    The rich menu alias ID whose information you want to obtain.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuAliasResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1743

def get_rich_menu_alias_with_http_info( 
  rich_menu_alias_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/alias/{richMenuAliasId}", {
    "richMenuAliasId": rich_menu_alias_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuAliasResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_batch_progress(request_id:) ⇒ Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse, ...

Get the status of Replace or unlink a linked rich menus in batches. This requests to GET https://api.line.me/v2/bot/richmenu/progress/batch When you want to get HTTP status code or response headers, use #get_rich_menu_batch_progress_with_http_info instead of this.

Parameters:

  • request_id (String)

    A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID.

Returns:

See Also:



1870
1871
1872
1873
1874
1875
1876
1877
1878
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1870

def get_rich_menu_batch_progress(
  request_id:
)
  response_body, _status_code, _headers = get_rich_menu_batch_progress_with_http_info(
    request_id: request_id
  )

  response_body
end

#get_rich_menu_batch_progress_with_http_info(request_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get the status of Replace or unlink a linked rich menus in batches. This requests to GET https://api.line.me/v2/bot/richmenu/progress/batch This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • request_id (String)

    A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID.

Returns:

See Also:



1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1836

def get_rich_menu_batch_progress_with_http_info( 
  request_id:
)
  path = "/v2/bot/richmenu/progress/batch"
  query_params = {
    "requestId": request_id
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuBatchProgressResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_id_of_user(user_id:) ⇒ Line::Bot::V2::MessagingApi::RichMenuIdResponse, ...

Get rich menu ID of user This requests to GET https://api.line.me/v2/bot/user/{userId}/richmenu When you want to get HTTP status code or response headers, use #get_rich_menu_id_of_user_with_http_info instead of this.

Parameters:

  • user_id (String)

    User ID. Found in the ‘source` object of webhook event objects. Do not use the LINE ID used in LINE.

Returns:

See Also:



1920
1921
1922
1923
1924
1925
1926
1927
1928
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1920

def get_rich_menu_id_of_user(
  user_id:
)
  response_body, _status_code, _headers = get_rich_menu_id_of_user_with_http_info(
    user_id: user_id
  )

  response_body
end

#get_rich_menu_id_of_user_with_http_info(user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get rich menu ID of user This requests to GET https://api.line.me/v2/bot/user/{userId}/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String)

    User ID. Found in the ‘source` object of webhook event objects. Do not use the LINE ID used in LINE.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuIdResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1888

def get_rich_menu_id_of_user_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/{userId}/richmenu", {
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuIdResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_listLine::Bot::V2::MessagingApi::RichMenuListResponse, ...

Get rich menu list This requests to GET https://api.line.me/v2/bot/richmenu/list When you want to get HTTP status code or response headers, use #get_rich_menu_list_with_http_info instead of this.

Returns:

See Also:



1965
1966
1967
1968
1969
1970
1971
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1965

def get_rich_menu_list(
)
  response_body, _status_code, _headers = get_rich_menu_list_with_http_info(
  )

  response_body
end

#get_rich_menu_list_with_http_infoArray(Line::Bot::V2::MessagingApi::RichMenuListResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get rich menu list This requests to GET https://api.line.me/v2/bot/richmenu/list This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuListResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1937

def get_rich_menu_list_with_http_info(
)
  path = "/v2/bot/richmenu/list"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_rich_menu_with_http_info(rich_menu_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RichMenuResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Gets a rich menu via a rich menu ID. This requests to GET https://api.line.me/v2/bot/richmenu/{richMenuId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_id (String)

    ID of a rich menu

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RichMenuResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1693

def get_rich_menu_with_http_info( 
  rich_menu_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/{richMenuId}", {
    "richMenuId": rich_menu_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RichMenuResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_room_member_count(room_id:) ⇒ Line::Bot::V2::MessagingApi::RoomMemberCountResponse, ...

Get number of users in a multi-person chat This requests to GET https://api.line.me/v2/bot/room/{roomId}/members/count When you want to get HTTP status code or response headers, use #get_room_member_count_with_http_info instead of this.

Parameters:

  • room_id (String)

    Room ID

Returns:

See Also:



2013
2014
2015
2016
2017
2018
2019
2020
2021
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2013

def get_room_member_count(
  room_id:
)
  response_body, _status_code, _headers = get_room_member_count_with_http_info(
    room_id: room_id
  )

  response_body
end

#get_room_member_count_with_http_info(room_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RoomMemberCountResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get number of users in a multi-person chat This requests to GET https://api.line.me/v2/bot/room/{roomId}/members/count This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • room_id (String)

    Room ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RoomMemberCountResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 1981

def get_room_member_count_with_http_info( 
  room_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/room/{roomId}/members/count", {
    "roomId": room_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RoomMemberCountResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_room_member_profile(room_id:, user_id:) ⇒ Line::Bot::V2::MessagingApi::RoomUserProfileResponse, ...

Get multi-person chat member profile This requests to GET https://api.line.me/v2/bot/room/{roomId}/member/{userId} When you want to get HTTP status code or response headers, use #get_room_member_profile_with_http_info instead of this.

Parameters:

  • room_id (String)

    Room ID

  • user_id (String)

    User ID

Returns:

See Also:



2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2067

def get_room_member_profile(
  room_id:,
  user_id:
)
  response_body, _status_code, _headers = get_room_member_profile_with_http_info(
    room_id: room_id,
    user_id: user_id
  )

  response_body
end

#get_room_member_profile_with_http_info(room_id:, user_id:) ⇒ Array(Line::Bot::V2::MessagingApi::RoomUserProfileResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get multi-person chat member profile This requests to GET https://api.line.me/v2/bot/room/{roomId}/member/{userId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • room_id (String)

    Room ID

  • user_id (String)

    User ID

Returns:

  • (Array(Line::Bot::V2::MessagingApi::RoomUserProfileResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2032

def get_room_member_profile_with_http_info( 
  room_id:, 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/room/{roomId}/member/{userId}", {
    "roomId": room_id,
    "userId": user_id
  })

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::RoomUserProfileResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_room_members_ids(room_id:, start: nil) ⇒ Line::Bot::V2::MessagingApi::MembersIdsResponse, ...

Get multi-person chat member user IDs This requests to GET https://api.line.me/v2/bot/room/{roomId}/members/ids When you want to get HTTP status code or response headers, use #get_room_members_ids_with_http_info instead of this.

Parameters:

  • room_id (String)

    Room ID

  • start (String, nil) (defaults to: nil)

    Value of the continuation token found in the ‘next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.

Returns:

See Also:



2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2126

def get_room_members_ids(
  room_id:,
  start: nil
)
  response_body, _status_code, _headers = get_room_members_ids_with_http_info(
    room_id: room_id,
    start: start
  )

  response_body
end

#get_room_members_ids_with_http_info(room_id:, start: nil) ⇒ Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get multi-person chat member user IDs This requests to GET https://api.line.me/v2/bot/room/{roomId}/members/ids This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • room_id (String)

    Room ID

  • start (String, nil) (defaults to: nil)

    Value of the continuation token found in the ‘next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::MembersIdsResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2088

def get_room_members_ids_with_http_info( 
  room_id:, 
  start: nil
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/room/{roomId}/members/ids", {
    "roomId": room_id
  })
  query_params = {
    "start": start
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MembersIdsResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#get_webhook_endpointLine::Bot::V2::MessagingApi::GetWebhookEndpointResponse, ...

Get webhook endpoint information This requests to GET https://api.line.me/v2/bot/channel/webhook/endpoint When you want to get HTTP status code or response headers, use #get_webhook_endpoint_with_http_info instead of this.

Returns:

See Also:



2173
2174
2175
2176
2177
2178
2179
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2173

def get_webhook_endpoint(
)
  response_body, _status_code, _headers = get_webhook_endpoint_with_http_info(
  )

  response_body
end

#get_webhook_endpoint_with_http_infoArray(Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Get webhook endpoint information This requests to GET https://api.line.me/v2/bot/channel/webhook/endpoint This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Returns:

See Also:



2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2145

def get_webhook_endpoint_with_http_info(
)
  path = "/v2/bot/channel/webhook/endpoint"

  response = @http_client.get(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::GetWebhookEndpointResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Issue link token This requests to POST https://api.line.me/v2/bot/user/{userId}/linkToken When you want to get HTTP status code or response headers, use #issue_link_token_with_http_info instead of this.

Parameters:

  • user_id (String)

    User ID for the LINE account to be linked. Found in the ‘source` object of account link event objects. Do not use the LINE ID used in LINE.

Returns:

See Also:



2221
2222
2223
2224
2225
2226
2227
2228
2229
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2221

def issue_link_token(
  user_id:
)
  response_body, _status_code, _headers = issue_link_token_with_http_info(
    user_id: user_id
  )

  response_body
end

Issue link token This requests to POST https://api.line.me/v2/bot/user/{userId}/linkToken This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String)

    User ID for the LINE account to be linked. Found in the ‘source` object of account link event objects. Do not use the LINE ID used in LINE.

Returns:

  • (Array(Line::Bot::V2::MessagingApi::IssueLinkTokenResponse, Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2189

def issue_link_token_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/{userId}/linkToken", {
    "userId": user_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::IssueLinkTokenResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#leave_group(group_id:) ⇒ String, ...

Leave group chat This requests to POST https://api.line.me/v2/bot/group/{groupId}/leave When you want to get HTTP status code or response headers, use #leave_group_with_http_info instead of this.

Parameters:

  • group_id (String)

    Group ID

Returns:

See Also:



2284
2285
2286
2287
2288
2289
2290
2291
2292
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2284

def leave_group(
  group_id:
)
  response_body, _status_code, _headers = leave_group_with_http_info(
    group_id: group_id
  )

  response_body
end

#leave_group_with_http_info(group_id:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Leave group chat This requests to POST https://api.line.me/v2/bot/group/{groupId}/leave This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • group_id (String)

    Group ID

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String}))

    when HTTP status code is 400

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String}))

    when HTTP status code is 404

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2241

def leave_group_with_http_info( 
  group_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/group/{groupId}/leave", {
    "groupId": group_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 404
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 404, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#leave_room(room_id:) ⇒ String?

Leave multi-person chat This requests to POST https://api.line.me/v2/bot/room/{roomId}/leave When you want to get HTTP status code or response headers, use #leave_room_with_http_info instead of this.

Parameters:

  • room_id (String)

    Room ID

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2329
2330
2331
2332
2333
2334
2335
2336
2337
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2329

def leave_room(
  room_id:
)
  response_body, _status_code, _headers = leave_room_with_http_info(
    room_id: room_id
  )

  response_body
end

#leave_room_with_http_info(room_id:) ⇒ Array((String|nil), Integer, Hash{String => String})

Leave multi-person chat This requests to POST https://api.line.me/v2/bot/room/{roomId}/leave This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • room_id (String)

    Room ID

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2302

def leave_room_with_http_info( 
  room_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/room/{roomId}/leave", {
    "roomId": room_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Link rich menu to user. This requests to POST https://api.line.me/v2/bot/user/{userId}/richmenu/{richMenuId} When you want to get HTTP status code or response headers, use #link_rich_menu_id_to_user_with_http_info instead of this.

Parameters:

  • user_id (String)

    User ID. Found in the ‘source` object of webhook event objects. Do not use the LINE ID used in LINE.

  • rich_menu_id (String)

    ID of a rich menu

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2378

def link_rich_menu_id_to_user(
  user_id:,
  rich_menu_id:
)
  response_body, _status_code, _headers = link_rich_menu_id_to_user_with_http_info(
    user_id: user_id,
    rich_menu_id: rich_menu_id
  )

  response_body
end

Link rich menu to user. This requests to POST https://api.line.me/v2/bot/user/{userId}/richmenu/{richMenuId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String)

    User ID. Found in the ‘source` object of webhook event objects. Do not use the LINE ID used in LINE.

  • rich_menu_id (String)

    ID of a rich menu

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2348

def link_rich_menu_id_to_user_with_http_info( 
  user_id:, 
  rich_menu_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/{userId}/richmenu/{richMenuId}", {
    "userId": user_id,
    "richMenuId": rich_menu_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Link rich menu to multiple users This requests to POST https://api.line.me/v2/bot/richmenu/bulk/link When you want to get HTTP status code or response headers, use #link_rich_menu_id_to_users_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 202

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2424
2425
2426
2427
2428
2429
2430
2431
2432
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2424

def link_rich_menu_id_to_users(
  rich_menu_bulk_link_request:
)
  response_body, _status_code, _headers = link_rich_menu_id_to_users_with_http_info(
    rich_menu_bulk_link_request: rich_menu_bulk_link_request
  )

  response_body
end

Link rich menu to multiple users This requests to POST https://api.line.me/v2/bot/richmenu/bulk/link This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 202

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2398

def link_rich_menu_id_to_users_with_http_info( 
  rich_menu_bulk_link_request:
)
  path = "/v2/bot/richmenu/bulk/link"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_bulk_link_request,
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#list_coupon(status: nil, start: nil, limit: nil) ⇒ Line::Bot::V2::MessagingApi::MessagingApiPagerCouponListResponse, ...

Get a paginated list of coupons. This requests to GET https://api.line.me/v2/bot/coupon When you want to get HTTP status code or response headers, use #list_coupon_with_http_info instead of this.

Parameters:

  • status (Array[String], nil) (defaults to: nil)

    Filter coupons by their status.

  • start (String, nil) (defaults to: nil)

    Pagination token to retrieve the next page of results.

  • limit (Integer, nil) (defaults to: nil)

    Maximum number of coupons to return per request.

Returns:

See Also:



2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2493

def list_coupon(
  status: nil,
  start: nil,
  limit: nil
)
  response_body, _status_code, _headers = list_coupon_with_http_info(
    status: status,
    start: start,
    limit: limit
  )

  response_body
end

#list_coupon_with_http_info(status: nil, start: nil, limit: nil) ⇒ Array(Line::Bot::V2::MessagingApi::MessagingApiPagerCouponListResponse, Integer, Hash{String => String}), ...

Get a paginated list of coupons. This requests to GET https://api.line.me/v2/bot/coupon This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • status (Array[String], nil) (defaults to: nil)

    Filter coupons by their status.

  • start (String, nil) (defaults to: nil)

    Pagination token to retrieve the next page of results.

  • limit (Integer, nil) (defaults to: nil)

    Maximum number of coupons to return per request.

Returns:

See Also:



2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2445

def list_coupon_with_http_info( 
  status: nil, 
  start: nil, 
  limit: nil
)
  path = "/v2/bot/coupon"
  query_params = {
    "status": status&.join(','),
    "start": start,
    "limit": limit
  }.compact

  response = @http_client.get(
    path: path,
    query_params: query_params,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::MessagingApiPagerCouponListResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#mark_messages_as_read(mark_messages_as_read_request:) ⇒ String?

Mark messages from users as read This requests to POST https://api.line.me/v2/bot/message/markAsRead When you want to get HTTP status code or response headers, use #mark_messages_as_read_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2541
2542
2543
2544
2545
2546
2547
2548
2549
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2541

def mark_messages_as_read(
  mark_messages_as_read_request:
)
  response_body, _status_code, _headers = mark_messages_as_read_with_http_info(
    mark_messages_as_read_request: mark_messages_as_read_request
  )

  response_body
end

#mark_messages_as_read_by_token(mark_messages_as_read_by_token_request:) ⇒ String, ...

Mark messages from users as read by token This requests to POST https://api.line.me/v2/bot/chat/markAsRead When you want to get HTTP status code or response headers, use #mark_messages_as_read_by_token_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse)

    when HTTP status code is 400

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2594
2595
2596
2597
2598
2599
2600
2601
2602
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2594

def mark_messages_as_read_by_token(
  mark_messages_as_read_by_token_request:
)
  response_body, _status_code, _headers = mark_messages_as_read_by_token_with_http_info(
    mark_messages_as_read_by_token_request: mark_messages_as_read_by_token_request
  )

  response_body
end

#mark_messages_as_read_by_token_with_http_info(mark_messages_as_read_by_token_request:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Mark messages from users as read by token This requests to POST https://api.line.me/v2/bot/chat/markAsRead This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String}))

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2560

def mark_messages_as_read_by_token_with_http_info( 
  mark_messages_as_read_by_token_request:
)
  path = "/v2/bot/chat/markAsRead"

  response = @http_client.post(
    path: path,
    body_params: mark_messages_as_read_by_token_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#mark_messages_as_read_with_http_info(mark_messages_as_read_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Mark messages from users as read This requests to POST https://api.line.me/v2/bot/message/markAsRead This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2515

def mark_messages_as_read_with_http_info( 
  mark_messages_as_read_request:
)
  path = "/v2/bot/message/markAsRead"

  response = @http_client.post(
    path: path,
    body_params: mark_messages_as_read_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#multicast(multicast_request:, x_line_retry_key: nil) ⇒ String, ...

An API that efficiently sends the same message to multiple user IDs. You can’t send messages to group chats or multi-person chats. This requests to POST https://api.line.me/v2/bot/message/multicast When you want to get HTTP status code or response headers, use #multicast_with_http_info instead of this.

Parameters:

  • multicast_request (MulticastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil)

    Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2681

def multicast(
  multicast_request:,
  x_line_retry_key: nil
)
  response_body, _status_code, _headers = multicast_with_http_info(
    multicast_request: multicast_request,
    x_line_retry_key: x_line_retry_key
  )

  response_body
end

#multicast_with_http_info(multicast_request:, x_line_retry_key: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

An API that efficiently sends the same message to multiple user IDs. You can’t send messages to group chats or multi-person chats. This requests to POST https://api.line.me/v2/bot/message/multicast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • multicast_request (MulticastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil)

    Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2617

def multicast_with_http_info( 
  multicast_request:, 
  x_line_retry_key: nil
)
  path = "/v2/bot/message/multicast"
  header_params = {
    "X-Line-Retry-Key": x_line_retry_key
  }.compact

  response = @http_client.post(
    path: path,
    body_params: multicast_request,
    headers: header_params
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 403
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 403, response.each_header.to_h]
  when 409
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 409, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#narrowcast(narrowcast_request:, x_line_retry_key: nil) ⇒ String, ...

Send narrowcast message This requests to POST https://api.line.me/v2/bot/message/narrowcast When you want to get HTTP status code or response headers, use #narrowcast_with_http_info instead of this.

Parameters:

  • narrowcast_request (NarrowcastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil)

    Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2770

def narrowcast(
  narrowcast_request:,
  x_line_retry_key: nil
)
  response_body, _status_code, _headers = narrowcast_with_http_info(
    narrowcast_request: narrowcast_request,
    x_line_retry_key: x_line_retry_key
  )

  response_body
end

#narrowcast_with_http_info(narrowcast_request:, x_line_retry_key: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Send narrowcast message This requests to POST https://api.line.me/v2/bot/message/narrowcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • narrowcast_request (NarrowcastRequest)
  • x_line_retry_key (String, nil) (defaults to: nil)

    Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2706

def narrowcast_with_http_info( 
  narrowcast_request:, 
  x_line_retry_key: nil
)
  path = "/v2/bot/message/narrowcast"
  header_params = {
    "X-Line-Retry-Key": x_line_retry_key
  }.compact

  response = @http_client.post(
    path: path,
    body_params: narrowcast_request,
    headers: header_params
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 403
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 403, response.each_header.to_h]
  when 409
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 409, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#push_message(push_message_request:, x_line_retry_key: nil) ⇒ Line::Bot::V2::MessagingApi::PushMessageResponse, ...

Sends a message to a user, group chat, or multi-person chat at any time. This requests to POST https://api.line.me/v2/bot/message/push When you want to get HTTP status code or response headers, use #push_message_with_http_info instead of this.

Parameters:

  • push_message_request (PushMessageRequest)
  • x_line_retry_key (String, nil) (defaults to: nil)

    Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2864

def push_message(
  push_message_request:,
  x_line_retry_key: nil
)
  response_body, _status_code, _headers = push_message_with_http_info(
    push_message_request: push_message_request,
    x_line_retry_key: x_line_retry_key
  )

  response_body
end

#push_message_with_http_info(push_message_request:, x_line_retry_key: nil) ⇒ Array(Line::Bot::V2::MessagingApi::PushMessageResponse, Integer, Hash{String => String}), ...

Sends a message to a user, group chat, or multi-person chat at any time. This requests to POST https://api.line.me/v2/bot/message/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • push_message_request (PushMessageRequest)
  • x_line_retry_key (String, nil) (defaults to: nil)

    Retry key. Specifies the UUID in hexadecimal format (e.g., ‘123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn’t generated by LINE. Each developer must generate their own retry key.

Returns:

See Also:



2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2795

def push_message_with_http_info( 
  push_message_request:, 
  x_line_retry_key: nil
)
  path = "/v2/bot/message/push"
  header_params = {
    "X-Line-Retry-Key": x_line_retry_key
  }.compact

  response = @http_client.post(
    path: path,
    body_params: push_message_request,
    headers: header_params
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::PushMessageResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 403
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 403, response.each_header.to_h]
  when 409
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 409, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#push_messages_by_phone(pnp_messages_request:, x_line_delivery_tag: nil) ⇒ String, ...

Send LINE notification message This requests to POST https://api.line.me/bot/pnp/push When you want to get HTTP status code or response headers, use #push_messages_by_phone_with_http_info instead of this.

Parameters:

  • pnp_messages_request (PnpMessagesRequest)
  • x_line_delivery_tag (String, nil) (defaults to: nil)

    String returned in the delivery.data property of the delivery completion event via Webhook.

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse)

    when HTTP status code is 422

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2926

def push_messages_by_phone(
  pnp_messages_request:,
  x_line_delivery_tag: nil
)
  response_body, _status_code, _headers = push_messages_by_phone_with_http_info(
    pnp_messages_request: pnp_messages_request,
    x_line_delivery_tag: x_line_delivery_tag
  )

  response_body
end

#push_messages_by_phone_with_http_info(pnp_messages_request:, x_line_delivery_tag: nil) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Send LINE notification message This requests to POST https://api.line.me/bot/pnp/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • pnp_messages_request (PnpMessagesRequest)
  • x_line_delivery_tag (String, nil) (defaults to: nil)

    String returned in the delivery.data property of the delivery completion event via Webhook.

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String}))

    when HTTP status code is 422

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2886

def push_messages_by_phone_with_http_info( 
  pnp_messages_request:, 
  x_line_delivery_tag: nil
)
  path = "/bot/pnp/push"
  header_params = {
    "X-Line-Delivery-Tag": x_line_delivery_tag
  }.compact

  response = @http_client.post(
    path: path,
    body_params: pnp_messages_request,
    headers: header_params
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 422
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 422, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#reply_message(reply_message_request:) ⇒ Line::Bot::V2::MessagingApi::ReplyMessageResponse, ...

Send reply message This requests to POST https://api.line.me/v2/bot/message/reply When you want to get HTTP status code or response headers, use #reply_message_with_http_info instead of this.

Parameters:

Returns:

See Also:



2995
2996
2997
2998
2999
3000
3001
3002
3003
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2995

def reply_message(
  reply_message_request:
)
  response_body, _status_code, _headers = reply_message_with_http_info(
    reply_message_request: reply_message_request
  )

  response_body
end

#reply_message_with_http_info(reply_message_request:) ⇒ Array(Line::Bot::V2::MessagingApi::ReplyMessageResponse, Integer, Hash{String => String}), ...

Send reply message This requests to POST https://api.line.me/v2/bot/message/reply This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

See Also:



2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 2948

def reply_message_with_http_info( 
  reply_message_request:
)
  path = "/v2/bot/message/reply"

  response = @http_client.post(
    path: path,
    body_params: reply_message_request,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ReplyMessageResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  when 429
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 429, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#rich_menu_batch(rich_menu_batch_request:) ⇒ String?

You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu This requests to POST https://api.line.me/v2/bot/richmenu/batch When you want to get HTTP status code or response headers, use #rich_menu_batch_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 202

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3039
3040
3041
3042
3043
3044
3045
3046
3047
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3039

def rich_menu_batch(
  rich_menu_batch_request:
)
  response_body, _status_code, _headers = rich_menu_batch_with_http_info(
    rich_menu_batch_request: rich_menu_batch_request
  )

  response_body
end

#rich_menu_batch_with_http_info(rich_menu_batch_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu This requests to POST https://api.line.me/v2/bot/richmenu/batch This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 202

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3013

def rich_menu_batch_with_http_info( 
  rich_menu_batch_request:
)
  path = "/v2/bot/richmenu/batch"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_batch_request,
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#set_default_rich_menu(rich_menu_id:) ⇒ String?

Set default rich menu This requests to POST https://api.line.me/v2/bot/user/all/richmenu/{richMenuId} When you want to get HTTP status code or response headers, use #set_default_rich_menu_with_http_info instead of this.

Parameters:

  • rich_menu_id (String)

    ID of a rich menu

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3084
3085
3086
3087
3088
3089
3090
3091
3092
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3084

def set_default_rich_menu(
  rich_menu_id:
)
  response_body, _status_code, _headers = set_default_rich_menu_with_http_info(
    rich_menu_id: rich_menu_id
  )

  response_body
end

#set_default_rich_menu_with_http_info(rich_menu_id:) ⇒ Array((String|nil), Integer, Hash{String => String})

Set default rich menu This requests to POST https://api.line.me/v2/bot/user/all/richmenu/{richMenuId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_id (String)

    ID of a rich menu

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3057

def set_default_rich_menu_with_http_info( 
  rich_menu_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/all/richmenu/{richMenuId}", {
    "richMenuId": rich_menu_id
  })

  response = @http_client.post(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#set_webhook_endpoint(set_webhook_endpoint_request:) ⇒ String?

Set webhook endpoint URL This requests to PUT https://api.line.me/v2/bot/channel/webhook/endpoint When you want to get HTTP status code or response headers, use #set_webhook_endpoint_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3128
3129
3130
3131
3132
3133
3134
3135
3136
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3128

def set_webhook_endpoint(
  set_webhook_endpoint_request:
)
  response_body, _status_code, _headers = set_webhook_endpoint_with_http_info(
    set_webhook_endpoint_request: set_webhook_endpoint_request
  )

  response_body
end

#set_webhook_endpoint_with_http_info(set_webhook_endpoint_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Set webhook endpoint URL This requests to PUT https://api.line.me/v2/bot/channel/webhook/endpoint This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3102

def set_webhook_endpoint_with_http_info( 
  set_webhook_endpoint_request:
)
  path = "/v2/bot/channel/webhook/endpoint"

  response = @http_client.put(
    path: path,
    body_params: set_webhook_endpoint_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#show_loading_animation(show_loading_animation_request:) ⇒ String, ...

Display a loading animation in one-on-one chats between users and LINE Official Accounts. This requests to POST https://api.line.me/v2/bot/chat/loading/start When you want to get HTTP status code or response headers, use #show_loading_animation_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 202

  • (Line::Bot::V2::MessagingApi::ErrorResponse)

    when HTTP status code is 400

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3181
3182
3183
3184
3185
3186
3187
3188
3189
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3181

def show_loading_animation(
  show_loading_animation_request:
)
  response_body, _status_code, _headers = show_loading_animation_with_http_info(
    show_loading_animation_request: show_loading_animation_request
  )

  response_body
end

#show_loading_animation_with_http_info(show_loading_animation_request:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Display a loading animation in one-on-one chats between users and LINE Official Accounts. This requests to POST https://api.line.me/v2/bot/chat/loading/start This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 202

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String}))

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3147

def show_loading_animation_with_http_info( 
  show_loading_animation_request:
)
  path = "/v2/bot/chat/loading/start"

  response = @http_client.post(
    path: path,
    body_params: show_loading_animation_request,
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#test_webhook_endpoint(test_webhook_endpoint_request: nil) ⇒ Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse, ...

Test webhook endpoint This requests to POST https://api.line.me/v2/bot/channel/webhook/test When you want to get HTTP status code or response headers, use #test_webhook_endpoint_with_http_info instead of this.

Parameters:

Returns:

See Also:



3230
3231
3232
3233
3234
3235
3236
3237
3238
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3230

def test_webhook_endpoint(
  test_webhook_endpoint_request: nil
)
  response_body, _status_code, _headers = test_webhook_endpoint_with_http_info(
    test_webhook_endpoint_request: test_webhook_endpoint_request
  )

  response_body
end

#test_webhook_endpoint_with_http_info(test_webhook_endpoint_request: nil) ⇒ Array(Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse, Integer, Hash{String => String}), Array((String|nil), Integer, Hash{String => String})

Test webhook endpoint This requests to POST https://api.line.me/v2/bot/channel/webhook/test This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

See Also:



3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3199

def test_webhook_endpoint_with_http_info( 
  test_webhook_endpoint_request: nil
)
  path = "/v2/bot/channel/webhook/test"

  response = @http_client.post(
    path: path,
    body_params: test_webhook_endpoint_request,
  )

  case response.code.to_i
  when 200
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::TestWebhookEndpointResponse.create(json)
    [response_body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Unlink rich menu from user This requests to DELETE https://api.line.me/v2/bot/user/{userId}/richmenu When you want to get HTTP status code or response headers, use #unlink_rich_menu_id_from_user_with_http_info instead of this.

Parameters:

  • user_id (String)

    User ID. Found in the ‘source` object of webhook event objects. Do not use the LINE ID used in LINE.

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3275
3276
3277
3278
3279
3280
3281
3282
3283
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3275

def unlink_rich_menu_id_from_user(
  user_id:
)
  response_body, _status_code, _headers = unlink_rich_menu_id_from_user_with_http_info(
    user_id: user_id
  )

  response_body
end

Unlink rich menu from user This requests to DELETE https://api.line.me/v2/bot/user/{userId}/richmenu This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • user_id (String)

    User ID. Found in the ‘source` object of webhook event objects. Do not use the LINE ID used in LINE.

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3248

def unlink_rich_menu_id_from_user_with_http_info( 
  user_id:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/user/{userId}/richmenu", {
    "userId": user_id
  })

  response = @http_client.delete(
    path: path,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

Unlink rich menus from multiple users This requests to POST https://api.line.me/v2/bot/richmenu/bulk/unlink When you want to get HTTP status code or response headers, use #unlink_rich_menu_id_from_users_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 202

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3319
3320
3321
3322
3323
3324
3325
3326
3327
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3319

def unlink_rich_menu_id_from_users(
  rich_menu_bulk_unlink_request:
)
  response_body, _status_code, _headers = unlink_rich_menu_id_from_users_with_http_info(
    rich_menu_bulk_unlink_request: rich_menu_bulk_unlink_request
  )

  response_body
end

Unlink rich menus from multiple users This requests to POST https://api.line.me/v2/bot/richmenu/bulk/unlink This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 202

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3293

def unlink_rich_menu_id_from_users_with_http_info( 
  rich_menu_bulk_unlink_request:
)
  path = "/v2/bot/richmenu/bulk/unlink"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_bulk_unlink_request,
  )

  case response.code.to_i
  when 202
    [response.body, 202, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#update_rich_menu_alias(rich_menu_alias_id:, update_rich_menu_alias_request:) ⇒ String, ...

Update rich menu alias This requests to POST https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId} When you want to get HTTP status code or response headers, use #update_rich_menu_alias_with_http_info instead of this.

Parameters:

  • rich_menu_alias_id (String)

    The rich menu alias ID you want to update.

  • update_rich_menu_alias_request (UpdateRichMenuAliasRequest)

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (Line::Bot::V2::MessagingApi::ErrorResponse)

    when HTTP status code is 400

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3377

def update_rich_menu_alias(
  rich_menu_alias_id:,
  update_rich_menu_alias_request:
)
  response_body, _status_code, _headers = update_rich_menu_alias_with_http_info(
    rich_menu_alias_id: rich_menu_alias_id,
    update_rich_menu_alias_request: update_rich_menu_alias_request
  )

  response_body
end

#update_rich_menu_alias_with_http_info(rich_menu_alias_id:, update_rich_menu_alias_request:) ⇒ Array((String|nil), Integer, Hash{String => String}), Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})

Update rich menu alias This requests to POST https://api.line.me/v2/bot/richmenu/alias/{richMenuAliasId} This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

  • rich_menu_alias_id (String)

    The rich menu alias ID you want to update.

  • update_rich_menu_alias_request (UpdateRichMenuAliasRequest)

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String}))

    when HTTP status code is 400

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3339

def update_rich_menu_alias_with_http_info( 
  rich_menu_alias_id:, 
  update_rich_menu_alias_request:
)
  path = Line::Bot::V2::Utils.build_path("/v2/bot/richmenu/alias/{richMenuAliasId}", {
    "richMenuAliasId": rich_menu_alias_id
  })

  response = @http_client.post(
    path: path,
    body_params: update_rich_menu_alias_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  when 400
    json = Line::Bot::V2::Utils.deep_underscore(JSON.parse(response.body))
    json.transform_keys! do |key|
      Line::Bot::V2::RESERVED_WORDS.include?(key) ? "_#{key}".to_sym : key
    end
    response_body = Line::Bot::V2::MessagingApi::ErrorResponse.create(json)
    [response_body, 400, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_broadcast(validate_message_request:) ⇒ String?

Validate message objects of a broadcast message This requests to POST https://api.line.me/v2/bot/message/validate/broadcast When you want to get HTTP status code or response headers, use #validate_broadcast_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3423
3424
3425
3426
3427
3428
3429
3430
3431
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3423

def validate_broadcast(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_broadcast_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_broadcast_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a broadcast message This requests to POST https://api.line.me/v2/bot/message/validate/broadcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3397

def validate_broadcast_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/broadcast"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_multicast(validate_message_request:) ⇒ String?

Validate message objects of a multicast message This requests to POST https://api.line.me/v2/bot/message/validate/multicast When you want to get HTTP status code or response headers, use #validate_multicast_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3467
3468
3469
3470
3471
3472
3473
3474
3475
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3467

def validate_multicast(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_multicast_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_multicast_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a multicast message This requests to POST https://api.line.me/v2/bot/message/validate/multicast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3441

def validate_multicast_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/multicast"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_narrowcast(validate_message_request:) ⇒ String?

Validate message objects of a narrowcast message This requests to POST https://api.line.me/v2/bot/message/validate/narrowcast When you want to get HTTP status code or response headers, use #validate_narrowcast_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3511
3512
3513
3514
3515
3516
3517
3518
3519
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3511

def validate_narrowcast(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_narrowcast_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_narrowcast_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a narrowcast message This requests to POST https://api.line.me/v2/bot/message/validate/narrowcast This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3485

def validate_narrowcast_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/narrowcast"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_push(validate_message_request:) ⇒ String?

Validate message objects of a push message This requests to POST https://api.line.me/v2/bot/message/validate/push When you want to get HTTP status code or response headers, use #validate_push_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3555
3556
3557
3558
3559
3560
3561
3562
3563
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3555

def validate_push(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_push_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_push_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a push message This requests to POST https://api.line.me/v2/bot/message/validate/push This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3529

def validate_push_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/push"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_reply(validate_message_request:) ⇒ String?

Validate message objects of a reply message This requests to POST https://api.line.me/v2/bot/message/validate/reply When you want to get HTTP status code or response headers, use #validate_reply_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3599
3600
3601
3602
3603
3604
3605
3606
3607
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3599

def validate_reply(
  validate_message_request:
)
  response_body, _status_code, _headers = validate_reply_with_http_info(
    validate_message_request: validate_message_request
  )

  response_body
end

#validate_reply_with_http_info(validate_message_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate message objects of a reply message This requests to POST https://api.line.me/v2/bot/message/validate/reply This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3573

def validate_reply_with_http_info( 
  validate_message_request:
)
  path = "/v2/bot/message/validate/reply"

  response = @http_client.post(
    path: path,
    body_params: validate_message_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_rich_menu_batch_request(rich_menu_batch_request:) ⇒ String?

Validate a request body of the Replace or unlink the linked rich menus in batches endpoint. This requests to POST https://api.line.me/v2/bot/richmenu/validate/batch When you want to get HTTP status code or response headers, use #validate_rich_menu_batch_request_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3643
3644
3645
3646
3647
3648
3649
3650
3651
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3643

def validate_rich_menu_batch_request(
  rich_menu_batch_request:
)
  response_body, _status_code, _headers = validate_rich_menu_batch_request_with_http_info(
    rich_menu_batch_request: rich_menu_batch_request
  )

  response_body
end

#validate_rich_menu_batch_request_with_http_info(rich_menu_batch_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate a request body of the Replace or unlink the linked rich menus in batches endpoint. This requests to POST https://api.line.me/v2/bot/richmenu/validate/batch This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3617

def validate_rich_menu_batch_request_with_http_info( 
  rich_menu_batch_request:
)
  path = "/v2/bot/richmenu/validate/batch"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_batch_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end

#validate_rich_menu_object(rich_menu_request:) ⇒ String?

Validate rich menu object This requests to POST https://api.line.me/v2/bot/richmenu/validate When you want to get HTTP status code or response headers, use #validate_rich_menu_object_with_http_info instead of this.

Parameters:

Returns:

  • (String, nil)

    when HTTP status code is 200

  • (String, nil)

    when other HTTP status code is returned. This String is HTTP response body itself.

See Also:



3687
3688
3689
3690
3691
3692
3693
3694
3695
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3687

def validate_rich_menu_object(
  rich_menu_request:
)
  response_body, _status_code, _headers = validate_rich_menu_object_with_http_info(
    rich_menu_request: rich_menu_request
  )

  response_body
end

#validate_rich_menu_object_with_http_info(rich_menu_request:) ⇒ Array((String|nil), Integer, Hash{String => String})

Validate rich menu object This requests to POST https://api.line.me/v2/bot/richmenu/validate This returns an array containing response, HTTP status code, and header in order. Please specify all header keys in lowercase.

Parameters:

Returns:

  • (Array((String|nil), Integer, Hash{String => String}))

    when HTTP status code is 200

  • (Array((String|nil), Integer, Hash{String => String}))

    when other HTTP status code is returned. String is HTTP response body itself.

See Also:



3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
# File 'lib/line/bot/v2/messaging_api/api/messaging_api_client.rb', line 3661

def validate_rich_menu_object_with_http_info( 
  rich_menu_request:
)
  path = "/v2/bot/richmenu/validate"

  response = @http_client.post(
    path: path,
    body_params: rich_menu_request,
  )

  case response.code.to_i
  when 200
    [response.body, 200, response.each_header.to_h]
  else
    [response.body, response.code.to_i, response.each_header.to_h]
  end
end