EZDotNet.Core 1.0.0

dotnet add package EZDotNet.Core --version 1.0.0
                    
NuGet\Install-Package EZDotNet.Core -Version 1.0.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="EZDotNet.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EZDotNet.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="EZDotNet.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EZDotNet.Core --version 1.0.0
                    
#r "nuget: EZDotNet.Core, 1.0.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.
#addin nuget:?package=EZDotNet.Core&version=1.0.0
                    
Install EZDotNet.Core as a Cake Addin
#tool nuget:?package=EZDotNet.Core&version=1.0.0
                    
Install EZDotNet.Core as a Cake Tool

EZDotNet (e-z-dotnet)

A .NET library for interacting with the e-z.host API service.

Features

  • File Upload

    • Upload files via file path
    • Upload files via IFormFile (ASP.NET Core)
  • URL Shortening

    • Create shortened URLs
  • Paste Creation

    • Create new pastes
    • Syntax highlighting support

Installation

dotnet add package EZDotNet.Core
dotnet add package EZDotNet.Services

Quick Start

ASP.NET Core DI

var builder = WebApplication.CreateBuilder(args);

// Add EZServices using the extension method
builder.Services.AddEZServices(options =>
{
    options.ApiKey = builder.Configuration["EZHost:ApiKey"];
    // Optionally configure timeout if needed
    // options.Timeout = TimeSpan.FromMinutes(5);
});

[ApiController]
[Route("[controller]")]
public class FileUploadController : ControllerBase
{
    private readonly IFileService _fileService;

    public FileUploadController(IFileService fileService)
    {
        _fileService = fileService;
    }

    [HttpPost("upload")]
    public async Task<IActionResult> UploadFile(IFormFile file)
    {
        // Using the built-in extension method for IFormFile
        var response = await _fileService.UploadFileFromFormFileAsync(file);

        // Do whatever you want with the response

        return Ok();
    }
}

Standard Usage

var client = new EZServicesClient(new EZServicesOptions { ApiKey = "your-api-key" });
// Upload a file 
var fileResponse = await client.Files.UploadFileFromPathAsync("path/to/file.png");
// Create short URL 
var urlResponse = await client.Shortener.CreateShortUrlAsync("https://example.com");
// Create paste 
var pasteResponse = await client.Paste.CreatePasteAsync(new PasteCreateRequest { Title = "Title!", Description = "Description!", Text = "Hello World", Language = PasteLanguage.CSharp });

Requirements

  • .NET 8.0+
  • Valid e-z.host API key
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EZDotNet.Core:

Package Downloads
EZDotNet.Services

ASP.NET Core integration package for e-z.host services, providing dependency injection setup and file handling extensions for uploading, shortening, and paste services.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 135 5/5/2025