maccman / closeio

A Ruby wrapper for the Close.io API

Home Page:http://developer.close.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Ruby wrapper for the Close.IO API

Learn about the Closeio API at http://developer.close.io.

I ❤️ Close.io, so if you have problems using the gem or would like to see support for new endpoints, please open a GitHub issue -- I'll get it resolved as quick as I can.

Installation

Add this line to your application's Gemfile:

  # in your Gemfile
  gem 'closeio', '~> 2.0'

  # then...
  bundle install

Usage

  client = Closeio::Client.new("api key")

  # Find a specific lead
  client.find_lead('lead_xxxxxxxxxxxx')

  # See some data about the lead
  lead.data.addresses
  lead.data.contacts
  lead.data.opportunities

  # Find leads that match fields
  client.list_leads('custom.favorite_color:"cornflower blue"')

  # Create a lead
  client.create_lead(
    name: "Bluth Company",
    contacts: [{
      name: "Buster Bluth",
      emails: [{type: "office", email: "cartographer@bluthcompany.com"}]
    }]
  )

  # Saved Search (SmartView)
  smart_view = client.list_smart_views
  smart_views.leads

History

View the changelog This gem follows Semantic Versioning

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

Copyright

Copyright (c) 2015 Taylor Brooks. See LICENSE for details.

About

A Ruby wrapper for the Close.io API

http://developer.close.io

License:MIT License


Languages

Language:Ruby 100.0%