0.0
No commit activity in last 3 years
No release in over 3 years
This engine provides a controller to create tickets through zendesk API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

~> 4.1.4
 Project Readme

ZendeskEngine Codeship Status for catarse/zendesk_engine Code Climate

Install and configure

Just add to your Gemfile:

gem 'zendesk_engine'

And create an initializer in config/initializers/zendesk_engine.rb with your Zendesk credentials:

ZendeskEngine.configure do |config|
  config.url   = 'https://foocompany.zendesk.com/api/v2'
  config.user  = 'myzendeskagent@foocompany.com'
  config.token = 'my zendesk token found in API config'
end

Mount the routes

Add to your config/routes.rb:

MyApplication::Application.routes.draw do
  mount ZendeskEngine::Engine => "/"
end

This will add the /tickets resources route to the path you've chosen as mouting point ("/" in the example above).

Make requests

After this you can post tickets to /tickets and they will be relayed to the Zendesk API via the zendesk_api gem ;) The parameters to ticket creation should be:

{
  user: {
    email: 'foo@bar.com',
    name: 'Foo Bar'
  },
  ticket: {
    subject: 'Awesome ticket',
    comment: {value: 'This is a ticket just to show a cool example'},
    priority: 'urgent'
  }
}

The response will be a json with the created ticket.

This project rocks and uses MIT-LICENSE.