Coder Social home page Coder Social logo

rxgithubapi's Introduction

RxGitHubAPI

a GitHubAPI base Stream by RxSwift

中文博客

微博私信我

#Trending

RxGitHubAPI.trendRepos(YYSince.Daily, language: "swift").subscribeNext { (repos) -> Void in
	print(repos)
}

#Search

users

	RxGitHubAPI.searchUsers("tangqiaoboy").subscribeNext { (searchuser) -> Void in
        print((searchuser))
    }

repos

RxGitHubAPI.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的repo

     RxGitHubAPI.yy_user("tangqiaoboy").subscribeNext { (user) -> Void in
         print(user)
         user.yy_starred.subscribeNext({ (repos) -> Void in
             print(repos)
         })
     }
    

#YYRepository

自己去看接口吧,在YYRepository+Rx.swift里面


#Cocoapods

暂时不提供使用,等到功能完善后会支持cocoapods的

rxgithubapi's People

Contributors

fengdeng avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.