Highrise API and tagging 2

Posted by Colin A. Bartlett Mon, 18 Feb 2008 18:28:00 GMT

Like many, I was disappointed that the Highrise API does not support tagging of people. However, I found a way to easily add the capability to the 37signals-supplied Ruby wrapper class, even if it is unsupported. I added a #tag! instance method to the Person class and used a call directly to the site, not through the API.

class Person < Subject
  ...
  def tag!(tag_name)
    `curl -s -d 'name=#{tag_name}' #{ENV['HIGHRISE_URL']}parties/#{id}/tags`
  end
end

The output is a bunch of javascript to update the page to reflect the change, but one can safely ignore this. The tag is added and everything works great. Not sure how well this would work on Windows, as the curl command-line program is likely unavailable.

We use this method in our latest project to add appropriate tags to people as they are created. It helps us segment people added to Highrise for the project from the rest of our contacts in Highrise.

Comments

Leave a response

  1. Avatar
    Randy 29 minutes later:
    Nice! You could use net/http instead of curl to make it less dependent on a platform that has curl.
  2. Avatar
    Gamer 16 days later:
    Ruby is so powerful..nice mods
Comments