AuphonicApiNet 1.0.0

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

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

AuphonicNet

AuphonicNet is a .NET implementation for the Auphonic Api. It uses .Net Standard 2.1 framework and it accessable from .Net Core as well as from .Net Framework

Feature Completion

At the current state you can Query Userdetails, Presets and Productions. You also can create and start productions

API-Description

The API-Description can be found at Auphonic Help

How to start

Start by downloading the source or add the NuGet-Package to your solution.

The first thing you have to do is to provide your credentials:

AuphonicApi.BasicAuth.SetCredentials("username","password").

Examples

Retrieve your Credits

private async Task GetMyCredits() {
   AuphonicApi.BasicAuth.SetCredentials("username", "password");
   var query=new AuphonicApi.Query();
   var meMyselfAndI=await query.GetUserAsync();
   Console.Write($"I have {meMyselfAndI.Data.Credits} credits left");
}

Show all Presets and Productions

private async Task ShowStuff() {
   AuphonicApi.BasicAuth.SetCredentials("username", "password");
   var query=new AuphonicApi.Query();
   var productions=await query.GetProductionsAsync();
   var presets=await query.GetPresetsAsync();
   Console.Write("My Presets:");
   foreach (var p in presets) {
      Console.Write(p.Data.PresetName);
   }
   Console.Write("My Productions:");
   foreach (var p2 in productions) {
      Console.Write(p2.Data.MetaData.Title);
   }
}

Create and start a new Production

private async Task CreateProduction(string presetUuid, string episodeTitle, byte[] mp3file) {
   AuphonicApi.BasicAuth.SetCredentials("username", "password");
   var prod=new AuphonicApi.Production();
   var production= await prod.CreateFromPreset(presetUuid, episodeTitle);
   var productionUuid=production.Data.Uuid;
   await prod.AddFileToProduction(productionUuid, "upload.mp3", mp3file);
   await prod.StartProduction(productionId);
}

Create a production with a webhook

private async Task CreateWithHook(string presetUuid, string title, byte[] mp3file) {
   AuphonicApi.BasicAuth.SetCredentials("username", "password");
   var prod=new AuphonicApi.Production();
   var production=await _production.CreateFromPreset(
      presetUuid, 
      new Dictionary<string, object> { { "WebHook", "http://example.com/hook/auphonic" } }, 
      new AuphonicApi.Models.Metadata { Title = title }
   );
    
   var productionUuid=production.Data.Uuid;
   await prod.AddFileToProduction(productionUuid, "upload.mp3", mp3file);
   await prod.StartProduction(productionId);
}
Consume a webhook

Auphonic sends successunformation to any finished production. When using Asp.Net WebApi you can collect the response from the webhook the following way:

    [ApiController]
    [Route("[controller]")]
    public class HookController:ControllerBase
    {
        [HttpPost] 
        [Route("auphonic")]
        public async void Webhook([FromForm] string uuid, [FromForm(Name ="status_string")] string status, [FromForm(Name ="status")] int statusNumber)
        {
           if (status=="Done") {
              Console.Write($"{uuid} is finished")
           } else {
              Console.Write($"{uuid} failed")
           }
        }
    }

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.0.0 290 1/8/2022