-
Notifications
You must be signed in to change notification settings - Fork 0
API Dokumenation
Request : /crosstag/v1.0/static_tagin_page
Method : GET
Params : None
Return : render_template('static_tagin.html',
title='Static tagins')
Description : Renders a static page for the tagin view. Shows the person who tags in (This is polled from staticData.js)
Request : /crosstag/v1.0/get_events_from_user_by_tag_id/<tag_id>
Method : GET
Params : tag_id, STRING
Return : {'value'} , OBJECT
Description : Gets all tags last month for specified user.
Request :/crosstag/v1.0/tagevent/<tag_id>
Method : GET
Params : tag_id, STRING
Return : STRING
Description : Creates Tagevent, DetailedTagevent and increments the tagcounter in the User with the tagID and commits this to the database. The string returned is a concatenated string containing a timestamp and the tagged ID.
Request : /crosstag/v1.0/static_top_five
Method : GET
Params : tag_id, STRING
Return : {'name', 'amount'} JSON-OBJ in numeric array
Description : This function creates an array containing objects containing a name and amount of tags of the fetched Users. It returns it in JSON format.
Request : /crosstag/v1.0/last_tagin
Method : GET
Params : None
Return : Tagevent in JSON format
Description : This function fetches the last Tagevent from the database, creates an object and returns in JSON format.
Request : /crosstag/v1.0/get_user_data_tag/<tag_id>
Method : GET
Params : tag_id string
Return : User in JSON format
Description : This function fetches a User with specified tag_id and returns it in a JSON format.
Request : /all_tagevents
Method : GET
Params : None
Return : HTML page containing array of Tagevents
Description : Template engine renders an HTML page listing all Tagevents from newest to oldest.
Request : /all_users/
Method : GET
Params : filter, STRING
Return : HTML page containing array of Users
Description : Template engine renders an HTML page listing all Users with a filter option on the status of the Users.
Request : /crosstag/v1.0/get_user_data_tag_dict/<tag_id>
Method : GET
Params : tag_id, STRING
Return : User, OBJECT
Description : Returns a user based on tag_id, in form of a dictionary
Request : /last_tagins
Method : GET
Params : None
Return : HTML page containing last 10 Tagevents.
Description : Renders an html page listning the last tagevents stored in the db.
Request : /crosstag/v1.0/remove_user/
Method : POST
Params : index INTEGER
Return : Redirects to html page listing users.
Description : Deletes the specified User locally (not on fortnox).
Request : /tagevent
Method : GET
Params : None
Return : Returns html page listing Tagevents
Description : Returns html page listing Tagevents
Request : /tagevent
Method : GET
Params : None
Return : Returns html page listing Tagevents
Description : Returns html page listing Tagevents
Request : /crosstag/v1.0/remove_user/
Method : POST
Params : index INTEGER
Return : Redirects to html page listing users.
Description : Deletes the specified User locally (not on fortnox).
Request : /tagin_user
Method : POST/GET
Params : None
Return : Renders html page for with form for tagging in user (mainly for testing)
Description : Reads the form posted on tagin_user.html (if posted) and stores statistics in the normal way. This page is for manually testing tagging in.
Request : /search_user
Method : GET/POST
Params : None
Return : Renders html page with form to search for users.
Description : Renders html page, if form is posted it will also list Users by the filter you've searched for.
Request : /crosstag/v1.0/link_user_to-Last_tag/<user_id>
Method : POST/GET
Params : user_id INTEGER
Return : Redirects you to the /edit_user for the User id you've provided.
Description : Fetches the last tagevent from the database and links the tag's ID to the User with the provided user_id.
Request : /crosstag/v1.0/get_tag/<user_index>
Method : GET
Params : user_index INTEGER
Return : tag_id STRING
Description : Gets the tag_id of the provided user and returns the tag_id as a string.
Request : /crosstag/v1.0/get_tagevents_user_dict/<user_index>
Method : GET
Params : user_index INTEGER
Return : array of 20 Tagevents
Description : Gets the 20 last tagevents by the provided User. Returns array of dictionaries containing the information.
Request : /inactive_check
Method : GET
Params : None
Return : Renders html page containing list of inactive members.
Description : Renders html page containing list of inactive members.
Request : /debt_delete_confirm/
Method : GET
Params : id INTEGER
Return : Redirects user to debt_delete_confirm for confirmation
Description :Redirects user to debt_delete_confirm for confirmation
Request : /debt_delete_confirm/debt_delete/
Method : POST
Params : id INTEGER
Return : Redirects user to user_page
Description : Deletes a debt with the provided debt id, redirects user to the user_page.
Request : /debt_check
Method : GET
Params : None
Return : Renders html page listing users that have debts and their currents debts
Description :Renders html page listing users that have debts and their currents debts
Request : /debt_create/<id_test>
Method : GET/POST
Params : id_test INTEGER
Return : Renders html page listing User with specified ID or renders html page for creating debts, depending on method.
Description : Renders html page listing User with specified ID or renders html page for creating debts, depending on method.
Request : /statistics
Method : GET
Params : None
Return : Renders html page statistics.html
Description : Generates statistics and saves to array, renders html page listing the different statistics collected.
Request : /<_month>/_day>/<_year>
Method : GET
Params : _month, STRING, _day STRING, year STRING
Return : Renders html page with statistics from provided date
Description : Generates statistics and renders html page with statistics from provided date
Request : /crosstag/v1.0/fortnox
Method : GET
Params : None
Return : Redirects to index page
Description : Calls a function that syncs the database with the user data from fortnox, then redirects you to index page.
Request : /fortnox/<fortnox_id>
Method : GET
Params : fortnox_id INTEGER
Return : Renders html page listing user with specified fortnox id.
Description : Renders html page listing user with specified fortnox id.
Request : /user_page/<user_index>
Method : GET/POST
Params : user_index INTEGER (optional parameter, default None)
Return : Renders html page listing user with specified user_index.
Description : Renders html page listing user with specified user_index. User data as dictionary.
Request : /crosstag/v1.0/clear_tagcounter
Method : GET
Params : user_index INTEGER (optional parameter, default None)
Return : Renders html page listing user with specified user_index.
Description : Renders html page listing user with specified user_index. User data as dictionary.
Request : /crosstag/v1.0/send_latecomers_email
Method : GET
Params : None
Return : None
Description : Activated through CRON, every monday at 10 it sends an email to the recipients containing active users that have not tagged in for two weeks.
Request : /edit_user/<user_index>
Method : GET/POST
Params : user_index INTEGER
Return : If method GET it renders edit_user html page, if form is posted it will return user_page listing the user with specified index
Description : If method GET it renders edit_user html page, if form is posted it will return user_page listing the user with specified index