Skip to content

Commit 9642f97

Browse files
paskalumputun
authored andcommitted
Cleanup Readme from removed endpoints, clarify one endpoint comment
1 parent aece0cd commit 9642f97

File tree

2 files changed

+1
-66
lines changed

2 files changed

+1
-66
lines changed

README.md

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -23,71 +23,6 @@
2323
GET /api/content/v1/parser?token=secret&url=http://aa.com/blah - extract content (emulate Readability API parse call)
2424
POST /api/v1/extract {url: http://aa.com/blah} - extract content
2525

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-
9126
## Development
9227

9328
### Running tests

backend/rest/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (s *Server) extractArticle(w http.ResponseWriter, r *http.Request) {
181181
render.JSON(w, r, &res)
182182
}
183183

184-
// emulate readability API parse - https://www.readability.com/api/content/v1/parser?token=%s&url=%s
184+
// extractArticleEmulateReadability emulates readability API parse - https://www.readability.com/api/content/v1/parser?token=%s&url=%s
185185
// if token is not set for application, it won't be checked
186186
func (s *Server) extractArticleEmulateReadability(w http.ResponseWriter, r *http.Request) {
187187
token := r.URL.Query().Get("token")

0 commit comments

Comments
 (0)