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

汇编语言(第3版)

汇编语言(第3版)

王爽 / 清华大学出版社 / 2013-9 / 36.00元

《汇编语言(第3版)》具有如下特点:采用了全新的结构对课程的内容进行组织,对知识进行最小化分割,为读者构造了循序渐进的学习线索;在深入本质的层面上对汇编语言进行讲解;对关键环节进行深入的剖析。《汇编语言(第3版)》可用作大学计算机专业本科生的汇编教材及希望深入学习计算机科学的读者的自学教材。一起来看看 《汇编语言(第3版)》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具