|
23 | 23 | GET /api/content/v1/parser?token=secret&url=http://aa.com/blah - extract content (emulate Readability API parse call)
|
24 | 24 | POST /api/v1/extract {url: http://aa.com/blah} - extract content
|
25 | 25 |
|
26 |
| - POST /api/v1/rule {"domain": "aa.com", content="#content p"} - add/update custom rule |
27 |
| - DELETE /api/v1/rule/:id - delete (disable) rule by ID |
28 |
| - GET /api/v1/rule?url=http://blah.com/aaa - get rule for url |
29 |
| - GET /api/v1/rules - get all rules, enabled and disabled |
30 |
| - |
31 |
| -#### testing |
32 |
| - |
33 |
| -on master (dev version) prefix /ureadability should be added |
34 |
| - |
35 |
| -<details><summary>HTTP calls</summary> |
36 |
| - |
37 |
| - http POST "master.radio-t.com:8780/ureadability/api/v1/rule" domain=blah.ukeeper.com content="#content p" enabled:=true |
38 |
| - HTTP/1.1 200 OK |
39 |
| - Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With |
40 |
| - Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS |
41 |
| - Access-Control-Allow-Origin: * |
42 |
| - Application-Name: ureadability |
43 |
| - Connection: keep-alive |
44 |
| - Content-Length: 110 |
45 |
| - Content-Type: application/json; charset=utf-8 |
46 |
| - Date: Mon, 11 Jan 2016 02:38:13 GMT |
47 |
| - Org: Umputun |
48 |
| - Server: nginx/1.9.7 |
49 |
| - |
50 |
| - { |
51 |
| - "content": "#content p", |
52 |
| - "domain": "blah.ukeeper.com", |
53 |
| - "enabled": true, |
54 |
| - "id": "56931595daa6d301279ba801", |
55 |
| - "user": "" |
56 |
| - } |
57 |
| - |
58 |
| - |
59 |
| - http "master.radio-t.com:8780/ureadability/api/v1/rules" |
60 |
| - HTTP/1.1 200 OK |
61 |
| - Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With |
62 |
| - Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS |
63 |
| - Access-Control-Allow-Origin: * |
64 |
| - Application-Name: ureadability |
65 |
| - Connection: keep-alive |
66 |
| - Content-Length: 219 |
67 |
| - Content-Type: application/json; charset=utf-8 |
68 |
| - Date: Mon, 11 Jan 2016 02:38:34 GMT |
69 |
| - Org: Umputun |
70 |
| - Server: nginx/1.9.7 |
71 |
| - |
72 |
| - [ |
73 |
| - { |
74 |
| - "content": "#content p", |
75 |
| - "domain": "p.ukeeper.com", |
76 |
| - "enabled": true, |
77 |
| - "id": "5693123fdaa6d301279ba800", |
78 |
| - "user": "" |
79 |
| - }, |
80 |
| - { |
81 |
| - "content": "#content p", |
82 |
| - "domain": "blah.ukeeper.com", |
83 |
| - "enabled": true, |
84 |
| - "id": "56931595daa6d301279ba801", |
85 |
| - "user": "" |
86 |
| - } |
87 |
| - ] |
88 |
| - |
89 |
| -</details> |
90 |
| - |
91 | 26 | ## Development
|
92 | 27 |
|
93 | 28 | ### Running tests
|
|
0 commit comments