GfycatApiKit
安装
使用CocoaPods
GfycatApiKit可以使用CocoaPods软件包管理器进行安装。要做到这一点,请将相应的引用添加到您的Podfile
pod 'GfycatApiKit'
然后运行pod install
以更新项目中CocoaPods的安装
$ pod install
有关更多信息,请参阅CocoaPods文档
更新Info.plist
只有当您提供GfycatApiClientId
和GfycatApiClientSecret
时,Gfycat API 才可访问。免费在API密钥管理页面获取它们。您需要拥有或创建Gfycat账户,并使用这些凭据登录来管理您的密钥。
一旦获得这些信息,请相应更新您的Info.plist
文件。
<key>GfycatApiClientId</key>
<string>Your API Client ID goes here</string>
<key>GfycatApiClientSecret</key>
<string>Your API Client Secret goes here</string>
分析
Gfycat服务器API端点需要报告视图曝光和分享事件分析。
您可以这样报告视图曝光
[GfycatEventTracker.impressionsTracker trackEvent:@"video_played" withParameters:@{
@"gfyid": @"candidimmaterialdromedary",
@"context": @"search",
@"keyword": @"example_keyword",
@"flow": @"full",
@"viewtag": @"example_tag",
}];
以及这样报告分享事件
[GfycatEventTracker.analyticsTracker trackEvent:@"send_video" withParameters:@{
@"gfyid": @"candidimmaterialdromedary",
}];
有关事件和参数的更多详细信息,请参阅Gfycat分析文档。
联系我们
有任何问题或评论,请发送到[email protected]