Glumboi_AnonfilesAPI 1.0.0

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

// Install Glumboi_AnonfilesAPI as a Cake Tool
#tool nuget:?package=Glumboi_AnonfilesAPI&version=1.0.0                

This is a fork/modfied version of BreakShoot's anonfilesAPI, original can be found here: https://github.com/BreakShoot/AnonFileAPI

AnonFileAPI

An unofficial C# API for interacting with https://anonfile.com/

Abilities

  • Convert link to direct download link.
  • Upload files.
  • Download files.
  • Contains Exception Types

Code Examples:


using (AnonFileWrapper afwAnonFileWrapper = new AnonFileWrapper())
      Console.WriteLine(afwAnonFileWrapper.GetDirectDownloadLinkFromLink("https://anonfile.com/N411B9d1bf/badstuff.txt"));

Upload Files

using (AnonFileWrapper anonFileWrapper = new AnonFileWrapper())
{
    AnonFile anonFile = anonFileWrapper.UploadFile($"C:\\Users\\username\\OneDrive\\Documents\\test\\example.txt");
    Console.WriteLine("Error Code: {0}", anonFile.ErrorCode);
    Console.WriteLine("Error Message: {0}", anonFile.ErrorMessage);
    Console.WriteLine("Error Type: {0}", anonFile.ErrorType);
    Console.WriteLine("Full URL: {0}", anonFile.FullUrl);
    Console.WriteLine("Status: {0}", anonFile.Status);
    Console.WriteLine("Download URL: {0}", anonFileWrapper.GetDirectDownloadLinkFromLink(anonFile.FullUrl));
}

Download Files

using (AnonFileWrapper afwAnonFileWrapper = new AnonFileWrapper())
{
      afwAnonFileWrapper.DownloadFile("https://anonfile.com/N411B9d1bf/badstuff.txt", @"C:\Users\Username\Downloads\badstuff.txt");
}

Tell Types of Exceptions

using (AnonFileWrapper anonFileWrapper = new AnonFileWrapper())
{
      AnonFile anonFile = anonFileWrapper.UploadFile("C:\\Users\\username\\OneDrive\\Documents\\test\\example.txt");
      if (anonFile.ErrorCode == AnonFile.AnonExceptions.ERROR_FILE_BANNED)
          return;
}
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 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.0.0 240 2/16/2023

Summary of changes made in this release of the package.