GithubRepo 0.4.0

GithubRepo 0.4.0

Markus维护。



  • 作者:
  • Markus Chow

GithubRepo

欢迎使用GithubRepo!

此GithubRepo框架是演示通过用户输入仓库名称来查询GitHub仓库的API调用实现的示例。

此框架使用Objective-c编写,并需要依赖AFNetworking。

[![CI 状态](https://img.shields.io/travis/Markus Chow/GithubRepo.svg?style=flat)](https://travis-ci.org/Markus Chow/GithubRepo) Version License Platform

示例

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

需求

  • 此框架目前支持Xcode 11.6 (Objective-c)。
  • 使用CocoaPod在Xcode中处理依赖关系

安装

GitHubRepo可以通过CocoaPods获取。要安装,请在Podfile中添加以下行

pod 'GithubRepo'

使用

GitHubRepoFetcher

GitHubRepoFetcher创建并管理了一个基于GitHub仓库搜索API调用的AFURLSessionManager对象。该调用需要接收正确的Git用户名。

创建GitHub仓库API调用

[GithubRepoFetcher fetchRepo:@"repositoryUserName" onSuccess:^(id  _Nullable response) {
	if (response) {
		NSLog(@"response : %@", response);
	}
} onError:^(NSError * _Nullable error) {
	if (error) {
		NSLog(@"error : %@", error.localizedDescription);
	}
}];

作者

Markus Chow, [email protected]

许可

GitHubRepo遵循MIT许可协议。有关更多信息,请参阅LICENSE文件。