我正在尝试让 highrise api 与我的项目一起工作。完全菜鸟。
我有一个帐户,有我的 api key ,就像在我的 Controller 中一样添加到我的 Rails 项目中。
需要'高层' 高楼::Base.site = ' http://MYACCOUNT.highrisehq.com ' Highrise::Base.user = 'MYAPI KEY'
@person = Highrise::Person.find(:all)
在我看来,我可以获得联系人列表中的所有人,但不知道如何缩小该列表的范围。
所以如果@person = Highrise::Person.find(:all) 获取所有这些,什么只会获取,比如说,你的名字是“larry”?
我已经尝试过了,但就是无法解决这个问题。
请您参考如下方法:
所以我得到了答案
在我的 Controller 中
@tag = params[:tag]
@person = Highrise::Person.find(:all, :from => "/people/search.xml?term=#{@tag}")
THanks Andy for your help . set me on the right path