GabKit 0.25.0

GabKit 0.25.0

noppefoxwolf 维护。



GabKit 0.25.0

GabKit

CI Status Version License Platform

示例

要运行示例项目,请克隆仓库,首先从示例目录运行pod install命令。

要求

安装

GabKit可以通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中。

pod 'GabKit'

用法

授权

let gab = Gab(clientID: Secret.clientID,
                clientSecret: Secret.clientSecret,
                scopes: .read, .notifications, .writePost)
gab.authorize(withPresentingFrom: self)

将回调URL作为URL方案添加到info.plist中。

<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>gabkit</string>
			</array>
		</dict>
	</array>

在AppDelegate中处理URL。

func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
    Gab.handleURL(url)
    return true
}

获取主内容

gab.getMainFeed(success: { (response) in
})

创建帖子

gab.createPost(body: "hello gab.")

作者

noppefoxwolf, [email protected]

许可

GabKit可供MIT许可使用。有关更多信息,请参阅LICENSE文件。

待办事项

  • 授权

  • 创建帖子

  • 方便上传图片和发布帖子

  • 与其他用户互动

  • 内容列表

  • 群组

  • 通知

  • 热门

  • 对帖子做出反应

  • 请求

  • 用户信息

  • 支持iOS

  • 支持OSX

  • 支持Linux

  • 支持CocoaPods

  • 支持Carthage

  • 支持Swift包管理器

  • 可编码

  • 支持的附件类型

    • 媒体
    • 媒体数组
    • URL
    • 吉普
    • YouTube
  • 未记录API