NilStack / Github.swift

Unofficial Github API client in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Github.swift

CI Status Version Carthage Compatible License Platform

Description

  • A Swift implementation of octokit.objc, using RxSwift and Tailor
  • Hope it is useful to you, as it is to me
  • Try to use more Swift style

Usage

  • User: identify a user
  • Server: identify server (Github or Github Enterprise)
  • Client: make request. If associated with a valid token, it is considered authenticated client
let user = User(rawLogin: "onmyway133", server: Server.dotComServer)
let client = Client(unauthenticatedUser: user)

client.fetchUserStarredRepositories().subscribeNext { repositories in
  print(repositories)
}

Make your own request using RequestDescriptor

let requestDescriptor = RequestDescriptor().then {
  $0.path = "repos/\(owner)/\(name)"
  $0.etag = "12345"  
}

return enqueue(requestDescriptor).map {
  return Parser.one($0.jsonArray)
}

Features

Metadata

  • Fetch server metadata

Sign in

  • Native flow
  • OAuth flow

User

  • Follow
  • Unfollow
  • Fetch user info

Repository

  • Fetch repositories
  • Create repository
  • Fetch commits
  • Fetch pull requests
  • Fetch issues
  • Watch

Pull request (in progress)

  • Make pull requests

Organization (in progress)

  • Fetch organizations
  • Fetch teams

Search (in progress)

  • Search repositories

Event (in progress)

  • Fetch user events

Gists (in progress)

  • Fetch gists

Git (in progress)

  • Create tree
  • Create blob
  • Create commit

Activity (in progress)

  • Star
  • Unstar

Notification

  • Fetch notifications

Installation

GithubSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Github.swift'

GithubSwift is also available through Carthage. To install just write into your Cartfile:

github "onmyway133/Github.swift"

Author

Khoa Pham, onmyway133@gmail.com

Contributing

We would love you to contribute to GithubSwift, check the CONTRIBUTING file for more info.

License

GithubSwift is available under the MIT license. See the LICENSE file for more info.

About

Unofficial Github API client in Swift

License:Other


Languages

Language:Swift 99.3%Language:Ruby 0.7%