Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/FengDeng/RxGitHubAPI
a GitHubAPI base on Stream by RxSwift
https://github.com/FengDeng/RxGitHubAPI
Last synced: about 2 months ago
JSON representation
a GitHubAPI base on Stream by RxSwift
- Host: GitHub
- URL: https://github.com/FengDeng/RxGitHubAPI
- Owner: FengDeng
- License: apache-2.0
- Created: 2016-01-29T04:49:38.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-18T05:26:03.000Z (over 7 years ago)
- Last Synced: 2024-08-04T01:11:50.561Z (5 months ago)
- Language: Swift
- Homepage:
- Size: 368 KB
- Stars: 73
- Watchers: 3
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rxswift - RxGitHubAPI
README
# RxGitHubAPI
a GitHubAPI base Stream by RxSwift[中文博客](http://fengdeng.github.io/)
[微博私信我](http://weibo.com/FengDeng1219)
#Trending
RxGitHubAPI.trendRepos(YYSince.Daily, language: "swift").subscribeNext { (repos) -> Void in
print(repos)
}----------
#Search
users
RxGitHubAPI.searchUsers("tangqiaoboy").subscribeNext { (searchuser) -> Void in
print((searchuser))
}
reposRxGitHubAPI.searchRepos("RxSwift").subscribeNext { (searchRepo) -> Void in
print(searchRepo)
}
----------#YYUser
1. 登录
RxGitHubUserName = ""
RxGitHubPassword = ""
RxGitHubAPI.yy_user.subscribeNext { (user) -> Void in
print(user)
}2. 获取一个用户
RxGitHubAPI.yy_user("tangqiaoboy").subscribeNext { (user) -> Void in
print(user)
}
3. follow或者unFollow这个用户RxGitHubAPI.yy_user("tangqiaoboy").subscribeNext { (user) -> Void in
print(user)
user.action_follow.subscribeNext({ (isSuccess) -> Void in
if isSuccess{
print("follow成功")
}
})
user.action_unFollow.subscribeNext({ (isSuccess) -> Void in
if isSuccess{
print("follow成功")
}
})
}
4. 获取这个用户的所有repo
RxGitHubAPI.yy_user("tangqiaoboy").subscribeNext { (user) -> Void in
print(user)
user.yy_repos.subscribeNext({ (repos) -> Void in
print(repos)
})
}
5. 获取这个用户following的用户,或者following这个用户的用户RxGitHubAPI.yy_user("tangqiaoboy").subscribeNext { (user) -> Void in
print(user)
user.yy_followers.subscribeNext({ (users) -> Void in
print(users)
})
user.yy_followings.subscribeNext({ (users) -> Void in
print(users)
})
}
6. 获取这个用户Star的repoRxGitHubAPI.yy_user("tangqiaoboy").subscribeNext { (user) -> Void in
print(user)
user.yy_starred.subscribeNext({ (repos) -> Void in
print(repos)
})
}
----------
#YYRepository自己去看接口吧,在`YYRepository+Rx.swift`里面
----------
#Cocoapods
暂时不提供使用,等到功能完善后会支持cocoapods的