-
Notifications
You must be signed in to change notification settings - Fork 0
Server API URLs
Ali Shirmohammadi edited this page Jul 7, 2019
·
14 revisions
URL | required parameters | optional parameters | success response data |
---|---|---|---|
/login |
username, password | logged in user | |
/sign_up |
username, password | signed up user | |
/profile |
token | logged in user |
URL | required parameters | optional parameters | success response data |
---|---|---|---|
/shop/search |
token | search, type | list of cards as a HashMap |
/shop/buy |
token, card_name | logged in user after buying card | |
/shop/sell |
token, card_name | logged in user after selling card |
URL | required parameters | optional parameters | success response data |
---|---|---|---|
/collection/search |
token | search, type | list of cards as set |
/collection/create_deck |
token, name | search, type | created deck |
/collection/add_card_to_deck |
token, deck_name, card_name | deck after adding card | |
/collection/get_deck |
token, deck_name | requested deck | |
/collection/remove_deck |
token, deck_name | logged in user | |
/collection/remove_card_from_deck |
token, deck_name, card_name | deck after removing card | |
/collection/is_valid |
token, deck_name | true or false | |
/collection/set_main_deck |
token, deck_name | main deck after setting |
URL | required parameters | optional parameters | success response data |
---|---|---|---|
/battle/request |
token, match_mode | null or playing match | |
/battle/cancel_request |
token | null | |
/battle/select_card |
token, match_token, card_id | playing match | |
/battle/get_match |
token, match_token | requested match | |
/battle/insert |
token, match_token, x, y | playing match | |
/battle/move |
token, match_token, x, y | playing match | |
/battle/insert |
token, match_token, x, y | playing match | |
/battle/attack |
token, match_token, x, y | -1 for error, 1 for attack without counter attack, 2 for attack with counter attack |
- All of api functions must be called with GET method.
- The result of api functions is a "Response" Object.
- All of api functions except login and sign_up need token for user authentication.