51

GitHub - Sepicat/Straycat: Sepicat Data Parser - 获取到更多的 Github 信息

 6 years ago
source link: https://github.com/Sepicat/Straycat
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Straycat

让你获取到更多的 Github 信息。

简介

由于 GitHub 在官方的接口中未提供 TrendingContributions 等相关接口,所以打算使用前端 Parser 来爬取对应的信息。StraycatSepicat 的开源组件,用来获取 GitHub 接口中无法获取到的信息。

进度

依赖库

  • Alamofire version 4.5+
  • Kanna version 4.0+
  • SwiftSoup version 1.6.3+

载入方式

(包管理工具暂时仅支持 CocoaPods,且版本号需要 1.1 以上)

use_frameworks!

pod 'Straycat', :git => 'https://github.com/Sepicat/Straycat.git'

执行 pod install 的时候会自动安装依赖库,若原始项目中有相同的依赖,若无版本冲突也可。

使用

Trending 获取

import Straycat

// 使用 Kanna 解析,获取全部语言当日 Trending Developers
StrayTrending.shared.fetchDev(language: "all", time: .today, tool: .kanna) { 
    (success, devs) in
    guard success, let devs = devs else {
        // 爬取失败
        return
    }
    // 成功处理
}

Sepicat 组件

欢迎支持已经上架的个人应用 Sepicat - 致力于打造最 Geekful 的 GitHub 客户端。

68747470733a2f2f6c696e6b6d616b65722e6974756e65732e6170706c652e636f6d2f6173736574732f7368617265642f6261646765732f7a682d6368742f61707073746f72652d6c72672d353133646661396365613262313065666230396362663338643863623833346133616563373731653431643664666332373331393961343438343230623931632e737667

数据源提供

倘若有更好的 GitHub 数据源,欢迎在 issue 中提供。

GNU General Public License v3.0

Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK