Weeb.net 1.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package Weeb.net --version 1.0.6                
NuGet\Install-Package Weeb.net -Version 1.0.6                
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="Weeb.net" Version="1.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Weeb.net --version 1.0.6                
#r "nuget: Weeb.net, 1.0.6"                
#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 Weeb.net as a Cake Addin
#addin nuget:?package=Weeb.net&version=1.0.6

// Install Weeb.net as a Cake Tool
#tool nuget:?package=Weeb.net&version=1.0.6                

Token

To use the weeb.sh services you need an authentication token. You can request one at devs@weeb.sh

Usage

Creating a client and authentication

//...
	WeebClient weebClient = new WeebClient();
	string token = "YOUR TOKEN";
	
	public async Task InitializeAsync()
	{
		//Will print current weeb.sh API version and Weeb.net wrapper version
		await weebClient.Authenticate(token, TokenType.Bearer); //or TokenType.Wolke
	}
//...

Getting all available tags

//...
	public async Task<TagsData> GetTagsAsync(bool hidden)
	{
		return await weebClient.GetTagsAsync(hidden); //hidden is always defaulted to false
	}
//...

Getting all available types

//...
	public async Task<TypesData> GetTypesAsync(bool hidden)
	{
		return await weebClient.GetTypesAsync(hidden); //hidden is always defaulted to false
	}
//...

Getting Random image with type and or tags

You must have at least either type or tags!
UPDATE: There have been som minor changes to accomodate new features.
fileType consists of: Jpg, png, gif, any. Jpg and jpeg are treated as equal.
NsfwSearch consists of: false, ture, only

//...
	public async Task<RandomData> GetTypesAsync(string type, IEnumerable<string> tags,FileType fileType, NsfwSearch nsfw,bool hidden)
	{
		var result = await weebClient.GetRandomAsync(type, tags, fileType, hidden, nsfw); //hidden and nsfw are always defaulted to false

		if (result == null)
		{
			//Nothing was found do smth...
			//...
			return null
		}
		return result
	}
//...

Models

TagsData

    public class TagsData
    {
        internal string Status { get; set; } //cannot be used in your program. only used for internal wrapper things :P
        public List<string> Tags { get; set; }
    }

TypesData

    public class TypesData    
    {
        internal string Status { get; set; } //cannot be used in your program. only used for internal wrapper things :P
        public List<string> Types { get; set; }
    }

RandomData

	public class RandomData
    {
        public string Id { get; set; }
        public string BaseType { get; set; }
        public string FileType { get; set; }
        public string MimeType { get; set; }
        public string Account { get; set; }
        public bool Hidden { get; set; }
        public bool Nsfw { get; set; }
        public List<Tags> Tags { get; set; }
        public string Url { get; set; }
    }

    public class Tags
    {
        public string Name { get; set; }
        public bool Hidden { get; set; }
        public string User { get; set; }
    }
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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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.7 1,692 4/23/2018
1.0.6 915 4/22/2018
1.0.5 907 3/4/2018
1.0.4 929 3/4/2018
1.0.3 1,050 9/16/2017
1.0.2 922 9/16/2017
1.0.1 989 9/14/2017
1.0.0 946 9/14/2017