~gjabell/mfn

ref: 0.1.0 mfn/notify.go -rw-r--r-- 532 bytes View raw
d0ec1c94Galen Abell Update README 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package main

import (
	"time"

	mf "miniflux.app/client"
)

type Notifier interface {
	Notify(*mf.Entry) error
}

func Test(n Notifier) error {
	e := &mf.Entry{
		ID:         0,
		UserID:     0,
		FeedID:     0,
		Status:     "unread",
		Hash:       "deadbeef",
		Title:      "Test Entry",
		URL:        "https://miniflux.app",
		Date:       time.Now(),
		Content:    "This is a test miniflux entry",
		Author:     "Author",
		Starred:    false,
		Enclosures: make([]*mf.Enclosure, 0),
		Feed:       nil,
	}

	return n.Notify(e)
}