Table of Contents

Class BlueskyHttpClient<TResult>

Namespace
idunno.Bluesky
Assembly
idunno.Bluesky.dll

A helper class to perform HTTP requests against an Bluesky APIs. This class only differs from idunno.AtProto.AtProtoHttpClient`1 by additionally mapping Bluesky specific API errors to more specific error types.

public class BlueskyHttpClient<TResult> : AtProtoHttpClient<TResult> where TResult : class

Type Parameters

TResult

The type of class to use when deserializing results from an Bluesky API call.

Inheritance

AtProtoHttpClient<TResult>

Inherited Members

AtProtoHttpClient<TResult>.Get(Uri, string, HttpClient, CancellationToken)
AtProtoHttpClient<TResult>.Get(Uri, string, HttpClient, JsonSerializerOptions, CancellationToken)
AtProtoHttpClient<TResult>.Get(Uri, string, AtProtoCredential?, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, ICollection<NameValueHeaderValue>?, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Get(Uri, string, AtProtoCredential?, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, ICollection<NameValueHeaderValue>?, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Post(Uri, string, AtProtoCredential?, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Post(Uri, string, AtProtoCredential?, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, HttpClient, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, HttpClient, JsonSerializerOptions, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, AtProtoCredential, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, AtProtoCredential, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, ICollection<NameValueHeaderValue>?, AtProtoCredential?, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.Post<TRecord>(Uri, string, TRecord?, ICollection<NameValueHeaderValue>?, AtProtoCredential?, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, IEnumerable<Did>?, CancellationToken)
AtProtoHttpClient<TResult>.PostBlob(Uri, string, byte[], ICollection<NameValueHeaderValue>?, ICollection<NameValueHeaderValue>?, AtProtoCredential, HttpClient, Func<AtProtoCredential, CancellationToken, Task>?, CancellationToken)
AtProtoHttpClient<TResult>.PostBlob(Uri, string, byte[], ICollection<NameValueHeaderValue>?, ICollection<NameValueHeaderValue>?, AtProtoCredential, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, CancellationToken)
AtProtoHttpClient<TResult>.PostBlob(Uri, string, ReadOnlyMemory<byte>, ICollection<NameValueHeaderValue>?, ICollection<NameValueHeaderValue>?, AtProtoCredential, HttpClient, JsonSerializerOptions, Func<AtProtoCredential, CancellationToken, Task>?, CancellationToken)
AtProtoHttpClient<TResult>.MaximumResponseSize
AtProtoHttpClient<TResult>.OnSendingRequest
AtProtoHttpClient<TResult>.OnResponseReceived
AtProtoHttpClient<TResult>.ErrorMapperChain

Remarks

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

Constructors

BlueskyHttpClient(string?, ICollection<NameValueHeaderValue>?, ILoggerFactory?, IMeterFactory?)

A helper class to perform HTTP requests against an Bluesky APIs. This class only differs from idunno.AtProto.AtProtoHttpClient`1 by additionally mapping Bluesky specific API errors to more specific error types.

public BlueskyHttpClient(string? serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from.

meterFactory IMeterFactory?

An optional meter factory to create meters from.

Remarks

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

BlueskyHttpClient()

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient()

BlueskyHttpClient(ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(ILoggerFactory? loggerFactory)

Parameters

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

BlueskyHttpClient(string?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

Remarks

Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.

Exceptions

ArgumentException

Thrown when serviceProxy is null or white space.

BlueskyHttpClient(string?, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

Remarks

Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.

Exceptions

ArgumentException

Thrown when serviceProxy is null or white space.

BlueskyHttpClient(string, NameValueHeaderValue)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?, IMeterFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

meterFactory IMeterFactory?

An optional meter factory to create meters from.

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

BlueskyHttpClient(string?, ILoggerFactory?, IMeterFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from.

meterFactory IMeterFactory?

An optional meter factory to create meters from.

BlueskyHttpClient(string?, ICollection<NameValueHeaderValue>?, ILoggerFactory?, IMeterFactory?)

A helper class to perform HTTP requests against an Bluesky APIs. This class only differs from idunno.AtProto.AtProtoHttpClient`1 by additionally mapping Bluesky specific API errors to more specific error types.

public BlueskyHttpClient(string? serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from.

meterFactory IMeterFactory?

An optional meter factory to create meters from.

Remarks

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

BlueskyHttpClient()

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient()

BlueskyHttpClient(ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(ILoggerFactory? loggerFactory)

Parameters

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

BlueskyHttpClient(string?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

Remarks

Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.

Exceptions

ArgumentException

Thrown when serviceProxy is null or white space.

BlueskyHttpClient(string?, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

Remarks

Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.

Exceptions

ArgumentException

Thrown when serviceProxy is null or white space.

BlueskyHttpClient(string, NameValueHeaderValue)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?, IMeterFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

meterFactory IMeterFactory?

An optional meter factory to create meters from.

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

BlueskyHttpClient(string?, ILoggerFactory?, IMeterFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from.

meterFactory IMeterFactory?

An optional meter factory to create meters from.

BlueskyHttpClient(string?, ICollection<NameValueHeaderValue>?, ILoggerFactory?, IMeterFactory?)

A helper class to perform HTTP requests against an Bluesky APIs. This class only differs from idunno.AtProto.AtProtoHttpClient`1 by additionally mapping Bluesky specific API errors to more specific error types.

public BlueskyHttpClient(string? serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from.

meterFactory IMeterFactory?

An optional meter factory to create meters from.

Remarks

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

BlueskyHttpClient()

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient()

BlueskyHttpClient(ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(ILoggerFactory? loggerFactory)

Parameters

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

BlueskyHttpClient(string?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

Remarks

Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.

Exceptions

ArgumentException

Thrown when serviceProxy is null or white space.

BlueskyHttpClient(string?, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

Remarks

Passing null as the serviceProxy value will suppress the checks for the presence of the atproto-proxy header on requests by this instance.

Exceptions

ArgumentException

Thrown when serviceProxy is null or white space.

BlueskyHttpClient(string, NameValueHeaderValue)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, NameValueHeaderValue, ILoggerFactory?, IMeterFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, NameValueHeaderValue requestHeader, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeader NameValueHeaderValue

An header to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

meterFactory IMeterFactory?

An optional meter factory to create meters from.

Exceptions

ArgumentNullException

Thrown when requestHeader is null.

BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

BlueskyHttpClient(string, ICollection<NameValueHeaderValue>?, ILoggerFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string serviceProxy, ICollection<NameValueHeaderValue>? requestHeaders, ILoggerFactory? loggerFactory)

Parameters

serviceProxy string

The service a PDS should proxy the request to.

requestHeaders ICollection<NameValueHeaderValue>?

Optional headers to add to the requests this instance makes.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from/

BlueskyHttpClient(string?, ILoggerFactory?, IMeterFactory?)

Creates a new instance of idunno.Bluesky.BlueskyHttpClient`1

public BlueskyHttpClient(string? serviceProxy, ILoggerFactory? loggerFactory, IMeterFactory? meterFactory)

Parameters

serviceProxy string?

The service a PDS should proxy the request to.

loggerFactory ILoggerFactory?

An optional logger factory to create loggers from.

meterFactory IMeterFactory?

An optional meter factory to create meters from.