QiitaAPIKit
library for Qiita API.
Installation
SwiftPM
Using Xcode 11.x
- Click '+' button
- Put this repository's URL(
https://github.com/ry-itto/QiitaAPIKit
)
- Click
Next
two times, and click finish.
Cocoapods
add pod 'QiitaAPIKit'
to your Podfile.
Supported APIs
Endpoint | HTTP Method | struct |
---|---|---|
/api/v2/items |
GET | ArticleRequest |
/api/v2/items/:item_id/comments |
GET | ArticleCommentRequest |
/api/v2/items/:item_id/likes |
GET | ArticleLikesRequest |
/api/v2/items/:item_id/stockers |
GET | ArticleStockersRequest |
/api/v2/tags |
GET | TagRequest |
How to Login
- Initialize struct of
Auth
withclient_id
,client_secret
,redirect_url
, andscope
. - Use
showLoginView()
function. ※ Before using Login, adopt protocolQiitaAPIKitAuthDelegate
.
To increase limit of API request
Set access_token
to Initializer.