UpdateNotification Documentation Beta

Class Update​Feed​Manager

public class UpdateFeedManager

The UpdateFeedManager class contains functions to create and edit update feeds.

Initializers

init(feed​Url:​)

public init(feedUrl: URL)

Initialize the UpdateFeedManager class.

Parameters

feed​Url URL

The URL to the JSON update feed, used when loading an already existing feed.

Methods

load()

public func load()

Load an existing feed from the URL the class was initialized with.

create(website:​)

public func create(website: URL)

Create a new feed

Parameters

website URL

The main website URL

clear​Items()

public func clearItems()

Clear all itmes in the feed.

add(item:​)

public func add(item: Item)

Add an item to the update feed.

Parameters

item Item

The item to be added

write(to:​)

public func write(to location: URL)

Write the feed to disk

Parameters

location URL

The local URL where the feed is written to

log​Feed()

public func logFeed()

Log the feed and its content to the console