MelonChart.NET 1.1.0

dotnet add package MelonChart.NET --version 1.1.0
NuGet\Install-Package MelonChart.NET -Version 1.1.0
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="MelonChart.NET" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MelonChart.NET --version 1.1.0
#r "nuget: MelonChart.NET, 1.1.0"
#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 MelonChart.NET as a Cake Addin
#addin nuget:?package=MelonChart.NET&version=1.1.0

// Install MelonChart.NET as a Cake Tool
#tool nuget:?package=MelonChart.NET&version=1.1.0

MelonChart.NET NuGet Version NuGet Downloads

This is the Melon chart scraping library written in .NET - Top 100, Hot 100, Daily 100, Weekly 100 and Monthly 100

Prerequisites

Getting Started

  1. Install the NuGet package of this library.

    dotnet add package MelonChart.NET
    

    You may need to run the following command to install Playwright dependencies.

    pwsh bin/Debug/net8.0/playwright.ps1 install
    
  2. Use the library in your code.

    var chart = new Top100Chart();
    var collection = await chart.GetChartAsync();
    foreach (var item in collection.Items)
    {
        Console.WriteLine($"{item.Rank} - {item.Title} by {item.Artist}");
    }
    
  3. If you want to get the Hot 100 chart, use the Hot100Chart class.

    var chart = new Hot100Chart();
    var collection = await chart.GetChartAsync();
    foreach (var item in collection.Items)
    {
        Console.WriteLine($"{item.Rank} - {item.Title} by {item.Artist}");
    }
    
  4. You can also register all the charts and get the chart by the type.

    var builder = WebApplication.CreateBuilder(args);
    builder.Services.AddKeyedScoped<IChart, Top100Chart>(ChartTypes.Top100);
    builder.Services.AddKeyedScoped<IChart, Hot100Chart>(ChartTypes.Hot100);
    builder.Services.AddKeyedScoped<IChart, Daily100Chart>(ChartTypes.Daily100);
    builder.Services.AddKeyedScoped<IChart, Weekly100Chart>(ChartTypes.Weekly100);
    builder.Services.AddKeyedScoped<IChart, Monthly100Chart>(ChartTypes.Monthly100);
    
    var app = builder.Build();
    
    app.MapGet("/top100", async ([FromKeyedServices(ChartTypes.Top100)] IChart chart) =>
    {
        var collection = await chart.GetChartAsync();
        return Results.Json(collection.Items);
    });
    
    app.MapGet("/hot100", async ([FromKeyedServices(ChartTypes.Hot100)] IChart chart) =>
    {
        var collection = await chart.GetChartAsync();
        return Results.Json(collection.Items);
    });
    
    app.MapGet("/daily100", async ([FromKeyedServices(ChartTypes.Daily100)] IChart chart) =>
    {
        var collection = await chart.GetChartAsync();
        return Results.Json(collection.Items);
    });
    
    app.MapGet("/weekly100", async ([FromKeyedServices(ChartTypes.Weekly100)] IChart chart) =>
    {
        var collection = await chart.GetChartAsync();
        return Results.Json(collection.Items);
    });
    
    app.MapGet("/monthly100", async ([FromKeyedServices(ChartTypes.Monthly100)] IChart chart) =>
    {
        var collection = await chart.GetChartAsync();
        return Results.Json(collection.Items);
    });
    
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.1.0 112 6/16/2024
1.0.1 86 5/26/2024