Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
create dummy tickets inside Zendesk for testing purposes
require 'zendesk_api'
require 'net/http'
client = do |config|
config.url = "https://{{subdomain}}"
config.username = "email_here"
config.token = "token_here"
config.retry = true
for i in 1..50
resp = Net::HTTP.get_response(URI.parse(''))
subject = resp.body.match(/^(.*)$/)[0].to_s
resp = Net::HTTP.get_response(URI.parse(''))
description = resp.body
ticket = => subject, :comment => { :value => description })
p ticket.url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment