Skip to content
haides99 edited this page Mar 27, 2013 · 2 revisions

Programme Analysis

Database

Route and XHR

Page Url Mothod Parameters Function
/category /category.json GET no parameters get category data
/{category_name} /{category_name}/more.json GET page:{page_number} pagination
/t/{topic_name}/{topic_id} /t/{topic_id}/1.json GET track_visit:true
/t/{topic_id}.json GET posts_after:{post_number} pagination
/t/{topic_id}.json GET posts_before:{post_number} pagination
/posts/{post_id}/bookmark PUT bookmarked:{true/false} bookmark or unbookmark
/post_actions POST id:{post_id}
post_action_type_id:2
message:
like
/post_actions/{post_id} DELETE post_action_type_id:2 unlike
/post_actions/users GET id:{post_id}
post_action_type_id:2
get all users that like that post
/posts/{post_id}/replies GET no parameters get replies of a post

Tables in discourse

grep 'CREATE TABLE' from discourse/dbs/empty.sql:

Clone this wiki locally