Client library for Sublinks and, during compatibility phase, Lemmy.
should be the domain of the instance without the scheme (e.g. sublinks.example.com). HTTPS is assumed and enforced by the library.
Optional options: HttpClientConstructorOptionsis an object of type HttpClientConstructorOptions
Optional init: RequestInitOptional init: RequestInitStandard fetch wrapper for native API calls.
ResponseType is the type definition to expect from the response.
FormDataType is the type definition for the form parameter data
Note: These are reversed from how Lemmy's wrapper function is implemented to allow shorter invocations for GET requests by not requiring a dummy 'object' type be passed for the non-existent form data when not needed.
HTTP method to use for the call
The relative API endpoint (e.g. /siteinfo -> https://{instance.com}/sublinks-api/v2/siteinfo)
The optional body payload for non-GET requests or key/values for GET query string params
Optional cacheOptions: CacheOptionsOptional cacheOptions: CacheOptionsOptional cacheOptions: CacheOptionsOptional cacheOptions: CacheOptionsGets the site info and optionally caches it.
Optional cacheOptions: CacheOptionsOptions to control the cache behavior
Generated using TypeDoc
Universal Sublinks/Lemmy client that works with both APIs