2

我正在尝试编写一个简短的脚本,从 CSV 文件中读取记录的标签 ID,在 Discogs 中搜索它们并返回找到的所有信息,我正在使用这个 ruby​​ 包装器来访问 Discogs:

https://github.com/buntine/discogs

require 'discogs-wrapper'
require 'pp'
aw = Discogs::Wrapper.new("My_Application", user_token: "My_Token")
path="Path to my CSV File with Label ID's of Records"
seperator = ','
values = File.open(path).map{|line| line.chop.split(seperator)}
temp_data=aw.search(values[0][0])["results"][0]
pp aw.get_release(temp_data['id'])['status']

得到这个作为回报:

[DEPRECATED]: The key 'count' has been replaced with 'total'. When     accessing, please use the latter. This message will be removed in the next major     release.
W, [2018-01-15T19:29:26.463127 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#count defined in Enumerable. This     can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.467639 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.469200 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
W, [2018-01-15T19:29:26.469642 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.470643 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.471159 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.471644 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.472192 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.472653 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.473155 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.
W, [2018-01-15T19:29:26.473653 #12056] WARN -- : You are setting a key that     conflicts with a built-in method Hashie::Mash#type_ defined in Hashie::Mash.     This can cause unexpected behavior when accessing the key as a property. You can     still access the key via the #[] method.

老实说,我不太确定这对我意味着什么,我对 ruby​​ 还很陌生,但据我所知,我并没有弄乱语法或 Discogs 自己的结构,还是我弄错了什么?非常感谢!问候, rtuz2th

4

0 回答 0