aboutsummaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-11-29 11:17:14 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-11-29 11:27:58 -0800
commit69aa650203087ad6365fcd6769a49bdf327e9efb (patch)
tree2b74ede78da683a9442da0851718d981614a37b7 /api
parent8028cc764ff7d53370b64ec8110cbcdece787432 (diff)
Add the possibility to add rules during feed creation
Diffstat (limited to 'api')
-rw-r--r--api/feed.go2
-rw-r--r--api/payload.go14
2 files changed, 10 insertions, 6 deletions
diff --git a/api/feed.go b/api/feed.go
index fdc1560..bcf5884 100644
--- a/api/feed.go
+++ b/api/feed.go
@@ -49,6 +49,8 @@ func (h *handler) createFeed(w http.ResponseWriter, r *http.Request) {
feedInfo.UserAgent,
feedInfo.Username,
feedInfo.Password,
+ feedInfo.ScraperRules,
+ feedInfo.RewriteRules,
)
if err != nil {
json.ServerError(w, r, err)
diff --git a/api/payload.go b/api/payload.go
index 011a516..becbb47 100644
--- a/api/payload.go
+++ b/api/payload.go
@@ -24,12 +24,14 @@ type entriesResponse struct {
}
type feedCreation struct {
- FeedURL string `json:"feed_url"`
- CategoryID int64 `json:"category_id"`
- UserAgent string `json:"user_agent"`
- Username string `json:"username"`
- Password string `json:"password"`
- Crawler bool `json:"crawler"`
+ FeedURL string `json:"feed_url"`
+ CategoryID int64 `json:"category_id"`
+ UserAgent string `json:"user_agent"`
+ Username string `json:"username"`
+ Password string `json:"password"`
+ Crawler bool `json:"crawler"`
+ ScraperRules string `json:"scraper_rules"`
+ RewriteRules string `json:"rewrite_rules"`
}
type subscriptionDiscovery struct {