This api is based on mu core 1.0.8, and allow us to desing and create a mu web page with so many languajes, also finally we can create with out limitsInstallation
Receive the name of an account where the update will be made
Configuration-First we will install node. Can visit this pageYou must be registered to see linksThere are a guide and documentatioof how install node.
-Then we create a folder and Unzip or download from git repository -then open out terminal and navigate to the folder created
Now that all the modules are installed, all the modules are necessary for the operation of the API.Code:cd Dektop/ cd folderApi npm install
Routes- /ApiFolder/config/index.js and open with a code editor(visual studio, atom, notepad++, etc)Then for start the api, navigate to the api folder and open a terminal and write this command:Code:module.exports = { sequelize : { dialect: 'mssql', database: 'Name of DB', username: 'sa', //User of our db password: 'pass DB', host: 'HOST' //host where our database works, if it is working locally. Put localhost }, server : { host: '0.0.0.0', //0.0.0.0 listen all ip's of the server, else our ip of our server or localhost if it is working locally port: 3001 //Port of the api }}
Code:node index.js
LINKSGET- AccountsPOST- CUENTAS/users/:userId --> Receive the name of an account by url and return that account. /users --> List all accounts of our server.PUT-Account/users --> Create a account, body params are:Code:{ "memb___id": STRING, "memb__pwd": STRING, "memb_name": STRING, "sno__numb": NUMBER, "post_code": NUMBER null, "addr_info": null, "addr_deta": null, "tel__numb": NUMBER null, "phon_numb": NUMBER null, "mail_addr": STRING, "fpas_ques": null, "fpas_answ": null, "job__code": null, "appl_days": DATE, "modi_days": DATE, "out__days": DATE, "true_days": DATE, "mail_chek": NUMBER, "bloc_code": NUMBER, "ctl1_code": NUMBER, "cspoints": NUMBER, "VipType": NUMBER, "VipStart": DATE, "VipDays": NUMBER, "JoinDate": DATE, "confirmed": NUMBER, "SecretAnswer": STRING, "activation_id": STRING, "Gender": NUMBER, "Country": NUMBER, "SecretQuestion": NUMBER, "Vip": NUMBER, "InicioVIP": NUMBER, "FinVIP": NUMBER, "VipTipe": NUMBER, "VipDate": NUMBER, "VipINF": NUMBER, "admincp": NUMBER, "credits": NUMBER, "credits2": NUMBER, "m_Grand_Resets": NUMBER, "acc_ip": NUMBER, "mvc_vip_date": DATE, "acc_info_text": STRING, "msponsor_limit": NUMBER, "msponsor_date": DATE, "mvc_flag": null, "smtp_block": NUMBER, "scrable_word": null, "scrable_original": null, "scrable_wrong": NUMBER, "scrable_level": NUMBER}
DELETE-Account/users/:userId --> Receive the name of an account where the update will be made, body params are:
Code:memb__pwd: STRING, memb_name: STRING, mail_addr: STRING, SecretAnswer: STRING
GET-Characters/users/:userId -->Receive an account name to be deleted by url.PUT-Characters/characters/:userId --> Receive by url the name of an account and return all its characters./characters/ --> List all characters of our server./charactersByPj/jId -->Receive by url the name of a character and return that character.DELETE-Character/characters/jId --> Receive by url the name of a character to edit and body params are:Code:{ "Name": STRING, "cLevel": NUMBER, "LevelUpPoint": NUMBER, "Experience": NUMBER, "Strength": NUMBER, "Dexterity": NUMBER, "Vitality": NUMBER, "Energy": NUMBER, "Money": NUMBER, "MapNumber": NUMBER, "MapPosX": NUMBER, "MapPosY": NUMBER, "PkCount": NUMBER, "PkLevel": NUMBER, "CtlCode": NUMBER, "FruitPoint": NUMBER, "RESETS": NUMBER, "Married": NUMBER, "MarryName": STRING, "mlNextExp": NUMBER, "WinDuels": NUMBER, "LoseDuels": NUMBER, "Grand_Resets": NUMBER}
/characters/jId -->Get the name of a pj by url and delete it..
You must be registered to see links
Receive the name of an account where the update will be made