From a664037c0f2c671599c26c21bc571b2f38ae6dad Mon Sep 17 00:00:00 2001 From: Gary Conroy Date: Fri, 26 Feb 2021 18:29:47 +0000 Subject: [PATCH 1/3] Added links to summary and inserted links to WebSocket API --- src/en/SUMMARY.md | 2 ++ src/en/contributing/http_api.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/en/SUMMARY.md b/src/en/SUMMARY.md index feee727..450a63f 100644 --- a/src/en/SUMMARY.md +++ b/src/en/SUMMARY.md @@ -21,6 +21,8 @@ - [Docker Development](contributing/docker_development.md) - [Local Development](contributing/local_development.md) - [Theming Guide](contributing/theming.md) + - [API reference](contributing/api_reference) + - [WebSocket API](https://join.lemmy.ml/api/index.html)) - [HTTP API](contributing/http_api.md) - [Creating a Custom Frontend](contributing/custom_frontend.md) - [Tests](contributing/tests.md) diff --git a/src/en/contributing/http_api.md b/src/en/contributing/http_api.md index b174fb5..2477b0c 100644 --- a/src/en/contributing/http_api.md +++ b/src/en/contributing/http_api.md @@ -20,7 +20,7 @@ ## WebSocket vs HTTP API Lemmy's HTTP API is almost identical to its WebSocket API: -- **WebSocket API** needs `let send = { op: userOperation[op], data: form}` as shown in [the WebSocketAPI specification](add_link) +- **WebSocket API** needs `let send = { op: userOperation[op], data: form}` as shown in [the WebSocketAPI specification](https://join.lemmy.ml/api/index.html)) - **HTTP API** needs the form (data) at the top level, an HTTP operation (GET, PUT or POST) and endpoint (at `http(s)://host/api/v2/endpoint`). For example: > `POST {username_or_email: X, password: X}` From 1dc7e9bf98deff9ca33624115ee63eb5c458d6f8 Mon Sep 17 00:00:00 2001 From: gazconroy Date: Sat, 27 Feb 2021 10:31:52 +0000 Subject: [PATCH 2/3] Update SUMMARY.md --- src/en/SUMMARY.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/en/SUMMARY.md b/src/en/SUMMARY.md index 450a63f..376f57c 100644 --- a/src/en/SUMMARY.md +++ b/src/en/SUMMARY.md @@ -21,8 +21,8 @@ - [Docker Development](contributing/docker_development.md) - [Local Development](contributing/local_development.md) - [Theming Guide](contributing/theming.md) - - [API reference](contributing/api_reference) - - [WebSocket API](https://join.lemmy.ml/api/index.html)) + - [API reference](contributing/api_reference.md) + - [WebSocket API](https://join.lemmy.ml/api/index.html) - [HTTP API](contributing/http_api.md) - [Creating a Custom Frontend](contributing/custom_frontend.md) - [Tests](contributing/tests.md) From 0e7f559fab0156e27cf4a86c9b2c95cdb533cf47 Mon Sep 17 00:00:00 2001 From: gazconroy Date: Sat, 27 Feb 2021 10:34:24 +0000 Subject: [PATCH 3/3] Update http_api.md --- src/en/contributing/http_api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/en/contributing/http_api.md b/src/en/contributing/http_api.md index 2477b0c..f75e7e6 100644 --- a/src/en/contributing/http_api.md +++ b/src/en/contributing/http_api.md @@ -20,14 +20,14 @@ ## WebSocket vs HTTP API Lemmy's HTTP API is almost identical to its WebSocket API: -- **WebSocket API** needs `let send = { op: userOperation[op], data: form}` as shown in [the WebSocketAPI specification](https://join.lemmy.ml/api/index.html)) +- **WebSocket API** needs `let send = { op: userOperation[op], data: form}` as shown in [the WebSocketAPI specification](https://join.lemmy.ml/api/index.html) - **HTTP API** needs the form (data) at the top level, an HTTP operation (GET, PUT or POST) and endpoint (at `http(s)://host/api/v2/endpoint`). For example: > `POST {username_or_email: X, password: X}` For more information, see the [http.ts](https://github.com/LemmyNet/lemmy-js-client/blob/main/src/http.ts) file. -[The WebSocket API](Add_link) should be regarded as the primary source for the HTTP API since it also provides information about how to form HTTP API calls. +[The WebSocket API](https://join.lemmy.ml/api/index.html) should be regarded as the primary source for the HTTP API since it also provides information about how to form HTTP API calls. ## Examples