All Projects → spxrogers → Alamofire-Gloss

spxrogers / Alamofire-Gloss

Licence: MIT license
Gloss bindings for Alamofire

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to Alamofire-Gloss

Simpleapiclient Ios
A configurable api client based on Alamofire4 and RxSwift4 for iOS
Stars: ✭ 68 (+65.85%)
Mutual labels:  alamofire
Rxalamofire
RxSwift wrapper around the elegant HTTP networking in Swift Alamofire
Stars: ✭ 1,503 (+3565.85%)
Mutual labels:  alamofire
Moyasugar
🍯 Syntactic sugar for Moya
Stars: ✭ 165 (+302.44%)
Mutual labels:  alamofire
Networking
Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support
Stars: ✭ 1,269 (+2995.12%)
Mutual labels:  alamofire
Swift Zhi
iOS ZhiHuDaily client, implemented in Swift
Stars: ✭ 103 (+151.22%)
Mutual labels:  alamofire
Networkingexample
Write a Networking Layer in Swift 4 using Alamofire 5 and Codable
Stars: ✭ 119 (+190.24%)
Mutual labels:  alamofire
Evreflection
Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift
Stars: ✭ 954 (+2226.83%)
Mutual labels:  alamofire
Octobook
A simple Gitbook App that offers offline/online gitbooks reading.
Stars: ✭ 199 (+385.37%)
Mutual labels:  alamofire
Alamofire
Elegant HTTP Networking in Swift
Stars: ✭ 36,896 (+89890.24%)
Mutual labels:  alamofire
Wormholy
iOS network debugging, like a wizard 🧙‍♂️
Stars: ✭ 2,010 (+4802.44%)
Mutual labels:  alamofire
Rxmarvel
Playing around marvel public API with RxSwift, Argo, Alamofire
Stars: ✭ 86 (+109.76%)
Mutual labels:  alamofire
Solarnetwork
Elegant network abstraction layer in Swift.
Stars: ✭ 99 (+141.46%)
Mutual labels:  alamofire
Opensource
♨️ 分享GitHub优秀开源项目和主流开发使用的网站、解决问题方案收集以及学习网站或资料,涵盖了iOS, macOS X, Blockchain, Flutter, Weex, H5, Games, C++, Script等多方面的内容,其中iOS大致包涵以下内容:音视频;IM和直播;逆向开发;图像相关(OpenGL, Metal, GPUImage);内购(IAP), ApplePay和第三方支付;安全攻防和应用加固, 数据安全和算法;常用第三方库;导航栏和状态栏;侧边菜单;数据持久;蓝牙, 手势指纹面容ID解锁, 图片浏览器, 扫码, 下拉和上拉刷新, 指示器, Toast, Menu, Sensor, Privacy, WebView和进度条, 动画, 选择器, 搜索, 分享, 图片验证码, 设备相关信息, 广告, 高仿项目及Demo等。
Stars: ✭ 123 (+200%)
Mutual labels:  alamofire
Spotifykit
Swift client for Spotify Web API
Stars: ✭ 84 (+104.88%)
Mutual labels:  alamofire
Moya
Network abstraction layer written in Swift.
Stars: ✭ 13,607 (+33087.8%)
Mutual labels:  alamofire
Unboxedalamofire
[Deprecated] Alamofire + Unbox: the easiest way to download and decode JSON into swift objects.
Stars: ✭ 65 (+58.54%)
Mutual labels:  alamofire
Netclient Ios
Versatile HTTP Networking in Swift
Stars: ✭ 117 (+185.37%)
Mutual labels:  alamofire
WormholyForObjectiveC
Network debugging made easy,This network debugging tool is developed based on the swift version of Wormholy.
Stars: ✭ 21 (-48.78%)
Mutual labels:  alamofire
Currency Converter Swift3.0 Viper
Calculates money quick and easy way to see live foreign exchange rates (Based on swift 4.2, viper architecture and special thanks to https://github.com/hakanensari/fixer-io for conversion API)
Stars: ✭ 198 (+382.93%)
Mutual labels:  alamofire
Swift project
原OC项目用swift实现,纯swift项目,可作为学习swift的demo,包含多个自定义控件,并且进行封装网络请求库,结构清晰。
Stars: ✭ 133 (+224.39%)
Mutual labels:  alamofire

Alamofire-Gloss

CocoaPods Carthage compatible

Gloss bindings for Alamofire for easy-peasy JSON serialization.

Installation

CocoaPods

Add to your Podfile:

pod 'Alamofire-Gloss'

Carthage

github "spxrogers/Alamofire-Gloss"

Alamofire-Gloss lists Alamofire and Gloss as explicit Carthage dependencies, so it's only necessary to list Alamofire-Gloss in your Cartfile and it will pull down all three libraries. Copy & Link generated frameworks as normal.

Usage

Define your Model

Create a Class or Struct which implements the Decodable (or Glossy) protocol.

import Foundation
import Gloss

struct Person: JSONDecodable {

  let name: String
  let age: Int?

  init?(json: JSON) {
    guard let name: String = "name" <~~ json
      else { return nil }
    
    self.name = name
    self.age = "age" <~~ json
  }
}

API

responseObject()
responseArray()

1. Example – mapObject

Alamofire.request(personUrl).responseObject(Person.self) { (response) in
  switch response.result {
  case .success(let person):
    print("Found person: \(person)")
  case .failure(let error):
    print("Error'd: \(error)")
  }
}

2. Example – mapArray

Alamofire.request(peopleUrl).responseArray(Person.self) { (response) in
  switch response.result {
  case .success(let people):
    print("Found people: \(people)")
  case .failure(let error):
    print("Error'd: \(error)")
  }
}

Contributing

Issues and pull requests are welcome!

Author

Steven Rogers @spxrogers

Thanks ...

... to Harlan Kellaway for creating Gloss, my preferred JSON library :)

... to the Alamofire (+AFNetworking) team for paving the way of Networking in iOS.

License

Alamofire-Gloss is released under an MIT license. See LICENSE for more information.

Smile for a permissive license.

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