pl-api: Update docs

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-11-29 15:47:21 +01:00
parent 01eab8b57f
commit 486b98fdc0
2 changed files with 12 additions and 2 deletions

View file

@ -31,7 +31,8 @@ Some sort of documentation is available on https://pl.mkljczk.pl/pl-api-docs
## Projects using `pl-api`
[`pl-fe`](https://github.com/mkljczk/pl-fe) is a web client for Mastodon-compatible servers forked from Soapbox. It uses `pl-api` for API interactions.
* [`pl-fe`](https://github.com/mkljczk/pl-fe/tree/develop/packages/pl-fe) is a web client for Mastodon-compatible servers forked from Soapbox. It uses `pl-api` for API interactions.
* [`pl-hooks`](https://github.com/mkljczk/pl-fe/tree/develop/packages/pl-hooks) is a work-in-progress library utilizing `pl-api`.
## License

View file

@ -8,10 +8,15 @@ import { filteredArray } from './entities/utils';
import request from './request';
interface Params {
/** ISO 639 language code for servers. */
language?: string;
/** Server topic. */
category?: string;
/** Region where teh server is legally based. */
region?: 'europe' | 'north_america' | 'south_america' | 'africa' | 'asia' | 'oceania';
/** Whether the server is governed by a public organization or a private individual. */
ownership?: 'juridicial' | 'natural';
/** Whether the registrations are currently open. */
registrations?: 'instant' | 'manual';
}
@ -20,7 +25,11 @@ interface Params {
*/
class PlApiDirectoryClient {
accessToken = undefined;
/** Unused. */
accessToken: string | undefined = undefined;
/**
* Server directory URL.
*/
baseURL: string;
public request = request.bind(this) as typeof request;