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

3 min

Kinglet User and Programming Documentation

#kinglet - #api - #rest - #json

Example usage: http://soupmode.com

It's a simple, web-based, private messaging app. It uses a basic, responsive design. It contains only a small number of functions. It's part microblog, part e-mail, and part message board.

This web app was created to communicate with friends and family in a different way and to practice API development. The API code is written in Perl, and it only returns JSON.

The "client" code that accesses the API also exists on the same server, and it is currently written in Perl, but a Node.js "client" will be created. These server-side client pieces could exist on servers different than the API server.

By having the API created, I can practice creating client code that is written in JavaScript that runs in the browser as a single page application. I can practice iOS and Android app development.

The API code receives REST requests, talks to the database, processes data, and returns JSON. Test scripts work against the API.

User Help

Create an Account

  • User visits the sign-up page.
  • User enters a username and an e-mail address.
  • If configured, the system will send an e-mail with an auto-generated password and a link to activate the account. If the system is set to debug mode, then the password and the activation link will be sent to the browser. In debug mode, a user does not need to provide a valid e-mail address, since no e-mail is sent. But the user needs to provide an e-mail with valid syntax.
  • User clicks the link to activate the account.

Login

  • At the homepage or on the login page, the user enters the e-mail address, used to create the account and the password, generated by the system.
  • Optionally, a user can check the save login box to avoid having to login the next time the user accesses the site. If using multiple devices, the save login box will have to be checked for each device if the user wants to avoid logging in on all devices.
  • If the user forgets the password, the user can request the system to create a new password by entering the username and e-mail address in lost password section of the login page. If configured, the system will send an e-mail with the new password. If the system is in debug mode, then the new password is displayed to the browser.

Profile Page

  • To change password, e-mail address, or profile description information, the user clicks on his or her username, located in the navigation bar at the top of the site.
  • Next, the user clicks on "Change your password, e-mail address, or description info" and follows the form fields accordingly.
  • The e-mail address not seen by anyone else.
  • If the user enters description or profile information, this information is only seen by others who are on the user's approved list.

Request Approval

  • Unless the user only wants to communicate with himself, then the user needs to know someone else who has created an account.
  • On the profile page, the user enters the username of a known user and clicks the Request Approval button under the text line that says: ** "In order to message another user, you need to request permission to be added to the user's approved list."
  • Users can message others only if the user is on the others' approved list.
  • A user can send only one request to another user.
  • If a user tries to send another request, the user will receive one of three messages: * request is still pending request was already approved * request was already rejected

homepage "Homepage", "show_homepage"
stream "Homepage", "show_homepage"
showerror "Function", "do_invalid_function"
addmessage "AddMessage", "add_message"
addreply "AddMessage", "add_reply"
showmessage "ShowMessage", "show_message" compose "Compose", "show_new_message_form" reply "Compose", "show_new_reply_form"
replies "Replies", "show_replies" threads "Threads", "show_threads"
user "Profile", "show_user"
logout "LogoutUser", "logout"

requestapproval "Approval", "request_approval"
requestsreceived "Approval", "show_requests_received"
approverequest "Approval", "approve_request"
rejectrequest "Approval", "reject_request"

From JR's : articles
649 words - 4343 chars - 3 min read
created on
updated on - #
source - versions

Related articles
Kinglet User and Programmer Documentation - Mar 19, 2014
Grebe API Returned JSON - Aug 19, 2014
Draftin.com WebHook URL info - Aug 09, 2013
Short list of REST API info - Jan 13, 2017
Junco REST JSON simple GET for a post - Sep 20, 2013
more >>



A     A     A     A     A

© 2013-2017 JotHut - Online notebook

current date: May 2, 2024 - 4:42 a.m. EDT