https://github.com/fullcontact/fullcontact-api-ruby
我试图为Ruby使用FullContact API包装器(它是一个gem),而不是纯REST。我想弄清楚如何从电子邮件地址抓取这个人的个人资料。我知道如何从使用JSON响应的REST中获取它们,但不确定示例代码在做什么。
person = FullContact.person(email: "brawest@gmail.com") (从Github链接中的示例中提取)
那么,现在如何从person检索配置文件图片呢?它存储的是什么数据类型?
发布于 2014-07-11 00:27:18
FullContact gem使用哈希,并通过调用返回一个哈希:皮疹对象。
所以如果你想获取照片
> person = FullContact.person(email: "email")
=> [#<Hashie::Rash contact_info=#<Hashie::Rash family_name=...
> person.photos
=> [#<Hashie::Rash is_primary=true type="facebook" type_id="facebook" type_name="Facebook"...希望这能帮上忙!
https://stackoverflow.com/questions/24682720
复制相似问题