• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

owainhunt/UAGithubEngine: Objective-C Wrapper for the Github API

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

owainhunt/UAGithubEngine

开源软件地址:

https://github.com/owainhunt/UAGithubEngine

开源编程语言:

Objective-C 100.0%

开源软件介绍:

UAGithubEngine

by Owain R Hunt

UAGithubEngine is a wrapper around the Github API. Check out the API documentation for full details of what the API can do.

UAGithubEngine is compatible with Mac OS X 10.7 and above, and iOS 5.0.

Note

The master branch is built on version 3 of the API, and uses up-to-date technologies such as blocks and ARC. Version 1 of UAGE, found in the branch v1, was built on version 2 of the API, and may be more suited to your uses if you need to support earlier versions of OS X or iOS. This branch is no longer under active development.

How do I use it?

  • UAGithubEngine is available from CocoaPods. Just add the following to your Podfile:

    dependency 'UAGithubEngine'

    Then run pod install.

  • The easiest way to use the engine is with the framework - build and link against the UAGithubEngine framework, and #import <UAGithubEngine/UAGithubEngine.h> where you want to use the framework.

  • If you don't fancy using CocoaPods or the framework, either copy across all the files in the 'UAGithubEngine' group from the UAGithubEngine project into your app's project, or add the entire project to your workspace. Use #import "UAGithubEngine.h" where you want to use the engine.

  • Instantiate an engine, passing a username and password. If you want to receive notifications when reachability status changes (UAGithubReachabilityStatusDidChangeNotification), pass YES as the final argument.

  • Call some methods.

Code speaks louder than words.

UAGithubEngine *engine = [[UAGithubEngine alloc] initWithUsername:@"aUser" password:@"aPassword" withReachability:YES];

[engine repositoriesWithSuccess:^(id response) { 
		NSLog(@"Got an array of repos: %@", obj); 
	} failure:^(NSError *error) { 
		NSLog(@"Oops: %@", error);
	}];  

[engine user:@"this_guy" isCollaboratorForRepository:@"UAGithubEngine" success:^(BOOL collaborates) { 
		NSLog(@"%d", collaborates); 
	} failure:^(NSError *error){ 
		NSLog(@"D'oh: %@", error); 
	}];

Any questions, comments, improvements and so on, either open an issue, find me on Twitter (@orhunt) or send me an email ([email protected]).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap