Skip to content

Instantly share code, notes, and snippets.

@dugancathal
Created June 23, 2020 21:14
Show Gist options
  • Save dugancathal/a75cb38cb645e4a7d378651927aba7a9 to your computer and use it in GitHub Desktop.
Save dugancathal/a75cb38cb645e4a7d378651927aba7a9 to your computer and use it in GitHub Desktop.
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'rack', '~> 1.6'
gem 'api_sim'
end
require 'api_sim'
require 'json'
app = ApiSim.build_app do
configure_endpoint 'POST', '/chatinformation',
{
open: 'true',
}.to_json, 200, {}
configure_endpoint 'POST', '/queueinformation',
{
open: 'true',
queue_id: 'imma-queue-id',
wait_min: 5,
wait_max: 10,
}.to_json, 200, {}
configure_endpoint 'POST', '/schedulecallback',
{
good: 'job',
}.to_json, 200, {}
configure_endpoint 'POST', '/endchat',
{
good: 'job',
}.to_json, 200, {}
end
run app
@dugancathal
Copy link
Author

Usage: rackup faux-workato.ru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment