Api-functions » History » Version 1
Никита Давыдовский, 03/18/2013 09:57 PM
| 1 | 1 | Никита Давыдовский | h1. Функции API |
|---|---|---|---|
| 2 | |||
| 3 | {{TOC}} |
||
| 4 | |||
| 5 | h2. registerUser |
||
| 6 | |||
| 7 | *Request* |
||
| 8 | <pre> |
||
| 9 | { |
||
| 10 | "email": {"type":"string"}, |
||
| 11 | "login": {"type":"string"}, |
||
| 12 | "password":{"type":"string"} |
||
| 13 | } |
||
| 14 | </pre> |
||
| 15 | |||
| 16 | *Response* |
||
| 17 | <pre> |
||
| 18 | { |
||
| 19 | "user_id": {"type":"string"} |
||
| 20 | } |
||
| 21 | </pre> |
||
| 22 | |||
| 23 | h2. authorization |
||
| 24 | |||
| 25 | *Request* |
||
| 26 | <pre> |
||
| 27 | { |
||
| 28 | "login": {"type":"string"}, |
||
| 29 | "password":{"type":"string"} |
||
| 30 | } |
||
| 31 | </pre> |
||
| 32 | |||
| 33 | *Response* |
||
| 34 | <pre> |
||
| 35 | { |
||
| 36 | "token": {"type":"string"} |
||
| 37 | } |
||
| 38 | </pre> |
||
| 39 | |||
| 40 | h2. getPoints |
||
| 41 | |||
| 42 | *Request* |
||
| 43 | <pre> |
||
| 44 | { |
||
| 45 | "latitude": {"type":"number"}, |
||
| 46 | "longitude":{"type":"number"}, |
||
| 47 | "radius":{"type":"number"}, |
||
| 48 | "token":{"type":"string"} |
||
| 49 | } |
||
| 50 | </pre> |
||
| 51 | |||
| 52 | *Response* |
||
| 53 | <pre> |
||
| 54 | { |
||
| 55 | "points": {"type":"array"} |
||
| 56 | } |
||
| 57 | </pre> |
||
| 58 | |||
| 59 | h2. getRoutes |
||
| 60 | |||
| 61 | *Request* |
||
| 62 | <pre> |
||
| 63 | { |
||
| 64 | "points": {"type":"array"}, |
||
| 65 | "token":{"type":"string"} |
||
| 66 | } |
||
| 67 | </pre> |
||
| 68 | |||
| 69 | *Response* |
||
| 70 | <pre> |
||
| 71 | { |
||
| 72 | "routes": {"type":"array"} |
||
| 73 | } |
||
| 74 | </pre> |
||
| 75 | |||
| 76 | h2. addPoint |
||
| 77 | |||
| 78 | *Request* |
||
| 79 | <pre> |
||
| 80 | { |
||
| 81 | "title": {"type":"string"}, |
||
| 82 | "url": {"type":"string"}, |
||
| 83 | "latitude": {"type":"number"}, |
||
| 84 | "longitude":{"type":"number"}, |
||
| 85 | "token":{"type":"string"} |
||
| 86 | } |
||
| 87 | </pre> |
||
| 88 | |||
| 89 | *Response* |
||
| 90 | <pre> |
||
| 91 | { |
||
| 92 | "point_id": {"type":"number"} |
||
| 93 | } |
||
| 94 | </pre> |
||
| 95 | |||
| 96 | h2. addRoute |
||
| 97 | |||
| 98 | *Request* |
||
| 99 | <pre> |
||
| 100 | { |
||
| 101 | "title": {"type":"string"}, |
||
| 102 | "url": {"type":"string"}, |
||
| 103 | "points": {"type":"array"}, |
||
| 104 | "token":{"type":"string"} |
||
| 105 | } |
||
| 106 | </pre> |
||
| 107 | |||
| 108 | *Response* |
||
| 109 | <pre> |
||
| 110 | { |
||
| 111 | "route_id": {"type":"number"} |
||
| 112 | } |
||
| 113 | </pre> |
||
| 114 | |||
| 115 | h2. search |
||
| 116 | |||
| 117 | *Request* |
||
| 118 | <pre> |
||
| 119 | { |
||
| 120 | "title": {"type":"string"}, |
||
| 121 | "token":{"type":"string"} |
||
| 122 | } |
||
| 123 | </pre> |
||
| 124 | |||
| 125 | *Response* |
||
| 126 | <pre> |
||
| 127 | { |
||
| 128 | "points": {"type":"array"}, |
||
| 129 | "routes": {"type":"array"} |
||
| 130 | } |
||
| 131 | </pre> |
||
| 132 | |||
| 133 | h2. logout |
||
| 134 | |||
| 135 | *Request* |
||
| 136 | <pre> |
||
| 137 | { |
||
| 138 | "user_id": {"type":"number"}, |
||
| 139 | "token":{"type":"string"} |
||
| 140 | } |
||
| 141 | </pre> |
||
| 142 | |||
| 143 | *Response* |
||
| 144 | <pre> |
||
| 145 | { |
||
| 146 | } |
||
| 147 | </pre> |