Messages
Users

You're viewing old version number 53. - Current version

1 min

Kinglet API

Each function is preceded with /api/v1.

Messages

Each URI ends with a query string /?user_name=[user_name]&user_id=[user_id]&session_id=[session_id.

example displaying message number 5:
GET /api/v1/messages/5/ru8er03jjg3k40vjl09/23/JR

[X] GET /messages - homepage. stream. messages created by or sent to the logged in user.

[X] GET /messages/page/3 - page three of the stream.

GET /messages/since/[date] - for the logged-in user, get all new messages received since the supplied date, which is in epoch seconds.

[X] GET /messages/5 - retrieve message 5.

[X] POST /messages - create a new message.

[X] GET /messages/5/replies - retrieve all reply messages for message 5.

[X] POST /messages/5/replies - create a reply message to message 5.

[X] GET /messages/threads - list the messages that start new discussions.

Users

# = URI ends with a query string /?user_name=[user_name]&user_id=[user_id]&session_id=[session_id.

[X] GET /users/JR - retrieve user info for user name JR. #

[X] POST /users - create a new user account.

[X] GET /users/activate/[user_digest] - activate user account

[X] GET /users/JR/logout - logout user JR. #

[X] POST /users/login - login user.

[X] POST /users/password - retrieve new password for existing account. user would not be logged in. this would be executed for someone who forgot or lost password.

[X] PUT /users/password - change password for existing account. user must be logged-in. #

[X] PUT /users - update e-mail and/or profile description for the user #

User actions:
- [x] create account
- [x] activate account
- [x] login
- [x] logout
- [x] change password
- [x] change e-mail and profile description
- [x] request new password

#blog_jr

#kinglet - #api - #programming

By JR - 260 words
created: - updated:
source - versions

Related articles
API-first-development design - Jun 23, 2014
Probably my favorite Web apps to use and create - Jan 15, 2014
Cross-Origin Resource Sharing header - Jan 09, 2015
Another Facebook contribution to PHP - Mar 26, 2014
Indieweb links aug 29, 2016 - Aug 29, 2016
more >>

short url


A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: Nov 15, 2024 - 1:53 a.m. EST