Backend API Sketch for Milestone 1 - bounswe/2021SpringGroup1 GitHub Wiki
This page is now obsolete, dynamic API documentation can be accessed through the app. Link will be here when app is deployed
This page contains the initial Backend API sketch that we made during Meeting 4. Itβs made to provide only a rough description and some kind of context for the frontend. This sketch will be replaced with a extensive documentation for the actual API later on.
try_register
-
β input {username : <string>, password : <string> , e-mail: <string>}
-
β output {success: <bool>, message: <string>}
try_login
-
β input {username_input : string, password_input : string }
-
β output {success: <bool>, message: <string>}
get_user_communtity_posts
-
β input { username: <string> } ( if NULL, then currently logged user is taken as argument)
-
β output [ {post_data}β {title: string, description:string, data_fields: [ {data_field_data} , β¦β.. ] , posted_by: <user>, post_date: <date> , community: <string> } , β¦β , β¦β]
get_user_communities
-
β input { username: <string> } ( if NULL, then currently logged user is taken as argument)
-
β output [ community1_name, community2_name, β¦β ]
get_community_data
-
β input {community_name: <string>} ( if NULL, then currently viewed community page is taken as argument)
-
β output {name:string, description:string, isSubscribed:bool , community_png: link}
get_all_communities
-
β input {}
-
β output [ community1_name, community2_name, β¦β ]
search_communities
-
β input ( {keyword: string})
-
β output [ community1_name, community2_name, β¦β ]
get_user_created_posts
-
β input {username:<string>} ( if NULL, then currently logged user is taken as argument)
-
β output [ {post_data}β {title: string, description:string, data_fields: [ {data_field_data} , β¦β.. ] , posted_by: <user>, post_date: <date> , community: <string> } , β¦β , β¦β]
try_create_community
-
β input {name: <string>, description:<string>, community_png: <URL>, isPrivate : <bool>}
-
β output {success:<bool>}
get_community_posts
-
β input {community_name: <string>} ( if NULL, then currently viewed community page is taken as argument)
-
β output [ {post_data}β {title: string, description:string, data_fields: [ {data_field_data} , β¦β.. ] , posted_by: <user>, post_date: <date> , community: <string> } , β¦β , β¦β]
get_community_post_templates
-
β input {community_name:<string>} ( if NULL, then currently viewed community page is taken as argument)
-
β output [ {title: string, description:string, data_field_temps: [ {data_field_temp_data} , β¦β.. ] , community: name } , β¦β]
try_create_post
-
β input {template_number, form_values { <data_field_temp.id>_value: <type> ,.. }
-
β output {success:<bool>}
try_create_post_template
-
β input { title: string, description: string, data_field_temps: [ {field1_name: string, field1_type: <>, field1_formContent:<string>}, β¦β] }
-
β output {success:<bool>}
set_subscription_to_user
-
β input (username:<string>, community_name: <string>, subscribe: <bool>)
-
β output {success:<bool>}