We currently provide a library for Ruby, packaged as a Rubygem. If you’re using a Ruby stack, like Rails or Sinatra, we recommend you use our library. To add it to your application, add this to your application’s Gemfile:
gem 'delighted'
Then, to install the package from your terminal:
bundle
Finally, configure the API client during your application’s initialization:
# Require and configure the library with your secret API key
# (If using Rails, put this in config/intializers/delighted.rb)
require 'delighted'
Delighted.api_key = 'YOUR_DELIGHTED_API_KEY'
We currently provide a library for Node.js, packaged as an npm module. This is intended for server-side use only and does not support client-side JavaScript. To install the package:
npm install delighted --save
Then, require and configure in the client:
var delighted = require('delighted')('YOUR_DELIGHTED_API_KEY');
We currently provide a library for Python, available on PyPI. To install the library:
# Install the Python library via pip
pip install --upgrade delighted
# OR install the Python library via easy_install
easy_install --upgrade delighted
Then, to configure the API client during your application’s initialization:
import delighted
delighted.api_key = 'YOUR_DELIGHTED_API_KEY'
We currently provide a composer package for PHP, available on Packagist. To add it to your application, Add this to your composer.json:
{
"require": {
"delighted/delighted": "1.*"
}
}
Then install the package from your terminal:
composer install
Finally, configure the API client during your application’s initialization:
Delighted\Client::setApiKey('YOUR_DELIGHTED_API_KEY');
Libraries for other languages may be made available. Please email us and tell us which languages you need.