mirror of
https://github.com/LemmyNet/joinlemmy-site.git
synced 2024-11-21 20:01:16 +00:00
Merge pull request #20 from gazconroy/main
Added links to HTTP API and API reference pages
This commit is contained in:
commit
0cdef9bf8f
1 changed files with 13 additions and 2 deletions
|
@ -7,17 +7,25 @@ info:
|
|||
url: https://mastodon.social/@LemmyDev
|
||||
description: |-
|
||||
### About Lemmy
|
||||
|
||||
[**Lemmy**](https://github.com/LemmyNet/lemmy) is a decentralized alternative to proprietary link aggregators such as Reddit.
|
||||
|
||||
#### More information...
|
||||
|
||||
- [Install your own server](https://join.lemmy.ml/docs/en/administration/administration.html)
|
||||
- [API reference](link_here)
|
||||
- [API reference](https://join.lemmy.ml/docs/en/contributing/api_reference.html)
|
||||
- [HTTP API](https://join.lemmy.ml/docs/en/contributing/http_api.html)
|
||||
|
||||
### How to use this WebSocket API document
|
||||
|
||||
You can either use it to:
|
||||
|
||||
- **Interactively browse the WebSocket API.** Browse the *Channels*, check out the responses and examples (tailor the *PUBLISH* requests to suit with your favorite WebSocket client).
|
||||
For testing purposes, either [set up your own server](https://join.lemmy.ml/docs/en/administration/administration.html) or use the Enterprise server (*ws://enterprise.lemmy.ml/api/v2/ws*)
|
||||
- **[Open and save](asyncapi.yaml) this specification file** and use it with the various [AsyncAPI tools](https://www.asyncapi.com/docs/community/tooling) (perhaps to generate code or documentation).
|
||||
|
||||
Connect to <code>ws://***host***/api/v2/ws</code> to get started. If the server supports secure connections, you can use `wss://**server**/api/v1/ws`.
|
||||
|
||||
#### Testing with websocat
|
||||
|
||||
For example a simple test using [websocat](https://github.com/vi/websocat) might be:
|
||||
|
@ -42,12 +50,15 @@ info:
|
|||
```
|
||||
|
||||
### Structure of this document
|
||||
|
||||
- **Channels** - Documents the requests (marked with the PUBLISH button) and responses (marked with SUBSCRIBE) for each endpoint (*channel*)
|
||||
- **Servers** - Lists some publicly-accessible test servers
|
||||
- **Messages** - A summary of the requests and responses (a duplication of the information in **Channels**)
|
||||
- **Schemas** - An alphabetical list of the most commonly accessed data structures in the API.
|
||||
|
||||
### The HTTP API
|
||||
Lemmy also has an [HTTP API](link_here) which is almost identical to the WebSocket API; however, this WebSocket API is the primary source since it also details the specifics of HTTP API calls.
|
||||
|
||||
Lemmy also has an [HTTP API](https://join.lemmy.ml/docs/en/contributing/http_api.html) which is almost identical to the WebSocket API; however, this WebSocket API is the primary source since it also details the specifics of HTTP API calls.
|
||||
|
||||
license:
|
||||
name: AGPL
|
||||
|
|
Loading…
Reference in a new issue