ProductHunt API 封装器 HuntingKit

码农软件 · 软件分类 · 其他开发相关 · 2019-10-20 13:57:36

软件介绍

HuntingKit 是 Product Hunt API 封装器。

使用示例:

开始之前,先让你的 app 取得授权证书。

let authenticationRequest = ProductHunt.Endpoint.ClientToken(id: "your-clientId", secret: "your-clientSecret")
ProductHunt.sendRequest(authenticationRequest) { response in
    switch response {
    case .Success(let box):
        // At this point HuntingKit has stored the credentials in your keychain, you are free to use any other endpoint available. You also have access to the `AccessToken` yourself.
    case .Failure(let box):
        // Handle your errors
    }
}

得到权限后,就可以获取今天的所有产品。

let request = ProductHunt.Endpoint.Posts(from: .Today)
ProductHunt.sendRequest(request) { [unowned self] response in
    switch response {
    case .Success(let box):
        // By now you have the array of Posts (products) available to you
    case .Failure(let box):
        // Handle your errors
    }
}


本文地址:https://codercto.com/soft/d/17172.html

React

React

卓越开发者联盟 / 寸志、范洪春、杨森、陈涌 / 电子工业出版社 / 2015-5-1 / CNY 65.00

2014 年横空出世的由Facebook 推出的开源框架React.js,基于Virtual DOM 重新定义了用户界面的开发方式,彻底革新了大家对前端框架的认识,将PHP 风格的开发方式迁移到客户端应用开发。其优势在于可以与各种类库、框架搭配使用。《React:引领未来的用户界面开发框架》是这一领域的首作,由多位一线专家精心撰写,采用一个全程实例全面介绍和剖析了ReactReact.js 的方方......一起来看看 《React》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

随机密码生成器
随机密码生成器

多种字符组合密码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试