All Projects → serhii-londar → Githubapi

serhii-londar / Githubapi

Licence: mit
Swift implementation of Github REST API v3

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Githubapi

Symfony Flex Backend
Symfony Flex REST API template project
Stars: ✭ 214 (+289.09%)
Mutual labels:  api, rest-api, rest, hacktoberfest
Javacord
An easy to use multithreaded library for creating Discord bots in Java.
Stars: ✭ 368 (+569.09%)
Mutual labels:  api, rest-api, rest, hacktoberfest
Vulcain
Fast and idiomatic client-driven REST APIs.
Stars: ✭ 3,190 (+5700%)
Mutual labels:  api, rest-api, rest, hacktoberfest
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+19234.55%)
Mutual labels:  api, rest-api, rest, hacktoberfest
Bookmarks.dev
Bookmarks and Code Snippets Manager for Developers & Co
Stars: ✭ 218 (+296.36%)
Mutual labels:  api, rest-api, rest, hacktoberfest
Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+6169.09%)
Mutual labels:  api, rest-api, rest, hacktoberfest
Json Api Dart
JSON:API client for Dart/Flutter
Stars: ✭ 53 (-3.64%)
Mutual labels:  api, rest-api, rest, hacktoberfest
Goa
Design-based APIs and microservices in Go
Stars: ✭ 4,493 (+8069.09%)
Mutual labels:  api, rest, hacktoberfest
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+38589.09%)
Mutual labels:  rest-api, rest, hacktoberfest
Github3.py
Hi, I'm a library for interacting with GItHub's REST API in a convenient and ergonomic way. I work on Python 3.6+.
Stars: ✭ 1,029 (+1770.91%)
Mutual labels:  rest-api, rest, github-api
Generator Http Fake Backend
Yeoman generator for building a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 49 (-10.91%)
Mutual labels:  api, rest-api, rest
Udash Core
Scala framework for building beautiful and maintainable web applications.
Stars: ✭ 405 (+636.36%)
Mutual labels:  rest-api, rest, hacktoberfest
Loopback Next
LoopBack makes it easy to build modern API applications that require complex integrations.
Stars: ✭ 3,972 (+7121.82%)
Mutual labels:  api, rest, hacktoberfest
Spyke
Interact with REST services in an ActiveRecord-like manner
Stars: ✭ 591 (+974.55%)
Mutual labels:  api, rest-api, rest
Apidoc
RESTful API 文档生成工具,支持 Go、Java、Swift、JavaScript、Rust、PHP、Python、Typescript、Kotlin 和 Ruby 等大部分语言。
Stars: ✭ 785 (+1327.27%)
Mutual labels:  api, rest-api, rest
Networking
⚡️ Elegantly connect to a REST JSON Api. URLSession + Combine + Decodable + Generics = <3
Stars: ✭ 499 (+807.27%)
Mutual labels:  api, rest-api, rest
Vuex Rest Api
A utility to simplify the use of REST APIs with Vuex
Stars: ✭ 365 (+563.64%)
Mutual labels:  api, rest, hacktoberfest
Rest Api Nodejs Mongodb
A boilerplate for REST API Development with Node.js, Express, and MongoDB
Stars: ✭ 672 (+1121.82%)
Mutual labels:  api, rest-api, rest
Swagger Editor
Swagger Editor
Stars: ✭ 7,365 (+13290.91%)
Mutual labels:  rest-api, rest, hacktoberfest
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+1410.91%)
Mutual labels:  api, rest-api, hacktoberfest

GitHubAPI

CI Status Version License Platform

Swift implementation of GitHub REST api v3. Library support Swift 4.2. Work is in progress.

Currently supported:

TODO:

Example Usage

Authentication

Basic Authentication

This lib support Basic Authentication with login/password:

let authentication = BasicAuthentication(username: "username", password: "password")
UserAPI(authentication: authentication).getUser { (response, error) in
	if let response = response {
		print(response)
	} else {
		print(error ?? "")
	}
}

OAuth2 Token (sent in a header)

If you generate personal access token or receive access token from OAuth2, you can use it with AccessTokenAuthentication:

let authentication = AccessTokenAuthentication(access_token: "token")
UserAPI(authentication: authentication).getUser(username: "serhii-londar") { (response, error) in
	if let response = response {
		print(response)
	} else {
		print(error ?? "")
	}
}

OAuth2 Token (sent as a parameter)

If you generate personal access token or receive access token from OAuth2, you can use it in next way:

let authentication = TokenAuthentication(token: "token")
UserAPI(authentication: authentication).getAllUsers(since: "1") { (reposne, error) in
	if let response = response {
		print(response)
	} else {
		print(error ?? "")
	}
}

Issues API

Create Issue:

let issue = Issue(title: "New Issue")
IssuesAPI(authentication: AccessTokenAuthentication(access_token: "access_token")).createIssue(owner: "owner", repository: "repository", issue: issue) { (response, error) in
	if let response = response {

	} else {
		print(error ?? "")
	}
}

Update Issue:

let issue = Issue(title: "Updated Issue")
        IssuesAPI(authentication: AccessTokenAuthentication(access_token: "access_token")).updateIssue(owner: "owner", repository: "repository", number: number, issue: issue) { (response, error) in
	if let response = response {

	} else {
		print(error ?? "")
	}
}

Repositories API

Get list of all repositories of user:

RepositoriesAPI(authentication: AccessTokenAuthentication(access_token: "access_token")).repositories(user: "user", type: .all) { (response, error) in
	if let response = response {

	} else {
		print(error ?? "")
	}
}

Search API

Seart all repositories which contains qwer in name:

SearchAPI().searchRepositories(q: "qwer", page: 1, per_page: 100) { (response, error) in
	if let response = response {

	} else {
		print(error ?? "")
	}
}

Example Application

To run the example project, clone the repo, and run pod install from the Example directory first.

Example project contains example app with list of all user's GitHub notification.

Requirements

  • Xcode 9 or later
  • iOS 9.0 or later
  • macOS 10.12 or later
  • Ubuntu 16.04 or later
  • Swift 4.0 or later

Installation

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

pod 'GithubAPI'

Author

Serhii Londar, [email protected]

License

GitHubAPI 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].