diff --git a/packages/pl-api/README.md b/packages/pl-api/README.md index 6a35a4cc4..c428b8c89 100644 --- a/packages/pl-api/README.md +++ b/packages/pl-api/README.md @@ -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 diff --git a/packages/pl-api/lib/directory-client.ts b/packages/pl-api/lib/directory-client.ts index 4de7c0247..d803a9da7 100644 --- a/packages/pl-api/lib/directory-client.ts +++ b/packages/pl-api/lib/directory-client.ts @@ -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;