![]() |
VOOZH | about |
dotnet add package DeviantArtFs --version 12.0.0
NuGet\Install-Package DeviantArtFs -Version 12.0.0
<PackageReference Include="DeviantArtFs" Version="12.0.0" />
<PackageVersion Include="DeviantArtFs" Version="12.0.0" />Directory.Packages.props
<PackageReference Include="DeviantArtFs" />Project file
paket add DeviantArtFs --version 12.0.0
#r "nuget: DeviantArtFs, 12.0.0"
#:package DeviantArtFs@12.0.0
#addin nuget:?package=DeviantArtFs&version=12.0.0Install as a Cake Addin
#tool nuget:?package=DeviantArtFs&version=12.0.0Install as a Cake Tool
An unoffical F# library to interact with the
Each request that can be made to DeviantArt is represented by a function
in one of the modules (static classes) in the DeviantArtFs.Api namespace.
Each static method takes an IDeviantArtAccessToken as its first parameter.
Most methods have additional parameters, many of which are discriminated
unions; hopefully this makes it easy to see exactly what your code is doing
and ensures that parameters can't get mixed up.
In some cases, two methods are available for an API call. Functions whose
names containing Page will return a single page of results, while the
corresponding Get function will return an asynchronous sequence which
begins at the offset you specify. (Keep API usage limits in mind!)
The response objects in this library are F# records which use F# option
types for optional fields. You can interact with option types from C# or
VB.NET using FSharpOption<T> and/or OptionModule, for example:
string title = OptionModule.ToObj(d.title);
DateTimeOffset? time = OptionModule.ToNullable(d.published_time);
FSharpList<T>, an immutable linked list that is part of the F# core library,
implements IReadOnlyList<T> and IEnumerable<T>.
IAsyncEnumerable<T> is now the same interface between F# and other .NET
languages, and you can interact with it using await foreach or extension
methods like ToListAsync in .NET's System.Linq.AsyncEnumerable namespace.
Optional parameters for object expansion, ext_params, and mature content
filtering must be included through the token object. Use the interface
IDeviantArtAccessTokenWithOptionalParameters and include the optional
parameters in the OptionalParameters property; for example:
member _.OptionalParameters = [
OptionalParameter.Expansion [Expansion.UserProfile]
OptionalParameter.ExtParam ExtParam.Collection
OptionalParameter.MatureContent true
]
or:
public IEnumerable<OptionalParameter> OptionalParameters => new OptionalParameter[] {
OptionalParameter.NewExpansion(Expansion.UserProfile),
OptionalParameter.NewExtParam(ExtParam.Gallery),
OptionalParameter.NewMatureContent(true)
}
Deviation and DeviantArtStatus objects can represent a deviation or status
update that has been deleted; this is why most of the fields on those two
types are marked optional. Check the is_deleted field before attempting to
access any of the other fields.
profile_pic field in the user.profile expansion is not supported due to circular type definitions. Get it from the full profile object instead.tier.stats field is not supported due to serialization issues on DeviantArt's end (the empty object {} can be rendered as [] by the server).api_session return object is not supported.See also: https://www.deviantart.com/developers/authentication
The DeviantArtAuth module provides methods to support the Authorization Code grant type (getting tokens from an authorization code and refreshing tokens).
If you need to store the access token somewhere (such as in a database or
file), you may want to create your own class that implements the
IDeviantArtAccessToken or IDeviantArtRefreshableAccessToken interface.
Using the latter will allow DeviantArtFs to automatically refresh the token
and store the new value when it recieves an HTTP 401 response.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Framework | net48 net48 is compatible. net481 net481 was computed. |
Showing the top 1 NuGet packages that depend on DeviantArtFs:
| Package | Downloads |
|---|---|
|
DeviantArtFs.Stash.Marshal
An F#/.NET library to interact with the Sta.sh API and manage state (.NET Standard 2.0) |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 12.0.0 | 117 | 5/22/2026 |
| 11.0.0 | 345 | 10/28/2024 |
| 11.0.0-beta2 | 188 | 10/28/2024 |
| 10.1.0-beta2 | 174 | 10/20/2024 |
| 10.1.0-beta1 | 172 | 9/21/2024 |
| 10.0.0 | 267 | 8/8/2024 |
| 10.0.0-rc1 | 180 | 8/8/2024 |
| 9.2.1-rc1 | 182 | 8/7/2024 |
| 9.2.0 | 270 | 6/19/2024 |
| 9.2.0-beta1 | 201 | 6/19/2024 |
| 9.1.1 | 264 | 4/27/2024 |
| 9.1.0-rc1 | 284 | 11/27/2023 |
| 9.0.0 | 373 | 11/22/2023 |
| 9.0.0-beta4 | 296 | 5/30/2023 |
| 9.0.0-beta2 | 252 | 5/28/2023 |
| 8.0.0 | 680 | 5/30/2021 |
| 8.0.0-beta4 | 444 | 5/30/2021 |
| 8.0.0-beta3 | 528 | 5/30/2021 |
| 8.0.0-beta2 | 448 | 5/30/2021 |
| 7.0.1 | 631 | 1/11/2021 |