|
1 | 1 | ## Easy Notes API
|
2 | 2 | ### In English
|
3 |
| -The data is sent in XML markup. The text of the note is converted into a sequence of characters - "x" + character number. For example, the word "Hello" is converted to "x72x101x108x108x111". |
| 3 | +The Windows app is a notes server. The data is sent in XML markup. The text of the note is converted into a sequence of characters - "x" + character number. For example, the word "Hello" is converted to "x72x101x108x108x111". |
4 | 4 |
|
5 |
| -| Request | Request type | Description | Example | |
| 5 | +| Request | Request type | Description | Value / Status | |
6 | 6 | | ------------- | ------------- | ------------- | ------------- |
|
7 |
| -| `IP:PORT/api/getnotes` | GET | Getting a list with identifiers (Unix timestamp) and note times (Unix timestamp with UTC offset). | <notes><br><note id="1553287432" datetime="1553301832"></note><br><note id="1553287428" datetime="1553301828"></note><br></notes> | |
8 |
| -| `IP:PORT/api/getfullnotes` | GET | Get a list with ids, notes and note times. | <notes><br><note id="1553285632" datetime="1553300032">x72x101x108x108x111</note><br><note id="1553248570" datetime="1553262970">x72x101x108x108x111</note><br></notes> | |
9 |
| -| `IP:PORT/api/getnote=ID` | GET | Getting a note by id. | <notes><br><note id="1553285632" datetime="1553300032">x72x101x108x108x111</note><br></notes> | |
10 |
| -| `IP:PORT/api/syncnotes` | POST | Sending created and modified notes by the client. | <actions><br><insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert><br><update id="1553248570" datetime="1553262970">x72x101x108x108x111</update><br><delete id="1553248570"></delete><br></actions> | |
| 7 | +| `IP:PORT/api/connecttest` | GET | Getting the server availability status. | "ok" | |
| 8 | +| `IP:PORT/api/auth?id=DEVICE` | GET | Request to add to the list of authorized devices. | "auth:ok" or "auth:denied" | |
| 9 | +| `IP:PORT/api/notes?id=DEVICE` | GET | Getting a list with identifiers (Unix timestamp), notes and note times (Unix timestamp with UTC offset). | <notes><br><note id="1553285632" datetime="1553300032">x72x101x108x108x111</note><br><note id="1553248570" datetime="1553262970">x72x101x108x108x111</note><br></notes> | |
| 10 | +| `IP:PORT/api/actions?id=DEVICE` | GET | Receiving new changes from the server. | <actions><br><insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert><br><update id="1553248570" datetime="1553262970">x72x101x108x108x111</update><br><delete id="1553248570"></delete><br></actions> | |
| 11 | +| `IP:PORT/api/received?id=DEVICE` | GET | Confirmation of receiving new changes from the server. | "ok" or "auth:denied" | |
| 12 | +| `IP:PORT/api/syncnotes?id=DEVICE` | POST | Sending new changes from the client. | <actions><br><insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert><br><update id="1553248570" datetime="1553262970">x72x101x108x108x111</update><br><delete id="1553248570"></delete><br></actions> | |
11 | 13 |
|
12 |
| -IP is the address running the application for Windows. The default port is 735. |
| 14 | +`IP` is the address running the application for Windows. The default port is 735. `DEVICE` is the name of the device, for example `Android_g9N1z5S2` or `iOS_rM5s3Gz7`. |
13 | 15 |
|
14 | 16 | ### На русском
|
15 |
| -Данные пересылаются в XML разметке. Текст заметки конвертируется в последовательность символов - "x" + номер символа. Например, слово "Привет" конвертируется в "x1055x1088x1080x1074x1077x1090". |
| 17 | +Приложение для Windows является сервером заметок. Данные пересылаются в XML разметке. Текст заметки конвертируется в последовательность символов - "x" + номер символа. Например, слово "Привет" конвертируется в "x1055x1088x1080x1074x1077x1090". |
16 | 18 |
|
17 |
| -| Запрос | Тип запроса | Описание | Пример | |
| 19 | +| Запрос | Тип запроса | Описание | Значение / Статус | |
18 | 20 | | ------------- | ------------- | ------------- | ------------- |
|
19 |
| -| `IP:PORT/api/getnotes` | GET | Получение списка с идентификаторами (Unix timestamp) и времен заметки (Unix timestamp с UTC смещением). | <notes><br><note id="1553287432" datetime="1553301832"></note><br><note id="1553287428" datetime="1553301828"></note><br></notes> | |
20 |
| -| `IP:PORT/api/getfullnotes` | GET | Получение списка с идентификаторами, заметками и времен заметок. | <notes><br><note id="1553285632" datetime="1553300032">x72x101x108x108x111</note><br><note id="1553248570" datetime="1553262970">x72x101x108x108x111</note><br></notes> | |
21 |
| -| `IP:PORT/api/getnote=ID` | GET | Получение содержимого заметки по идентификатору. | <notes><br><note id="1553285632" datetime="1553300032">x72x101x108x108x111</note><br></notes> | |
22 |
| -| `IP:PORT/api/syncnotes` | POST | Отправка созданных и измененных клиентом заметок. | <actions><br><insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert><br><update id="1553248570" datetime="1553262970">x72x101x108x108x111</update><br><delete id="1553248570"></delete><br></actions> | |
| 21 | +| `IP:PORT/api/connecttest` | GET | Получение статуса доступности сервера. | "ok" | |
| 22 | +| `IP:PORT/api/auth?id=DEVICE` | GET | Запрос на добавление в список авторизованных устройств. | "auth:ok" или "auth:denied" | |
| 23 | +| `IP:PORT/api/notes?id=DEVICE` | GET | Получение списка с идентификаторами (Unix timestamp), заметками и временем заметок (Unix timestamp с UTC смещением). | <notes><br><note id="1553285632" datetime="1553300032">x72x101x108x108x111</note><br><note id="1553248570" datetime="1553262970">x72x101x108x108x111</note><br></notes> | |
| 24 | +| `IP:PORT/api/actions?id=DEVICE` | GET | Получение новых изменений от сервера. | <actions><br><insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert><br><update id="1553248570" datetime="1553262970">x72x101x108x108x111</update><br><delete id="1553248570"></delete><br></actions> | |
| 25 | +| `IP:PORT/api/received?id=DEVICE` | GET | Подтверждение получения новых изменений от сервера. | "ok" или "auth:denied" | |
| 26 | +| `IP:PORT/api/syncnotes?id=DEVICE` | POST | Отправка новых изменений от клиента. | <actions><br><insert id="1553285632" datetime="1553300032">x72x101x108x108x111</insert><br><update id="1553248570" datetime="1553262970">x72x101x108x108x111</update><br><delete id="1553248570"></delete><br></actions> | |
23 | 27 |
|
24 |
| -IP это адрес, с запущенным приложением для Windows. Порт по умолчанию 735. |
| 28 | +`IP` это адрес, с запущенным приложением для Windows. Порт по умолчанию 735. `DEVICE` это название устройства, например, `Android_g9N1z5S2` или `iOS_rM5s3Gz7`. |
0 commit comments