about summary refs log tree commit diff
path: root/docs/Using-the-API/Tips-for-app-developers.md
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-21 22:49:08 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-21 22:51:02 +0100
commite92a1cf436b99757e82d0234ca54b6c41b7ddb16 (patch)
tree0d646aa33721271ebe76db7124ba509e6fa1a570 /docs/Using-the-API/Tips-for-app-developers.md
parent500278eb4c73506cd965c3abc06a2449c8071e1e (diff)
Add wiki contents to docs/ instead
Diffstat (limited to 'docs/Using-the-API/Tips-for-app-developers.md')
-rw-r--r--docs/Using-the-API/Tips-for-app-developers.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/Using-the-API/Tips-for-app-developers.md b/docs/Using-the-API/Tips-for-app-developers.md
new file mode 100644
index 000000000..0cf2a882c
--- /dev/null
+++ b/docs/Using-the-API/Tips-for-app-developers.md
@@ -0,0 +1,13 @@
+# Authentication
+
+Make sure that you allow your users to specify the domain they want to connect to before login. Use that domain to acquire a client id/secret for OAuth2 and then proceed with normal OAuth2 also using that domain to build the URLs.
+
+In my opinion it is easier for people to understand what is being asked of them if you ask for a `username@domain` type input, since it looks like an e-mail address. Though the username part is not required for anything in the OAuth2 process. Once the user is logged in, you get information about the logged in user from `/api/v1/accounts/verify_credentials`
+
+# Usernames
+
+Make sure that you make it possible to see the `acct` of any user in your app (since it includes the domain part for remote users), people must be able to tell apart users from different domains with the same username.
+
+# Formatting
+
+The API delivers already formatted HTML to your app. This isn't ideal since not all apps are based on HTML, but this is not fixable as its part of the way OStatus federation works. Most importantly, you get some information on linked entities alongside the HTML of the status body. For example, you get a list of mentioned users, and a list of media attachments, and a list of hashtags. It is possible to convert the HTML to whatever you need in your app by parsing the HTML tags and matching their `href`s to the linked entities. If a match cannot be found, the link must stay a clickable link.
\ No newline at end of file