Automatically generated by fhq-server.
- Version: v0.2.47
- Date: 2022-01-01 07:29:32
Include script dist/freehackquest-libclient-web-js.js
Example connect:
fhq.bind('server', function(data) { console.log('server', data)})
fhq.bind('notify', function(data) { console.log('notify', data)})
fhq.bind('chat', function(data) { console.log('chat', data)})
fhq.bind('connected', function(data) { console.log('connected', data)})
fhq.bind('reconnecting', function(data) { console.log('reconnecting', data)})
fhq.bind('disconnected', function(data) { console.log('disconnected', data)})
fhq.bind('broken', function(data) { console.log('broken', data)})
fhq.bind('userdata', function(data) { console.log('userdata', data)})
fhq.bind('connected', function(data) { console.log('connected', data)})
// connect
fhq.init({'baseUrl': 'ws://localhost:1234/'})
// disconnect
fhq.deinit()
addhint - Method add hint to quest
Method add hint to quest
Access: unauthorized - no, user - no, admin - yes
- questid - integer, required; quest id
- hint - string, required; hint text
fhq.addhint({
"questid": 0,
"hint": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
answerlist - Return user answers list
Return user answers list
Access: unauthorized - no, user - no, admin - yes
- page - integer, required; Number of page
- onpage - integer, required; How much rows on page
- questid - integer, optional; Filter for questid
- userid - integer, optional; Filter for userid
fhq.answerlist({
"page": 0,
"onpage": 10,
"questid": 0,
"userid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chat_latest_messages - Method will be send chat message and it sent to another users
Method will be send chat message and it sent to another users
Access: unauthorized - yes, user - yes, admin - yes
fhq.chat_latest_messages({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chat_send_message - Method will be send chat message and it sent to another users
Method will be send chat message and it sent to another users
Access: unauthorized - no, user - yes, admin - yes
- type - string, required; Type
- message - string, required; Message
fhq.chat_send_message({
"type": "",
"message": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_add_to_black_list - Add user to black list
Add user to black list
Access: unauthorized - no, user - yes, admin - yes
fhq.chats_add_to_black_list({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_add_to_chat - Add user to some chat
Add user to some chat
Access: unauthorized - no, user - yes, admin - yes
fhq.chats_add_to_chat({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_change_owner - Change owner of the chat
Change owner of the chat
Access: unauthorized - no, user - yes, admin - yes
fhq.chats_change_owner({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_create_group_chat - Create group chat
Create group chat
Access: unauthorized - no, user - yes, admin - yes
fhq.chats_create_group_chat({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_delete_from_black_list - Delete user from black list
Delete user from black list
Access: unauthorized - no, user - yes, admin - yes
fhq.chats_delete_from_black_list({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_delete_from_chat - Delete user from chat
Delete user from chat
Access: unauthorized - no, user - yes, admin - yes
fhq.chats_delete_from_chat({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_dialogs_list - Show list of dialogs
Show list of dialogs
Access: unauthorized - no, user - yes, admin - yes
fhq.chats_dialogs_list({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_message_delete - Delete message from chat
Delete message from chat
Access: unauthorized - no, user - yes, admin - yes
- message_id - integer, required; Message id for remove
fhq.chats_message_delete({
"message_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_message_edit - Edit message
Edit message
Access: unauthorized - no, user - yes, admin - yes
- message_id - integer, required; Message id
- message_new - string, required; New message
fhq.chats_message_edit({
"message_id": 0,
"message_new": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_message_read - Get all messages in chat
Get all messages in chat
Access: unauthorized - no, user - yes, admin - yes
- chat - string, required; Chat for reading messages
fhq.chats_message_read({
"chat": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
chats_message_send - Method will be send chat message and it sent to another users
Method will be send chat message and it sent to another users
Access: unauthorized - no, user - yes, admin - yes
- chat - string, required; Chat for sending a message
- message - string, required; Message
fhq.chats_message_send({
"chat": "",
"message": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_add_record - Adds a new article with the specified name, content, and id.
Adds a new article with the specified name, content, and id.
Access: unauthorized - no, user - no, admin - yes
- parentid - integer, required; pareintid for classbook article
- name - string, required; name of article
- content - string, required; content of article
- uuid - string, optional; uuid of article
- ordered - integer, optional; order of article
fhq.classbook_add_record({
"parentid": 0,
"name": "",
"content": "",
"uuid": "",
"ordered": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_delete_record - Delete a article with a given classbookid
Delete a article with a given classbookid
Access: unauthorized - no, user - no, admin - yes
- classbookid - integer, required; id for classbook article
fhq.classbook_delete_record({
"classbookid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_export - Export classbook's articles to html or markdown, optionally in zip archive.
Export classbook's articles to html or markdown, optionally in zip archive.
Access: unauthorized - no, user - yes, admin - yes
- output - string, required; The output file format
- lang - string, required; The output file format
- zip - boolean, optional; Zipping the output
fhq.classbook_export({
"output": "",
"lang": "",
"zip": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_info - Return name and content, langs, path classbook article with a given id
Return name and content, langs, path classbook article with a given id
Access: unauthorized - yes, user - yes, admin - yes
- classbookid - integer, required; id for the classbook article
- lang - string, optional; Set lang for the article
fhq.classbook_info({
"classbookid": 0,
"lang": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_list - Return list of classbook articles
Return list of classbook articles
Access: unauthorized - yes, user - yes, admin - yes
- parentid - integer, required; parentid for classbook articles
- lang - string, optional; lang for classbook articles
- search - string, optional; Search string for classbook articles
fhq.classbook_list({
"parentid": 0,
"lang": "",
"search": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_localization_add_record - Add a new article localization for the English version
Add a new article localization for the English version
Access: unauthorized - no, user - no, admin - yes
- classbookid - integer, required; Classbookid for article localization
- lang - string, required; Language
- name - string, required; Article name
- content - string, required; The content of the article
fhq.classbook_localization_add_record({
"classbookid": 0,
"lang": "",
"name": "",
"content": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_localization_delete_record - Delete an article localization
Delete an article localization
Access: unauthorized - no, user - no, admin - yes
- classbook_localizationid - integer, required; Localization id
fhq.classbook_localization_delete_record({
"classbook_localizationid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_localization_info - Find and display localization for an article by classbookid
Find and display localization for an article by classbookid
Access: unauthorized - no, user - no, admin - yes
- classbook_localizationid - integer, required; Localization id
fhq.classbook_localization_info({
"classbook_localizationid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_localization_update_record - Update table with localization by classbookid
Update table with localization by classbookid
Access: unauthorized - no, user - no, admin - yes
- classbook_localizationid - integer, required; Localization id
- name - string, required; Article name
- content - string, required; The content of the article
fhq.classbook_localization_update_record({
"classbook_localizationid": 0,
"name": "",
"content": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_propasal_approve - Approve updating requests
Approve updating requests
Access: unauthorized - no, user - no, admin - yes
- classbook_proposal_id - integer, required; Proposal id
fhq.classbook_propasal_approve({
"classbook_proposal_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_propasal_prepare_merge_record - Prepare to merge updating requests
Prepare to merge updating requests
Access: unauthorized - no, user - no, admin - yes
- classbook_proposal_id - integer, required; Proposal id
fhq.classbook_propasal_prepare_merge_record({
"classbook_proposal_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_propasal_update - Approve updating requests
Approve updating requests
Access: unauthorized - no, user - no, admin - yes
- classbook_proposal_id - integer, required; Proposal id
- content - string, required; new content
fhq.classbook_propasal_update({
"classbook_proposal_id": 0,
"content": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_proposal_add_record - Propose an update of article
Propose an update of article
Access: unauthorized - no, user - yes, admin - yes
- classbookid - integer, required; Classbookid for an article
- lang - string, required; Language
- name - string, required; Article name
- content - string, required; The content of the article
fhq.classbook_proposal_add_record({
"classbookid": 0,
"lang": "",
"name": "",
"content": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_proposal_delete_record - Delete a proposal of updating an article
Delete a proposal of updating an article
Access: unauthorized - no, user - yes, admin - yes
- classbook_proposal_id - integer, required; Proposal id
fhq.classbook_proposal_delete_record({
"classbook_proposal_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_proposal_info - Find and display all proposal data by id
Find and display all proposal data by id
Access: unauthorized - no, user - yes, admin - yes
- classbook_proposal_id - integer, required; Proposal id
fhq.classbook_proposal_info({
"classbook_proposal_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_proposal_list - Display list of proposals by classbookid
Display list of proposals by classbookid
Access: unauthorized - no, user - yes, admin - yes
- classbookid - integer, required; Classbookid for an article
- lang - string, optional; Language
fhq.classbook_proposal_list({
"classbookid": 0,
"lang": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
classbook_update_record - Update a article with a given classbookid
Update a article with a given classbookid
Access: unauthorized - no, user - no, admin - yes
- classbookid - integer, required; id for classbook article
- name - string, optional; name for classbook article
- content - string, optional; content for classbook article
- ordered - integer, optional; ordered for classbook article
- parentid - integer, optional; parentid for classbook article
fhq.classbook_update_record({
"classbookid": 0,
"name": "",
"content": "",
"ordered": 0,
"parentid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
createpublicevent - Create the public event
Create the public event
Access: unauthorized - no, user - no, admin - yes
- type - string, required; Type of event
- message - string, required; Message
fhq.createpublicevent({
"type": "",
"message": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
createquest - Method will be create new quest
Method will be create new quest
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; Global Identificator of the quest
- gameid - integer, required; Which game included this quest
- name - string, required; Name of the quest
- text - string, required; Description of the quest
- score - integer, required; How much append to user score after solve quest by them
- author - string, required; Author of the quest
- subject - string, required; Subject must be one from types
- answer - string, required; Answer for the quest
- answer_format - string, required; Answer format for the quest
- state - string, required; State of the quest
- description_state - string, required; You can add some descriptions for quest state
- copyright - string, optional; You can add some copyright information
fhq.createquest({
"uuid": "",
"gameid": 0,
"name": "",
"text": "",
"score": 0,
"author": "",
"subject": "",
"answer": "",
"answer_format": "",
"state": "",
"description_state": "",
"copyright": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
deletehint - Method for delete hint from quest
Method for delete hint from quest
Access: unauthorized - no, user - no, admin - yes
- hintid - integer, required; hint id
fhq.deletehint({
"hintid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
deletepublicevent - Delete public event
Delete public event
Access: unauthorized - no, user - no, admin - yes
- eventid - integer, required; Event ID
fhq.deletepublicevent({
"eventid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
feedback_add - Create the feedback
Create the feedback
Access: unauthorized - yes, user - yes, admin - yes
- from - string, required; From user
- text - string, required; Text of feedback
- type - string, required; Type of feedback
fhq.feedback_add({
"from": "",
"text": "",
"type": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
game_create - Create the game
Create the game
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; Global Identificator of the Game
- name - string, required; Name of the Game
- description - string, required; Description of the Game
- state - string, required; State of the game
- form - string, required; Form of the game
- type - string, required; Type of the game
- date_start - string, required; Date start
- date_stop - string, required; Date stop
- date_restart - string, required; Date restart
- organizators - string, required; Organizators
fhq.game_create({
"uuid": "",
"name": "",
"description": "",
"state": "",
"form": "",
"type": "",
"date_start": "",
"date_stop": "",
"date_restart": "",
"organizators": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
game_delete - Remove game and all quests
Remove game and all quests
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; Global Identificator of the Game
- admin_password - string, required; Admin Password
fhq.game_delete({
"uuid": "",
"admin_password": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
game_export - Export the game
Export the game
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; Global Identificator of the Game
fhq.game_export({
"uuid": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
game_import - Import game
Import game
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; Global Identificator of the Game
fhq.game_import({
"uuid": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
game_info - Return game info
Return game info
Access: unauthorized - yes, user - yes, admin - yes
- uuid - string, required; Global Identificator of the Game
fhq.game_info({
"uuid": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
game_update - Update game info
Update game info
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; Global Identificator of the Game
- name - string, optional; Name of the Game
- description - string, optional; Description of the Game
- state - string, optional; State of the game
- form - string, optional; Form of the game
- type - string, optional; Type of the game
- date_start - string, optional; Date start
- date_stop - string, optional; Date stop
- date_restart - string, optional; Date restart
- organizators - string, optional; Organizators
fhq.game_update({
"uuid": "",
"name": "",
"description": "",
"state": "",
"form": "",
"type": "",
"date_start": "",
"date_stop": "",
"date_restart": "",
"organizators": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
game_update_logo - Update game logo
Update game logo
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; Global Identificator of the Game
- image_png_base64 - string, required; Image PNG in Base64
fhq.game_update_logo({
"uuid": "",
"image_png_base64": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
games.info - Return info about game by uuid
Return info about game by uuid
Access: unauthorized - yes, user - yes, admin - yes
- uuid - string, required; Global Identificator of the Game
fhq.games_info({
"uuid": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
games_list - Method returned list of games
Method returned list of games
Access: unauthorized - yes, user - yes, admin - yes
fhq.games_list({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
getmap - Returned coordinate list
Returned coordinate list
Access: unauthorized - yes, user - yes, admin - yes
fhq.getmap({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
getpublicevent - Return public event info by id
Return public event info by id
Access: unauthorized - yes, user - yes, admin - yes
- eventid - integer, required; Event id
fhq.getpublicevent({
"eventid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
hints - Return list of hints
Return list of hints
Access: unauthorized - yes, user - yes, admin - yes
- questid - integer, required; Quest id
fhq.hints({
"questid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
leaks.add - Method adds a leak
Method adds a leak
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; UUID of the leak
- game_uuid - string, required; UUID of the game
- name - string, required; Visible part of the content
- content - string, required; Content of the leak
- score - integer, required; Price of the leak
fhq.leaks_add({
"uuid": "",
"game_uuid": "",
"name": "",
"content": "",
"score": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
leaks.buy - Method buys a leak
Method buys a leak
Access: unauthorized - no, user - yes, admin - no
- id - integer, required; Leak id
fhq.leaks_buy({
"id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
leaks.delete - Method deletes a leak
Method deletes a leak
Access: unauthorized - no, user - no, admin - yes
- id - integer, required; Leak id
fhq.leaks_delete({
"id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
leaks.list - Method returns list of leaks
Method returns list of leaks
Access: unauthorized - yes, user - yes, admin - yes
- page - integer, required; Number of page
- onpage - integer, required; How much rows in one page
fhq.leaks_list({
"page": 0,
"onpage": 10
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
leaks.update - Method updates a leak
Method updates a leak
Access: unauthorized - no, user - no, admin - yes
- id - integer, required; Leak id
- name - string, optional; Visible part of the content
- content - string, optional; Content of the leak
- score - integer, optional; Price of the leak
fhq.leaks_update({
"id": 0,
"name": "",
"content": "",
"score": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
login - Method for login
Method for login
Access: unauthorized - yes, user - no, admin - no
- email - string, required; E-mail
- password - string, required; Password
fhq.login({
"email": "",
"password": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_containers - Any actions with the container. Actions: create, start, stop and delete container
Any actions with the container. Actions: create, start, stop and delete container
Access: unauthorized - no, user - no, admin - yes
- name - string, required; Container name
- action - string, required; Actions: create, start, stop and delete container
fhq.lxd_containers({
"name": "",
"action": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_exec - Exec command in the container with name.
Exec command in the container with name.
Access: unauthorized - no, user - no, admin - yes
- name - string, required; Container name
- command - string, required; Name of execution command
fhq.lxd_exec({
"name": "",
"command": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_file - Pull, push, delete file inside the container.
Pull, push, delete file inside the container.
Access: unauthorized - no, user - no, admin - yes
- name - string, required; Container name
- action - string, required; Action with files: pull, push or delete
- path - string, required; Path to file inside the container
fhq.lxd_file({
"name": "",
"action": "",
"path": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_import_container - Import container from json configuration.
Import container from json configuration.
Access: unauthorized - no, user - no, admin - yes
- config - string, required; Container's configuration in json dumped string.
fhq.lxd_import_container({
"config": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_import_service_from_zip - Import Service from zip.
Import Service from zip.
Access: unauthorized - no, user - no, admin - yes
- zip_file - string, required; Service's configuration in Base64 zip archive.
fhq.lxd_import_service_from_zip({
"zip_file": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_info - Get information about the orhestra, containers.
Get information about the orhestra, containers.
Access: unauthorized - no, user - no, admin - yes
- name - string, required; Container name
- get - string, optional; Requested information
fhq.lxd_info({
"name": "",
"get": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_list - Get information about all containers.
Get information about all containers.
Access: unauthorized - no, user - no, admin - yes
fhq.lxd_list({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_open_port - Opens the container port.
Opens the container port.
Access: unauthorized - no, user - no, admin - yes
- name - string, required; Container name
- port - integer, required; Number container port
- protocol - string, required; Protocol
fhq.lxd_open_port({
"name": "",
"port": 0,
"protocol": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
lxd_start_service - Start service.
Start service.
Access: unauthorized - no, user - no, admin - yes
- name - string, required; Service's name.
fhq.lxd_start_service({
"name": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
mail_info - This method Will be return info of mail
This method Will be return info of mail
Access: unauthorized - no, user - no, admin - yes
fhq.mail_info({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
mail_send - Mail Send
Mail Send
Access: unauthorized - no, user - no, admin - yes
- to - string, required; E-mail of the recipient
- subject - string, required; Subject of the message
- body - string, required; Body of the message
fhq.mail_send({
"to": "",
"subject": "",
"body": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
mails_list - Mails list
Mails list
Access: unauthorized - no, user - no, admin - yes
- filter_email - string, optional; Filter by email
- filter_subject - string, optional; Filter by subject
- filter_message - string, optional; Filter by message
- onpage - integer, optional; On page
- page - integer, optional; page
fhq.mails_list({
"filter_email": "",
"filter_subject": "",
"filter_message": "",
"onpage": 10,
"page": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
public_info - Method return public information about server
Method return public information about server
Access: unauthorized - yes, user - yes, admin - yes
fhq.public_info({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
publiceventslist - Return list of public events
Return list of public events
Access: unauthorized - yes, user - yes, admin - yes
- page - integer, required; Number of page
- onpage - integer, required; How much rows in one page
- type - string, optional; Filter by type events
- search - string, optional; Filter by message event
fhq.publiceventslist({
"page": 0,
"onpage": 10,
"type": "",
"search": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quest - Update the quest info
Update the quest info
Access: unauthorized - yes, user - yes, admin - yes
- questid - integer, required; Quest ID
fhq.quest({
"questid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quest_delete - Method for delete quest
Method for delete quest
Access: unauthorized - no, user - no, admin - yes
- questid - integer, required; Quest ID
fhq.quest_delete({
"questid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quest_pass - Quest pass
Quest pass
Access: unauthorized - no, user - yes, admin - yes
- questid - integer, required; Quest ID
- answer - string, required; Answer
fhq.quest_pass({
"questid": 0,
"answer": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quest_proposal - Add quest proposal
Add quest proposal
Access: unauthorized - no, user - yes, admin - yes
- gameid - integer, required; Which game included this quest
- name - string, required; Name of the quest
- text - string, required; Description of the quest
- score - integer, required; How much append to user score after solve quest by them
- author - string, required; Author of the quest
- subject - string, required; Subject must be one from types (look types)
- answer - string, required; Answer for the quest
- answer_format - string, required; Answer format for the quest
fhq.quest_proposal({
"gameid": 0,
"name": "",
"text": "",
"score": 0,
"author": "",
"subject": "",
"answer": "",
"answer_format": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quest_statistics - Mehtod will be return quest public statistics
Mehtod will be return quest public statistics
Access: unauthorized - yes, user - yes, admin - yes
- questid - integer, required; Quest ID
fhq.quest_statistics({
"questid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quest_update - Update the quest info
Update the quest info
Access: unauthorized - no, user - no, admin - yes
- questid - integer, required; Quest ID
- name - string, optional; Name of the quest
- gameid - integer, optional; Which game included this quest
- text - string, optional; Description of the quest
- score - integer, optional; How much append to user score after solve quest by them
- subject - string, optional; Subject must be one from types
- author - string, optional; Author of the quest
- answer - string, optional; Answer for the quest
- answer_format - string, optional; Answer format for the quest
- state - string, optional; State of the quest
- description_state - string, optional; You can update some descriptions for quest state
- copyright - string, optional; You can update copyright
fhq.quest_update({
"questid": 0,
"name": "",
"gameid": 0,
"text": "",
"score": 0,
"subject": "",
"author": "",
"answer": "",
"answer_format": "",
"state": "",
"description_state": "",
"copyright": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests - Method will be returned quest list
Method will be returned quest list
Access: unauthorized - yes, user - yes, admin - yes
- subject - string, optional; Filter by subject
- gameid - integer, optional; Filter by local gameid
- filter - string, optional; Filter by some text
fhq.quests({
"subject": "",
"gameid": 0,
"filter": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_files.delete - Delete file from quest
Delete file from quest
Access: unauthorized - no, user - no, admin - yes
- quest_uuid - string, required; Quest UUID
- file_id - integer, required; File ID
fhq.quests_files_delete({
"quest_uuid": "",
"file_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_files.upload - Update the quest
Update the quest
Access: unauthorized - no, user - no, admin - yes
- quest_uuid - string, required; Quest UUID
- file_base64 - string, required; Byte-array encoded in base64
- file_name - string, required; File name
fhq.quests_files_upload({
"quest_uuid": "",
"file_base64": "",
"file_name": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_proposal_list - Quests proposal list
Quests proposal list
Access: unauthorized - no, user - no, admin - yes
- page_size - integer, optional; Pgae size
- page_index - integer, optional; Page index
fhq.quests_proposal_list({
"page_size": 0,
"page_index": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_subjects - Method returned list of quests by subjects
Method returned list of quests by subjects
Access: unauthorized - yes, user - yes, admin - yes
fhq.quests_subjects({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_user_answer_list - Return user answers list
Return user answers list
Access: unauthorized - no, user - yes, admin - yes
- questid - integer, required; Filter for questid
fhq.quests_user_answer_list({
"questid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_writeups_delete - This method will be remove writeup
This method will be remove writeup
Access: unauthorized - no, user - no, admin - yes
- writeupid - integer, required; WriteUp ID
fhq.quests_writeups_delete({
"writeupid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_writeups_list - This method will be returned list of writeups by questid
This method will be returned list of writeups by questid
Access: unauthorized - yes, user - yes, admin - yes
- questid - integer, required; Quest ID
fhq.quests_writeups_list({
"questid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_writeups_proposal - This method will be add writeup from authorized user
This method will be add writeup from authorized user
Access: unauthorized - no, user - yes, admin - yes
- questid - integer, required; Quest ID
- writeup_link - string, required; Link to writeup (Must be start from https://www.youtube.com/watch?v=)
fhq.quests_writeups_proposal({
"questid": 0,
"writeup_link": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
quests_writeups_update - This method will be update writeup approve now
This method will be update writeup approve now
Access: unauthorized - no, user - no, admin - yes
- writeupid - integer, required; WriteUp ID
- approve - string, required; Approve value 1 or 0
fhq.quests_writeups_update({
"writeupid": 0,
"approve": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
registration - Method for registration
Method for registration
Access: unauthorized - yes, user - no, admin - no
- email - string, required; E-mail
- university - string, required; University
fhq.registration({
"email": "",
"university": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
scoreboard - Method return scoreboard
Method return scoreboard
Access: unauthorized - yes, user - yes, admin - yes
- page - integer, required; Number of page
- onpage - integer, required; How much rows in one page
fhq.scoreboard({
"page": 0,
"onpage": 10
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
server_api - This method Will be return list of all handlers
This method Will be return list of all handlers
Access: unauthorized - yes, user - yes, admin - yes
fhq.server_api({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
server_info - Return server private information
Return server private information
Access: unauthorized - no, user - no, admin - yes
fhq.server_info({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
server_settings - Return server settings
Return server settings
Access: unauthorized - no, user - no, admin - yes
fhq.server_settings({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
server_settings_update - Update server settings
Update server settings
Access: unauthorized - no, user - no, admin - yes
- name - string, required; name of setting
- value - string, required; value of setting
fhq.server_settings_update({
"name": "",
"value": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
token - Method for login by token
Method for login by token
Access: unauthorized - yes, user - no, admin - no
- token - string, required; Authorization token
fhq.token({
"token": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
updateuserlocation - This method will be try update user location by lastip
This method will be try update user location by lastip
Access: unauthorized - no, user - no, admin - yes
- userid - integer, required; User ID
fhq.updateuserlocation({
"userid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_add - Method for add new useful link
Method for add new useful link
Access: unauthorized - no, user - no, admin - yes
- url - string, required; URL
- description - string, required; Description
- author - string, required; Author
fhq.useful_links_add({
"url": "",
"description": "",
"author": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_clicked - Useful Links removed from favorite
Useful Links removed from favorite
Access: unauthorized - yes, user - yes, admin - yes
- useful_link_id - integer, required; Id of useful link
fhq.useful_links_clicked({
"useful_link_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_comment_add - Useful Links add comment
Useful Links add comment
Access: unauthorized - no, user - yes, admin - yes
- useful_link_id - integer, required; Id of useful link
- comment - string, required; Comment
fhq.useful_links_comment_add({
"useful_link_id": 0,
"comment": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_comment_delete - Useful Links remove comment
Useful Links remove comment
Access: unauthorized - no, user - yes, admin - yes
- useful_link_comment_id - integer, required; Comment Id for useful link
fhq.useful_links_comment_delete({
"useful_link_comment_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_comment_list - Useful Links list of comments
Useful Links list of comments
Access: unauthorized - yes, user - yes, admin - yes
- useful_link_id - integer, required; Id of useful link
fhq.useful_links_comment_list({
"useful_link_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_delete - Method for delete link by admin
Method for delete link by admin
Access: unauthorized - no, user - no, admin - yes
- useful_link_id - integer, required; Id of useful link
fhq.useful_links_delete({
"useful_link_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_list - Method will be return list of useful links
Method will be return list of useful links
Access: unauthorized - yes, user - yes, admin - yes
- filter - string, optional; Filter by word
- filter_by_tag - string, optional; Filter by tag
- page_index - integer, optional; Page Index
- page_size - integer, optional; Page Size (default 10)
fhq.useful_links_list({
"filter": "",
"filter_by_tag": "",
"page_index": 0,
"page_size": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_retrieve - Method for retrieve useful link
Method for retrieve useful link
Access: unauthorized - yes, user - yes, admin - yes
- useful_link_id - integer, required; Id of useful link
fhq.useful_links_retrieve({
"useful_link_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_tag_add - Useful Links add tag
Useful Links add tag
Access: unauthorized - no, user - no, admin - yes
- useful_link_id - integer, required; Id of useful link
- tag - string, required; Tag Value
fhq.useful_links_tag_add({
"useful_link_id": 0,
"tag": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_tag_delete - Useful Links remove tag
Useful Links remove tag
Access: unauthorized - no, user - no, admin - yes
- useful_link_id - integer, required; Useful Link Id
- tag - string, required; Tag Value
fhq.useful_links_tag_delete({
"useful_link_id": 0,
"tag": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_tag_list - Useful Links - List of tags
Useful Links - List of tags
Access: unauthorized - yes, user - yes, admin - yes
fhq.useful_links_tag_list({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_update - Method for update useful link
Method for update useful link
Access: unauthorized - no, user - no, admin - yes
- useful_link_id - integer, required; Id of useful link
- url - string, required; URL
- description - string, required; Description
- author - string, required; Author
fhq.useful_links_update({
"useful_link_id": 0,
"url": "",
"description": "",
"author": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_user_favorite - Useful Links add to favorite
Useful Links add to favorite
Access: unauthorized - no, user - yes, admin - yes
- useful_link_id - integer, required; Id of useful link
fhq.useful_links_user_favorite({
"useful_link_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_user_favorite_list - Useful Links list of favorite
Useful Links list of favorite
Access: unauthorized - no, user - yes, admin - yes
fhq.useful_links_user_favorite_list({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_user_propose - Useful Links propose link by user
Useful Links propose link by user
Access: unauthorized - no, user - yes, admin - yes
- url - string, required; Url
- description - string, required; Description
- tags - string, required; tags
fhq.useful_links_user_propose({
"url": "",
"description": "",
"tags": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_user_propose_approve - Useful Links Approve propose link by admin
Useful Links Approve propose link by admin
Access: unauthorized - no, user - no, admin - yes
- useful_links_propose_id - integer, required; Id of propose for useful_links
fhq.useful_links_user_propose_approve({
"useful_links_propose_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
useful_links_user_unfavorite - Useful Links removed from favorite
Useful Links removed from favorite
Access: unauthorized - no, user - yes, admin - yes
- useful_link_id - integer, required; Id of useful link
fhq.useful_links_user_unfavorite({
"useful_link_id": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
user - Return user info
Return user info
Access: unauthorized - yes, user - yes, admin - yes
- userid - integer, optional; Id of user
fhq.user({
"userid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
user_change_password - This method for change user password
This method for change user password
Access: unauthorized - no, user - yes, admin - yes
- password_old - string, required; Old password
- password_new - string, required; New password
fhq.user_change_password({
"password_old": "",
"password_new": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
user_reset_password - Method for reset password
Method for reset password
Access: unauthorized - yes, user - no, admin - no
- email - string, required; E-mail
fhq.user_reset_password({
"email": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
user_skills - Return user skills info
Return user skills info
Access: unauthorized - yes, user - yes, admin - yes
- userid - integer, required; Id of user
fhq.user_skills({
"userid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
user_update - Update user info
Update user info
Access: unauthorized - no, user - yes, admin - yes
- userid - integer, required; Id of user
- nick - string, optional; Nick of user
- university - string, optional; University of user
- about - string, optional; About of user
- country - string, optional; Country of user
fhq.user_update({
"userid": 0,
"nick": "",
"university": "",
"about": "",
"country": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users - Method return list of users
Method return list of users
Access: unauthorized - no, user - no, admin - yes
- filter_text - string, optional; Filter by user email or nick
- filter_role - string, optional; Filter by user role
- onpage - integer, optional; On Page
- page - integer, optional; Number of page
fhq.users({
"filter_text": "",
"filter_role": "",
"onpage": 10,
"page": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_add - Method for add new user
Method for add new user
Access: unauthorized - no, user - no, admin - yes
- uuid - string, required; User's Global Unique Identifier
- email - string, required; User's E-mail
- nick - string, required; User's nick
- password - string, required; Password
- role - string, required; User's role
- university - string, optional; University
fhq.users_add({
"uuid": "",
"email": "",
"nick": "",
"password": "",
"role": "",
"university": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_change_email - Method for email changing
Method for email changing
Access: unauthorized - no, user - yes, admin - yes
- email - string, required; New E-mail
- password - string, required; Password
fhq.users_change_email({
"email": "",
"password": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_change_email_verification - Method for email changing verification
Method for email changing verification
Access: unauthorized - no, user - yes, admin - yes
- code - string, required; Verification code
fhq.users_change_email_verification({
"code": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_delete - Method for deleting a user
Method for deleting a user
Access: unauthorized - no, user - no, admin - yes
- userid - integer, required; User's id
- password - string, required; Admin's password
fhq.users_delete({
"userid": 0,
"password": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_info - Return user info
Return user info
Access: unauthorized - yes, user - yes, admin - yes
- uuid - integer, required; Global unique identify of user
fhq.users_info({
"uuid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_registration - Method for registration
Method for registration
Access: unauthorized - yes, user - no, admin - no
- email - string, required; E-mail
fhq.users_registration({
"email": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_registration_verification - Method for registration verification
Method for registration verification
Access: unauthorized - yes, user - no, admin - no
- code - string, required; Verification code
fhq.users_registration_verification({
"code": ""
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_tokens - List of active user tokens
List of active user tokens
Access: unauthorized - no, user - yes, admin - yes
fhq.users_tokens({
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});
users_tokens_delete - Delete user tokens
Delete user tokens
Access: unauthorized - no, user - yes, admin - yes
- tokenid - integer, required; Token ID
fhq.users_tokens_delete({
"tokenid": 0
}).done(function(r) {
console.log('Success: ', r);
}).fail(function(err) {
console.error('Error:', err);
});