Created
June 23, 2020 21:14
-
-
Save dugancathal/a75cb38cb645e4a7d378651927aba7a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
rackup faux-workato.ru