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

大演算

大演算

佩德羅.多明戈斯 / 張正苓,胡玉城 / 三采 / 2016-8-1 / 620

揭開大數據、人工智慧、機器學習的祕密, 打造人類文明史上最強大的科技——終極演算法! 有一個終極演算法,可以解開宇宙所有的祕密, 現在大家都在競爭,誰能最先解開它! .機器學習是什麼?大演算又是什麼? .大演算如何運作與發展,機器可以預測什麼? .我們可以信任機器學過的東西嗎? .商業、政治為什麼要擁抱機器學習? .不只商業與政治,醫學與科學界也亟需......一起来看看 《大演算》 这本书的介绍吧!

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

在线压缩/解压 HTML 代码

SHA 加密
SHA 加密

SHA 加密工具

html转js在线工具
html转js在线工具

html转js在线工具