Line.Messaging.NETCore 1.2.1

dotnet add package Line.Messaging.NETCore --version 1.2.1
NuGet\Install-Package Line.Messaging.NETCore -Version 1.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Line.Messaging.NETCore" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Line.Messaging.NETCore --version 1.2.1
#r "nuget: Line.Messaging.NETCore, 1.2.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Line.Messaging.NETCore as a Cake Addin
#addin nuget:?package=Line.Messaging.NETCore&version=1.2.1

// Install Line.Messaging.NETCore as a Cake Tool
#tool nuget:?package=Line.Messaging.NETCore&version=1.2.1

Perform issue fixes and version upgrade for Line.Messaging

  • Upgraded the framework from .NET Framework 4.6 to .NET Core 6 and addressed compatibility issues.
  • Updated URLs for image, audio, and video messages to use a different domain name.
  • Created message types for image, audio, and video.

The original project URL

Modified content references to the data source at

Development environment

  • Visual Stdio 2022

TargetFramework

  • .net 6

Sample Code

You can see my sample code in

https://github.com/roy55688/LineBot_Sample

using LineBotTemplate.Applications;
using Line.Messaging;
using Line.Messaging.Webhooks;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddSingleton<LineMessagingClient>(provider =>
{
    var AccessToken = "Your AccessToken";
    return new LineMessagingClient(AccessToken);
});

builder.Services.AddHttpContextAccessor();

var app = builder.Build();

app.MapPost("/linebot", async (IServiceProvider serviceProvider, ILineBotApplication lineBotApplication) =>
{
    HttpContext _httpContext = serviceProvider.GetRequiredService<IHttpContextAccessor>().HttpContext;
    var ChannelSecret = "Your ChannelSecret";
    var events = await _httpContext.Request.GetWebhookEventsAsync(ChannelSecret);
    await lineBotApplication.RunAsync(events);
    return Results.NoContent();
});

app.Run();

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.1 90 4/30/2024
1.2.0 228 2/23/2024
1.1.0 521 11/22/2023
1.0.0 440 10/9/2023

1.The original project URL is https://github.com/pierre3/LineMessagingApi/.
2.Upgraded the framework from .NET Framework 4.6 to .NET Core 6 and addressed compatibility issues.
3.Updated URLs for image, audio, and video messages to use a different domain name.
4.Created message types for image, audio, and video.
5.Modified content references to the data source at https://ithelp.ithome.com.tw/users/20106865/ironman/2732.