onmyway133 / Github.swift
Licence: other
Unofficial GitHub API client in Swift
Stars: ✭ 171
Programming Languages
swift
15916 projects
Projects that are alternatives of or similar to Github.swift
Springboot Elasticsearch
基于springboot的web项目,通过elasticsearch提供的Java API 进行查询操作.
Stars: ✭ 169 (-1.17%)
Mutual labels: api
Whatsapp Web.js
A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
Stars: ✭ 4,103 (+2299.42%)
Mutual labels: api
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (+1135.09%)
Mutual labels: api
Openrouteservice Py
🐍 The Python API to consume openrouteservice(s) painlessly!
Stars: ✭ 168 (-1.75%)
Mutual labels: api
Movies Restapi
RESTful API to manage movies written in Go and uses MongoDB as storage
Stars: ✭ 168 (-1.75%)
Mutual labels: api
Curlx
◼️ Supercharge curl with history, collections and more.
Stars: ✭ 169 (-1.17%)
Mutual labels: api
Devicemanager.api
Web API Framework demonstrates scalable, multitenant, architecture and allows building its own solution in the minutes. Uses: Entity Framework, UnitOfWork, Repository patterns. Wrapped in Docker, Kubernetes
Stars: ✭ 168 (-1.75%)
Mutual labels: api
Js Client
A Open-API derived JS + Node.js API client for Netlify
Stars: ✭ 170 (-0.58%)
Mutual labels: api
Json Schema To Openapi Schema
A little NodeJS package to convert JSON Schema to OpenAPI Schema Objects
Stars: ✭ 168 (-1.75%)
Mutual labels: api
Swifthub
GitHub iOS client in RxSwift and MVVM-C clean architecture
Stars: ✭ 2,330 (+1262.57%)
Mutual labels: rxswift
Github.swift
❤️ Support my apps ❤️
- Push Hero - pure Swift native macOS application to test push notifications
- PastePal - Pasteboard, note and shortcut manager
- Quick Check - smart todo manager
- Alias - App and file shortcut manager
- My other apps
❤️❤️😇😍🤘❤️❤️
Description
- A Swift implementation of octokit.objc, using RxSwift, Alamofire and Tailor
- Try to use more Swift style as possible
- Note: you may consider using GraphQL https://developer.github.com/v4/
Usage
Client
- 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 _ =
Client.signInUsingWebBrowser(Server.dotComServer, scopes: [.Repository])
.flatMap { client in
return client.fetchUserRepositories()
}.subscribeNext { repositories in
repositories.forEach { print($0.name)
}
}
Request Descriptor
Make your own request using RequestDescriptor
, using syntax from Construction
let requestDescriptor: RequestDescriptor = construct {
$0.path = "repos/\(owner)/\(name)"
$0.etag = "12345"
$0.offset = 2
$0.perPage = 50
$0.parameters["param"] = "value"
$0.headers["header"] = "value"
$0.method = .PUT
}
return enqueue(requestDescriptor).map {
return Parser.one($0)
}
Pagination
- The
subscribe
gets called many times if there is pagination
client
.fetchUserRepositories()
.subscribeNext { repositories in
// This gets called many times depending pagination
repositories.forEach { print($0.name)
}
- Use
toArray
if we wantsubscribe
to be called once with all the values collected
client
.fetchUserRepositories()
.toArray()
.subscribeNext { repositories: [[Repository]] in
repositories.flatMap({$0}).forEach { print($0.name)
}
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
- Make pull requests
Issue
- Create issue
- Fetch issues
Organization
- Fetch organizations
- Fetch teams
Search
- Search repositories
Event
- Fetch user events
Gists
- Fetch gists
Git
- Create tree
- Create blob
- Create commit
Activity
- Star
- Unstar
Notification
- Fetch notifications
Installation
GithubSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'GithubSwift'
GithubSwift is also available through Carthage. To install just write into your Cartfile:
github "onmyway133/Github.swift"
Author
Khoa Pham, [email protected]
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].