Feeder 0.1.0

Feeder 0.1.0

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2015年12月
SPM支持 SPM

tnantoka 维护。



Feeder 0.1.0

Feeder

使用方法

Feeder.shared.find("https://github.com/blog") { page, error in
    print(error) // nil

    print(page.title) // The GitHub Blog · GitHub
    print(page.href) // https://github.com/blog

    print(page.feeds.count) // 3

    print(page.feeds[0]) // Feed(format: .Atom, href: "https://github.com/blog.atom", title: "The GitHub Blog’s featured posts")
    print(page.feeds[1]) // Feed(format: .Atom: "https://github.com/blog/all.atom", title: "The GitHub Blog: All posts")
    print(page.feeds[2]) // Feed(format: .Atom: "https://github.com/blog/broadcasts.atom", title: "The GitHub Blog: Broadcasts only")
}

Feeder.shared.parse("https://github.com/blog.atom") { entries, error in
    print(error) // nil

    print(entries.count) // 15

    print(entries[0]) // Entry(title: "A new look for repositories", href: "https://github.com/blog/2085-a-new-look-for-repositories", summary: "<p>Repositories on GitHub are about to get a brand new look...")
    print(entries[1]) // Entry(title: "Introducing: 3\" Octocat figurine", href: "https://github.com/blog/2084-introducing-3-octocat-figurine", summary: "<p>From the makers of the 5\" Octocat figurine comes the adorably small 3\" Octocat figurine...")
}

要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install

要求

安装

Feeder 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod "Feeder"

作者

tnantoka

许可证

Feeder 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。