aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-12-18 13:58:07 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-12-18 13:58:34 +0100
commit08b6294f47d1a8023ba24707bb14f63e6ae4f25a (patch)
tree5bde84e93eb710e9d4b120c1486697f83e97f8d1
parentb6ae412fcd7c67d64dd1467e8e35d17140e992df (diff)
downloadpleroma-08b6294f47d1a8023ba24707bb14f63e6ae4f25a.tar.gz
Pleroma-API.md: Import from /wikis/Pleroma-only-api-endpoints
-rw-r--r--Pleroma-API.md26
-rw-r--r--mix.exs2
2 files changed, 27 insertions, 1 deletions
diff --git a/Pleroma-API.md b/Pleroma-API.md
new file mode 100644
index 000000000..cda3894f0
--- /dev/null
+++ b/Pleroma-API.md
@@ -0,0 +1,26 @@
+# Authentication
+
+Requests that require it can be authenticated with [an OAuth token](https://tools.ietf.org/html/rfc6749), the `_pleroma_key` cookie, or [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization).
+
+# Request parameters
+
+Request parameters can be passed via [query strings](https://en.wikipedia.org/wiki/Query_string) or as [form data](https://www.w3.org/TR/html401/interact/forms.html). Files must be uploaded as `multipart/form-data`.
+
+# Endpoints
+
+## `/api/pleroma/emoji`
+### Lists the custom emoji on that server.
+* Method: `GET`
+* Authentication: not required
+* Params: none
+* Response: JSON
+* Example response: `{"kalsarikannit_f":"/finmoji/128px/kalsarikannit_f-128.png","perkele":"/finmoji/128px/perkele-128.png","blobdab":"/emoji/blobdab.png","happiness":"/finmoji/128px/happiness-128.png"}`
+
+## `/api/pleroma/follow_import`
+### Imports your follows, for example from a Mastodon CSV file.
+* Method: `POST`
+* Authentication: required
+* Params:
+ * `list`: STRING or FILE containing a whitespace-separated list of accounts to follow
+ * Response: HTTP 200 on success, 500 on error
+ * Note: Users that can't be followed are silently skipped.
diff --git a/mix.exs b/mix.exs
index e9705bcf9..4af896fc9 100644
--- a/mix.exs
+++ b/mix.exs
@@ -21,7 +21,7 @@ defmodule Pleroma.Mixfile do
homepage_url: "https://pleroma.social/",
docs: [
logo: "priv/static/static/logo.png",
- extras: ["README.md", "config/config.md"],
+ extras: ["README.md", "config/config.md", "Pleroma-API.md"],
main: "readme"
]
]