VtigerRuby

VtigerRuby is a Ruby SDK for the Vtiger CRM API.

Official documentation of the Vtiger API can be found here:

  1. Vtiger REST API Docs
  2. Vtiger Third Party Integrations

Getting Started

Installation information coming soon...

Creating a Client

require 'vtiger-ruby'
endpoint = ENV['VTIGER_ENDPOINT']
username = ENV['VTIGER_USERNAME']
accesskey = ENV['VTIGER_ACCESSS_KEY']
client = VtigerRuby::Client.new(
  endpoint: endpoint,
  username: username,
  accesskey: accesskey
)

Authentication

Vtiger API Authentication happens in two steps:

  1. Request the challenge token

    client.get_challenge
    
  2. Login request

    client.
    

Alternatively, you can authenticate the client using the connect method. This single method call negates the need to complete step 1 & step 2 listed above.

  client.connect

Models

The SDK arranges default Vtiger CRM Modules into model classes. The model class can then be used to perform operations against the corresponding Vtiger module.

Account

client..all # Retrieves all Vtiger Account module records

You can also retrieve all Vtiger Account module records from the VtigerRuby::Account model.

VtigerRuby::Account.class_config(client) # Configures the class with client model
VtigerRuby::Account.all # Retrieves all Vtiger Account module records

Example

require 'vtiger-ruby'

# Credential information specific to vtiger instance
endpoint = ENV['VTIGER_ENDPOINT']
username = ENV['VTIGER_USERNAME']
accesskey = ENV['VTIGER_ACCESSS_KEY']

# Initializes the VtigerRuby client
client = VtigerRuby::Client.new(
  endpoint: endpoint,
  username: username,
  accesskey: accesskey
)

# Requests Vtiger challenge token and login
client.connect

# Retrieves all account records from the Account module
accounts = client..all

Code Status

Maintainability Build Status