2016-06-09 48 views
0

我一直在试图在我的Swift应用程序的youtube API中使用etag来查找播放列表,但我的印象是我必须将它作为参数加入。然而,没有参数。我还尝试缓存etag并将其与从不同答案中收到的新版本进行比较,但无论播放列表本身是否发生更改,它总是会更改。有人可以引导我朝着正确的方向前进吗?etag如何在Youtube API上使用 - swift

谢谢!

回答

1

要扩展Google Tag Manager的功能,您可以添加函数调用变量和函数调用标记。函数调用变量可让您捕获通过调用返回的值,以预先注册的函数。函数调用标签让你执行预注册功能

添加自定义代码或自定义变量和函数调用:

要创建自定义标签,创建一个实现TAGCustomFunction协议类:

@implementation MYCustomTag<TAGCustomFunction> 

- (NSObject*)executeWithParameters:(NSDictionary*)parameters { 
// Add custom tag implementation here. 
} 

@end 

要创建自定义变量,创建实现TAGCustomFunction协议的类:

@implementation MYCustomVariable<TAGCustomFunction> 

- (NSObject*)executeWithParameters:(NSDictionary*)parameters { 
// Return the value of the custom variable. 
return @42; 
} 

@end 

确保链接器在链接时间优化期间不会消除您的类。

在Google跟踪代码管理器的网络界面中,使用类名称来设置标记和变量。

相关问题