Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A ruby based REST Client for SugarCRM
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION

README.rdoc

SugarCRM

REST Bindings for SugarCRM!

SUMMARY:

RubyGem for interacting with SugarCRM via REST.

Description:

I've implemented all of the basic API calls that SugarCRM supports, and am actively building an abstraction layer on top of the basic API methods. The end result will be ActiveRecord style finders and first class objects. Some of this functionality is included today.

FEATURES/PROBLEMS:

  • Auto-generation of Module specific objects. When a connection is established, get_available_modules is called and the resultant modules are turned into SugarCRM::Module classes.

  • If you just want to use the vanilla API, you can access the methods directly on the connection object.

SYNOPSIS:

require 'sugarcrm'
# Establish a connection
SugarCRM::Base.establish_connection("http://localhost/sugarcrm", 'user', 'password', {:debug => false})

# Retrieve a user by ID, using the SugarCRM::User Proxy object
SugarCRM::User.find(id)

# Show a list of available modules
SugarCRM.modules

# Use the HTTP for direct API calls
SugarCRM.connection.get_entry(1)

# Lookup a user by name.  Find any associated accounts
SugarCRM::User.find_by_username('sarah').accounts

# Same operation, but using the direct API calls
SugarCRM.connection.get_entry_list(
  "Users",
  "users.user_name = \'sarah\'",
  {
    :link_fields => [
      {
        "name"  => "accounts",
        "value" => ["id", "name"]
      }
    ]          
  } 
)

REQUIREMENTS:

  • >= activesupport 3.0.0 gem

  • json gem

INSTALL:

  • sudo gem install sugarcrm

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don't break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright © 2010 Carl Hicks. See LICENSE for details.

Something went wrong with that request. Please try again.