├── .coveralls.yml ├── .rspec ├── lib ├── busibe │ ├── version.rb │ ├── error │ │ ├── raise_server_error.rb │ │ ├── raise_client_error.rb │ │ └── error.rb │ ├── connection.rb │ ├── request.rb │ ├── configuration.rb │ └── client.rb └── busibe.rb ├── Gemfile ├── .travis.yml ├── bin ├── setup └── console ├── spec ├── busibe_spec.rb ├── spec_helper.rb ├── busibe │ ├── configuration_spec.rb │ └── client_spec.rb └── fixtures │ └── .cassettes │ ├── send_sms.yml │ ├── credits.yml │ └── status.yml ├── .github └── dependabot.yml ├── .gitignore ├── Rakefile ├── LICENSE.txt ├── busibe.gemspec ├── README.md └── .rubocop.yml /.coveralls.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --format documentation 2 | --color 3 | -------------------------------------------------------------------------------- /lib/busibe/version.rb: -------------------------------------------------------------------------------- 1 | module Busibe 2 | VERSION = "0.1.2".freeze 3 | end 4 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | # Specify your gem's dependencies in busibe.gemspec 4 | gemspec 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | rvm: 3 | - 2.2.3 4 | before_install: gem install bundler -v 1.11.1 5 | script: bundle exec rspec spec 6 | after_success: 7 | - coveralls -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | IFS=$'\n\t' 4 | set -vx 5 | 6 | bundle install 7 | 8 | # Do any other automated setup that you need to do here 9 | -------------------------------------------------------------------------------- /spec/busibe_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | 3 | describe Busibe do 4 | it "has a version number" do 5 | expect(Busibe::VERSION).not_to be nil 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: bundler 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "04:00" 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.bundle/ 2 | /.yardoc 3 | /Gemfile.lock 4 | /_yardoc/ 5 | /coverage/ 6 | /doc/ 7 | /pkg/ 8 | /spec/reports/ 9 | /tmp/ 10 | /coverage/ 11 | /.env 12 | /.DS_Store 13 | /busibe-0.1.0.gem 14 | /busibe-0.1.1.gem 15 | /busibe-0.1.2.gem -------------------------------------------------------------------------------- /lib/busibe.rb: -------------------------------------------------------------------------------- 1 | require "dotenv" 2 | Dotenv.load 3 | 4 | require "busibe/version" 5 | require "busibe/configuration" 6 | require "busibe/client" 7 | 8 | module Busibe 9 | class Jusibe 10 | extend Configuration 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | require "rspec/core/rake_task" 3 | require "rake/testtask" 4 | 5 | RSpec::Core::RakeTask.new(:spec) 6 | 7 | Rake::TestTask.new do |test| 8 | test.libs << 'lib' << 'test' 9 | test.ruby_opts << "-rubygems" 10 | test.pattern = 'test/**/*_test.rb' 11 | test.verbose = true 12 | end 13 | 14 | task :default => :spec 15 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require "coveralls" 2 | Coveralls.wear! 3 | 4 | $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) 5 | require "busibe" 6 | require "vcr" 7 | 8 | VCR.configure do |c| 9 | c.cassette_library_dir = "spec/fixtures/.cassettes" 10 | c.hook_into :faraday 11 | c.filter_sensitive_data("message_id") do 12 | ENV["MESSAGE_ID"] 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require "bundler/setup" 4 | require "busibe" 5 | 6 | # You can add fixtures and/or initialization code here to make experimenting 7 | # with your gem easier. You can also use a different console, if you like. 8 | 9 | # (If you use this, don't forget to add pry to your Gemfile!) 10 | # require "pry" 11 | # Pry.start 12 | 13 | require "irb" 14 | IRB.start 15 | -------------------------------------------------------------------------------- /lib/busibe/error/raise_server_error.rb: -------------------------------------------------------------------------------- 1 | require "faraday" 2 | require "busibe/error/error" 3 | 4 | module Busibe 5 | module Error 6 | class RaiseServerError < Faraday::Response::Middleware 7 | def on_complete(env) 8 | status = env[:status].to_i 9 | headers = env[:response_headers] 10 | 11 | case status 12 | when 503 13 | message = "503 No server is available to handle this request." 14 | raise Busibe::Error::ServiceUnavailable.new message, headers 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/busibe/error/raise_client_error.rb: -------------------------------------------------------------------------------- 1 | require "faraday" 2 | 3 | module Busibe 4 | module Error 5 | class RaiseClientError < Faraday::Response::Middleware 6 | def on_complete(env) 7 | status = env[:status].to_i 8 | body = env[:body] 9 | headers = env[:response_headers] 10 | 11 | case status 12 | when 400 13 | raise Busibe::Error::BadRequest.new body, headers 14 | when 403 15 | raise Busibe::Error::Forbidden.new body, headers 16 | when 413 17 | raise Busibe::Error::RequestTooLarge.new body, headers 18 | end 19 | end 20 | end # ClientError 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/busibe/error/error.rb: -------------------------------------------------------------------------------- 1 | module Busibe 2 | module Error 3 | class Error < StandardError 4 | attr_reader :http_headers 5 | 6 | def initialize(message, http_headers) 7 | @http_headers = http_headers 8 | super(message) 9 | end 10 | end # Error 11 | end 12 | 13 | module Error 14 | class ServerError < Busibe::Error::Error; end 15 | end 16 | 17 | module Error 18 | class ServiceUnavailable < Busibe::Error::ServerError; end 19 | end 20 | 21 | module Error 22 | class ClientError < Busibe::Error::Error; end 23 | end 24 | 25 | module Error 26 | class Forbidden < Busibe::Error::ClientError; end 27 | end 28 | 29 | module Error 30 | class BadRequest < Busibe::Error::ClientError; end 31 | end 32 | 33 | module Error 34 | class RequestTooLarge < Busibe::Error::ClientError; end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /lib/busibe/connection.rb: -------------------------------------------------------------------------------- 1 | require "faraday" 2 | require "faraday_middleware" 3 | require "busibe/error/raise_client_error" 4 | require "busibe/error/raise_server_error" 5 | 6 | module Busibe 7 | module Connection 8 | private 9 | 10 | def connection(options) 11 | default_options = { 12 | url: options.fetch(:endpoint, endpoint) 13 | } 14 | 15 | @connection ||= Faraday.new(default_options) do |faraday| 16 | faraday.use( 17 | Faraday::Request::BasicAuthentication, 18 | options[:public_key], 19 | options[:access_token] 20 | ) 21 | 22 | faraday.use Busibe::Error::RaiseClientError 23 | faraday.use Busibe::Error::RaiseServerError 24 | faraday.request :url_encoded 25 | faraday.adapter Faraday.default_adapter 26 | end 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /spec/busibe/configuration_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | 3 | describe Busibe::Configuration do 4 | before :each do 5 | @busibe_config = Busibe::Configuration 6 | @busibe = Busibe::Jusibe 7 | end 8 | 9 | after do 10 | Busibe::Jusibe.reset 11 | end 12 | 13 | Busibe::Configuration::VALID_CONFIG_KEYS.each do |key| 14 | describe ".#{key}" do 15 | it "should return the default value" do 16 | value = @busibe.send(key) 17 | expect(value).to eq @busibe_config.const_get("DEFAULT_#{key.upcase}") 18 | end 19 | end 20 | end 21 | 22 | describe ".configure" do 23 | Busibe::Configuration::VALID_CONFIG_KEYS.each do |key| 24 | it "should set the value of #{key}" do 25 | @busibe.configure do |config| 26 | config.send("#{key}=", key) 27 | value = @busibe.send(key) 28 | expect(value).to eq key 29 | end 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/busibe/request.rb: -------------------------------------------------------------------------------- 1 | module Busibe 2 | module Request 3 | def get(path, params = {}) 4 | perform_request( 5 | :get, 6 | path, 7 | params, 8 | public_key: @public_key, access_token: @access_token 9 | ) 10 | end 11 | 12 | def post(path, params = {}) 13 | perform_request( 14 | :post, 15 | path, 16 | params, 17 | public_key: @public_key, access_token: @access_token 18 | ) 19 | end 20 | 21 | private 22 | 23 | def perform_request(method, path, params, options) 24 | @connection = connection(options) 25 | @response = @connection.run_request( 26 | method, 27 | path, 28 | params, 29 | nil 30 | ) do |request| 31 | request.options[:raw] = true if options[:raw] 32 | 33 | case method.to_sym 34 | when :get 35 | request.url(path, params) 36 | when :post 37 | request.path = path 38 | request.body = params unless params.empty? 39 | end 40 | end 41 | 42 | options[:raw] ? @response : @response.body 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 andela-bmakinwa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/busibe/configuration.rb: -------------------------------------------------------------------------------- 1 | module Busibe 2 | module Configuration 3 | VALID_CONNECTION_KEYS = [:endpoint, :user_agent, :request_method].freeze 4 | VALID_OPTIONS_KEYS = [:public_key, :access_token, :format].freeze 5 | VALID_CONFIG_KEYS = VALID_CONNECTION_KEYS + VALID_OPTIONS_KEYS 6 | 7 | DEFAULT_ENDPOINT = "https://jusibe.com".freeze 8 | DEFAULT_REQUEST_METHOD = :get 9 | DEFAULT_USER_AGENT = "Busibe API Ruby Gem #{Busibe::VERSION}".freeze 10 | 11 | DEFAULT_PUBLIC_KEY = nil 12 | DEFAULT_ACCESS_TOKEN = nil 13 | DEFAULT_FORMAT = :json 14 | 15 | attr_accessor(*VALID_CONFIG_KEYS) 16 | 17 | def self.extended(base) 18 | base.reset 19 | end 20 | 21 | # reset config settings 22 | def reset 23 | self.endpoint = DEFAULT_ENDPOINT 24 | self.request_method = DEFAULT_REQUEST_METHOD 25 | self.user_agent = DEFAULT_USER_AGENT 26 | 27 | self.public_key = DEFAULT_PUBLIC_KEY 28 | self.access_token = DEFAULT_ACCESS_TOKEN 29 | self.format = DEFAULT_FORMAT 30 | end 31 | 32 | def configure 33 | yield self 34 | end 35 | 36 | def options 37 | Hash[*VALID_CONFIG_KEYS.map { |key| [key, send(key)] }.flatten] 38 | end 39 | end # Configuration 40 | end 41 | -------------------------------------------------------------------------------- /lib/busibe/client.rb: -------------------------------------------------------------------------------- 1 | require "json" 2 | require "busibe/connection" 3 | require "busibe/request" 4 | 5 | module Busibe 6 | class Client 7 | include Busibe::Connection 8 | include Busibe::Request 9 | 10 | attr_accessor(*Configuration::VALID_CONFIG_KEYS) 11 | attr_reader :response 12 | 13 | def initialize(options = {}) 14 | merged_options = Busibe::Jusibe.options.merge(options) 15 | 16 | Configuration::VALID_CONFIG_KEYS.each do |key| 17 | send("#{key}=", merged_options[key]) 18 | end 19 | end 20 | 21 | def send_sms(payload = {}) 22 | if payload.empty? 23 | raise ArgumentError.new("A payload is required in order to send an sms") 24 | end 25 | 26 | post("/smsapi/send_sms", payload) 27 | self 28 | end 29 | 30 | def check_available_credits 31 | get("/smsapi/get_credits") 32 | self 33 | end 34 | 35 | def check_delivery_status(message_id = nil) 36 | if message_id.nil? 37 | raise ArgumentError.new("A message ID is required") 38 | end 39 | 40 | post("/smsapi/delivery_status?message_id=#{message_id}") 41 | self 42 | end 43 | 44 | def get_response 45 | JSON.load @response.body 46 | end 47 | 48 | private 49 | 50 | def method_missing(method_sym, *args, &_block) 51 | result = method_sym.to_s =~ /^(.*)_with_response$/ 52 | super unless result 53 | send($1, *args).get_response 54 | end 55 | 56 | def respond_to_missing?(method_sym, include_private = false) 57 | method_sym.to_s =~ /^(.*)_with_response$/ 58 | super unless respond_to? $1.to_sym 59 | true 60 | end 61 | end # Client 62 | end 63 | -------------------------------------------------------------------------------- /busibe.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | lib = File.expand_path("../lib", __FILE__) 3 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 4 | require "busibe/version" 5 | 6 | Gem::Specification.new do |spec| 7 | spec.name = "busibe" 8 | spec.version = Busibe::VERSION 9 | spec.authors = ["andela-bmakinwa"] 10 | spec.email = ["makinwa37@gmail.com"] 11 | 12 | spec.summary = "SMS service using Jusibe (jusibe.com)" 13 | spec.description = "Busibe provides an easy interface to interact with the Jusibe API (jusibe.com)" 14 | spec.homepage = "https://github.com/andela-bmakinwa/busibe" 15 | spec.license = "MIT" 16 | 17 | # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or 18 | # delete this section to allow pushing this gem to any host. 19 | if spec.respond_to?(:metadata) 20 | spec.metadata["allowed_push_host"] = "https://rubygems.org" 21 | else 22 | raise "RubyGems 2.0 or newer is required to protect against public gem pushes." 23 | end 24 | 25 | spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } 26 | spec.bindir = "exe" 27 | spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } 28 | spec.require_paths = ["lib"] 29 | 30 | spec.add_dependency "faraday" 31 | spec.add_dependency "faraday_middleware" 32 | 33 | spec.add_development_dependency "bundler", "~> 2.2" 34 | spec.add_development_dependency "rake", "~> 10.0" 35 | spec.add_development_dependency "rspec", "~> 3.0" 36 | spec.add_development_dependency "dotenv" 37 | spec.add_development_dependency "vcr" 38 | spec.add_development_dependency "coveralls" 39 | end 40 | -------------------------------------------------------------------------------- /spec/fixtures/.cassettes/send_sms.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: https://jusibe.com/smsapi/send_sms 6 | body: 7 | encoding: UTF-8 8 | string: from=Testing&message=Muahahahaha.+What%27s+bubbling+niggas%3F&to=08063125510 9 | headers: 10 | User-Agent: 11 | - Faraday v0.9.2 12 | Authorization: 13 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 14 | Content-Type: 15 | - application/x-www-form-urlencoded 16 | response: 17 | status: 18 | code: 200 19 | message: 20 | headers: 21 | cache-control: 22 | - no-cache="set-cookie" 23 | content-type: 24 | - application/json 25 | date: 26 | - Sun, 17 Apr 2016 02:39:14 GMT 27 | server: 28 | - nginx 29 | set-cookie: 30 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 31 | content-length: 32 | - '105' 33 | connection: 34 | - Close 35 | body: 36 | encoding: ASCII-8BIT 37 | string: '{"status":"Sent","message_id":"n69dbwzdvx","sms_credits_used":1,"request_speed":0.2624568939209}' 38 | http_version: 39 | recorded_at: Sun, 17 Apr 2016 02:38:02 GMT 40 | - request: 41 | method: post 42 | uri: https://jusibe.com/smsapi/send_sms 43 | body: 44 | encoding: UTF-8 45 | string: from=Testing&message=Muahahahaha.+What%27s+bubbling+niggas%3F&to=08063125510 46 | headers: 47 | User-Agent: 48 | - Faraday v0.9.2 49 | Authorization: 50 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 51 | Content-Type: 52 | - application/x-www-form-urlencoded 53 | response: 54 | status: 55 | code: 200 56 | message: 57 | headers: 58 | cache-control: 59 | - no-cache="set-cookie" 60 | content-type: 61 | - application/json 62 | date: 63 | - Sun, 17 Apr 2016 02:45:56 GMT 64 | server: 65 | - nginx 66 | set-cookie: 67 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 68 | content-length: 69 | - '105' 70 | connection: 71 | - Close 72 | body: 73 | encoding: ASCII-8BIT 74 | string: '{"status":"Sent","message_id":"r2e58k85bv","sms_credits_used":1,"request_speed":0.15098810195923}' 75 | http_version: 76 | recorded_at: Sun, 17 Apr 2016 02:45:14 GMT 77 | recorded_with: VCR 3.0.1 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Busibe 2 | 3 | [![Coverage Status](https://coveralls.io/repos/github/andela-bmakinwa/busibe/badge.svg?branch=master)](https://coveralls.io/github/andela-bmakinwa/busibe?branch=master) [![Build Status](https://travis-ci.org/andela-bmakinwa/busibe.svg?branch=master)](https://travis-ci.org/andela-bmakinwa/busibe) [![Code Climate](https://codeclimate.com/github/andela-bmakinwa/busibe/badges/gpa.svg)](https://codeclimate.com/github/andela-bmakinwa/busibe) 4 | 5 | > Jusibe Library for Ruby 6 | 7 | Busibe is a ruby gem that consumes the services of [Jusibe](http://jusibe.com). With this library, you can access the SMS functionalities provided by Jusibe seamlessly. 8 | 9 | ## Installation 10 | 11 | Add this line to your application's Gemfile: 12 | 13 | ```ruby 14 | gem 'busibe' 15 | ``` 16 | 17 | And then execute: 18 | 19 | $ bundle 20 | 21 | Or install it yourself as: 22 | 23 | $ gem install busibe 24 | 25 | ## Usage 26 | 27 | 28 | #### Create a Client instance 29 | ```ruby 30 | require "busibe" 31 | 32 | # set configuration params 33 | config = { 34 | public_key: "PUBLIC_KEY", 35 | access_token: "ACCESS_TOKEN" 36 | } 37 | 38 | # instantiate Client class 39 | client = Busibe::Client.new(config) 40 | ``` 41 | 42 | #### Send SMS 43 | 44 | ```ruby 45 | # data needed to send sms 46 | payload = { 47 | to: "PHONE NUMBER", 48 | from: "Sender's name", 49 | message: "Do you love Ruby?" 50 | } 51 | 52 | begin 53 | client.send_sms payload # return instance of Client 54 | # OR 55 | client.send_sms(payload).get_response # return response body 56 | rescue Exception => e 57 | puts e.message 58 | end 59 | ``` 60 | 61 | ##### Sample response body 62 | ``` 63 | { 64 | "status": "Sent", 65 | "message_id": "xeqd6rrd26", 66 | "sms_credits_used": 1 67 | } 68 | ``` 69 | 70 | ___ 71 | #### Check Available Credits 72 | 73 | ```ruby 74 | begin 75 | client.check_available_credits # return instance of Client 76 | # OR 77 | client.check_available_credits.get_response # return response body 78 | rescue Exception => e 79 | puts e.message 80 | end 81 | ``` 82 | 83 | ##### Sample response body 84 | ``` 85 | { 86 | "sms_credits": "182" 87 | } 88 | ``` 89 | ___ 90 | 91 | #### Check Delivery Status 92 | 93 | ```ruby 94 | message_id = "MESSAGE ID" 95 | 96 | begin 97 | # return instance of Client 98 | client.check_delivery_status message_id 99 | # OR 100 | # return response body 101 | client.check_delivery_status(message_id).get_response 102 | rescue Exception => e 103 | puts e.message 104 | end 105 | ``` 106 | 107 | ##### Sample response body 108 | ``` 109 | { 110 | "sms_credits": "182" 111 | } 112 | ``` 113 | ___ 114 | 115 | ##### Other available methods 116 | ```ruby 117 | # sends sms and returns response 118 | client.send_sms_with_response(payload) 119 | 120 | # makes request and returns response 121 | client.check_available_credits_with_response 122 | 123 | # makes request and returns response 124 | client.check_delivery_status_with_response(message_id) 125 | ``` 126 | 127 | ## Contributing 128 | Bug reports and pull requests are welcome on GitHub at https://github.com/andela-bmakinwa/busibe. 129 | 130 | To contribute to this work: 131 | 132 | 1. Fork it [here](https://github.com/andela-bmakinwa/enygma/fork) 133 | 2. Create your feature branch `git checkout -b my-new-feature` 134 | 3. Commit your changes `git commit -am 'Add some feature'` 135 | 4. Push to the branch `git push origin my-new-feature` 136 | 5. Create a new Pull Request 137 | 6. Wait 138 | 139 | 140 | ## License 141 | 142 | The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). 143 | -------------------------------------------------------------------------------- /spec/fixtures/.cassettes/credits.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: get 5 | uri: https://jusibe.com/smsapi/get_credits 6 | body: 7 | encoding: UTF-8 8 | string: '' 9 | headers: 10 | User-Agent: 11 | - Faraday v0.9.2 12 | Authorization: 13 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 14 | Content-Type: 15 | - application/x-www-form-urlencoded 16 | response: 17 | status: 18 | code: 200 19 | message: 20 | headers: 21 | cache-control: 22 | - no-cache="set-cookie" 23 | content-type: 24 | - application/json 25 | date: 26 | - Sun, 17 Apr 2016 02:38:46 GMT 27 | server: 28 | - nginx 29 | set-cookie: 30 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 31 | content-length: 32 | - '76' 33 | connection: 34 | - Close 35 | body: 36 | encoding: ASCII-8BIT 37 | string: '{"sms_credits":"228","request_speed":0.0052649974822998}' 38 | http_version: 39 | recorded_at: Sun, 17 Apr 2016 02:38:03 GMT 40 | - request: 41 | method: post 42 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 43 | body: 44 | encoding: UTF-8 45 | string: '' 46 | headers: 47 | User-Agent: 48 | - Faraday v0.9.2 49 | Authorization: 50 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 51 | Content-Type: 52 | - application/x-www-form-urlencoded 53 | response: 54 | status: 55 | code: 200 56 | message: 57 | headers: 58 | cache-control: 59 | - no-cache="set-cookie" 60 | content-type: 61 | - application/json 62 | date: 63 | - Wed, 20 Apr 2016 05:59:44 GMT 64 | server: 65 | - nginx 66 | set-cookie: 67 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 68 | content-length: 69 | - '134' 70 | connection: 71 | - Close 72 | body: 73 | encoding: ASCII-8BIT 74 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 75 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.005774974822998}' 76 | http_version: 77 | recorded_at: Wed, 20 Apr 2016 05:58:59 GMT 78 | - request: 79 | method: post 80 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 81 | body: 82 | encoding: UTF-8 83 | string: '' 84 | headers: 85 | User-Agent: 86 | - Faraday v0.9.2 87 | Authorization: 88 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 89 | Content-Type: 90 | - application/x-www-form-urlencoded 91 | response: 92 | status: 93 | code: 200 94 | message: 95 | headers: 96 | cache-control: 97 | - no-cache="set-cookie" 98 | content-type: 99 | - application/json 100 | date: 101 | - Wed, 20 Apr 2016 06:00:14 GMT 102 | server: 103 | - nginx 104 | set-cookie: 105 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 106 | content-length: 107 | - '133' 108 | connection: 109 | - Close 110 | body: 111 | encoding: ASCII-8BIT 112 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 113 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0055580139160156}' 114 | http_version: 115 | recorded_at: Wed, 20 Apr 2016 05:59:29 GMT 116 | recorded_with: VCR 3.0.1 117 | -------------------------------------------------------------------------------- /spec/busibe/client_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "dotenv" 3 | 4 | describe Busibe::Client, vcr: true do 5 | before do 6 | @keys = Busibe::Configuration::VALID_CONFIG_KEYS 7 | end 8 | 9 | after do 10 | Busibe::Jusibe.reset 11 | end 12 | 13 | describe "constructor" do 14 | context "with default Jusibe configurations" do 15 | it "should inherit Jusibe configuration" do 16 | Busibe::Jusibe.configure do |config| 17 | @keys.each do |key| 18 | config.send("#{key}=", key) 19 | end 20 | end 21 | 22 | api = Busibe::Client.new 23 | @keys.each do |key| 24 | expect(api.send(key)).to eq key 25 | end 26 | end 27 | end 28 | 29 | context "with client class configuration" do 30 | before do 31 | @config = { 32 | public_key: "ak", 33 | access_token: "act", 34 | format: "of", 35 | endpoint: "ep", 36 | user_agent: "ua", 37 | request_method: "hm" 38 | } 39 | end 40 | 41 | it "should override module configuration" do 42 | api = Busibe::Client.new(@config) 43 | @keys.each do |key| 44 | expect(api.send(key)).to eq @config[key] 45 | end 46 | end 47 | 48 | it "should override Jusibe configuration after" do 49 | api = Busibe::Client.new 50 | 51 | @config.each do |key, value| 52 | api.send("#{key}=", value) 53 | end 54 | 55 | @keys.each do |key| 56 | expect(api.send(key.to_s)).to eq @config[key] 57 | end 58 | end 59 | end 60 | end 61 | 62 | describe ".send_sms" do 63 | subject do 64 | @config = { 65 | public_key: ENV["PUBLIC_KEY"], 66 | access_token: ENV["ACCESS_TOKEN"] 67 | } 68 | 69 | Busibe::Client.new(@config) 70 | end 71 | 72 | context "when a payload is not given" do 73 | it "raises and ArgumentError" do 74 | error = "A payload is required in order to send an sms" 75 | expect { subject.send_sms }.to raise_error(ArgumentError, error) 76 | end 77 | end 78 | 79 | context "when a payload is given" do 80 | it "sends sms and returns self" do 81 | payload = { 82 | to: ENV["PHONE_NO"], 83 | from: "Testing", 84 | message: "How are you today?" 85 | } 86 | 87 | VCR.use_cassette("send_sms", record: :new_episodes) do 88 | expect(subject.send_sms(payload)).to eq subject 89 | expect(subject.get_response["status"]).to eq "Sent" 90 | end 91 | end 92 | end 93 | end 94 | 95 | describe ".check_available_credits" do 96 | it "returns the sms credit" do 97 | @config = { 98 | public_key: ENV["PUBLIC_KEY"], 99 | access_token: ENV["ACCESS_TOKEN"] 100 | } 101 | api = Busibe::Client.new(@config) 102 | 103 | VCR.use_cassette("credits", record: :new_episodes) do 104 | result = api.check_available_credits 105 | 106 | expect(result).to eq api 107 | expect(result.get_response).to be_kind_of Hash 108 | expect(result.get_response["sms_credits"]).not_to be_empty 109 | end 110 | end 111 | end 112 | 113 | describe ".check_delivery_status" do 114 | subject do 115 | @config = { 116 | public_key: ENV["PUBLIC_KEY"], 117 | access_token: ENV["ACCESS_TOKEN"] 118 | } 119 | 120 | Busibe::Client.new(@config) 121 | end 122 | 123 | context "when a messageID is not given" do 124 | it "raises an ArgumentError" do 125 | error = "A message ID is required" 126 | expect { subject.check_delivery_status }.to raise_error( 127 | ArgumentError, 128 | error 129 | ) 130 | end 131 | end 132 | 133 | context "when a messageID is given" do 134 | it "retuns the delivery status response" do 135 | VCR.use_cassette("status", record: :new_episodes) do 136 | result = subject.check_delivery_status(ENV["MESSAGE_ID"]) 137 | 138 | expect(result).to eq subject 139 | expect(result.get_response["message_id"]).to eq ENV["MESSAGE_ID"] 140 | expect(result.get_response["status"]).not_to be_empty 141 | expect(result.get_response["date_sent"]).not_to be_empty 142 | expect(result.get_response["date_delivered"]).not_to be_empty 143 | expect(result.get_response["request_speed"]).not_to be_falsey 144 | end 145 | end 146 | end 147 | end 148 | 149 | describe ".get_response" do 150 | it "returns the response body" do 151 | @config = { 152 | public_key: ENV["PUBLIC_KEY"], 153 | access_token: ENV["ACCESS_TOKEN"] 154 | } 155 | 156 | api = Busibe::Client.new(@config) 157 | VCR.use_cassette("credits") do 158 | result = api.check_available_credits 159 | 160 | expect(result.get_response).to be_kind_of Hash 161 | expect(result.get_response["sms_credits"]).not_to be_empty 162 | end 163 | end 164 | end 165 | 166 | describe ".method_missing / .respond_to" do 167 | subject do 168 | @config = { 169 | public_key: ENV["PUBLIC_KEY"], 170 | access_token: ENV["ACCESS_TOKEN"] 171 | } 172 | 173 | Busibe::Client.new(@config) 174 | end 175 | 176 | context "when the method does not exist" do 177 | it "return error" do 178 | expect { subject.invalid_method_with_response }.to raise_error( 179 | NoMethodError 180 | ) 181 | end 182 | end 183 | 184 | context "when the method exists" do 185 | it "calls the method and returns the response" do 186 | VCR.use_cassette("credits") do 187 | result = subject.check_available_credits_with_response 188 | 189 | expect(result).to be_kind_of Hash 190 | expect(result["sms_credits"]).not_to be_empty 191 | end 192 | end 193 | end 194 | end 195 | 196 | describe ".respond_to" do 197 | subject do 198 | @config = { 199 | public_key: ENV["PUBLIC_KEY"], 200 | access_token: ENV["ACCESS_TOKEN"] 201 | } 202 | 203 | Busibe::Client.new(@config) 204 | end 205 | 206 | context "when the method does not exist" do 207 | it "raises an error" do 208 | expect { subject.method :invalid_with_response }.to raise_error( 209 | NameError 210 | ) 211 | end 212 | end 213 | 214 | context "when the method exists" do 215 | it "does not raise an error" do 216 | expect { subject.method :send_sms_with_response }.to_not raise_error 217 | end 218 | end 219 | end 220 | end 221 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | AllCops: 2 | Exclude: 3 | - "vendor/**/*" 4 | - "bin/**/*" 5 | - "Rakefile" 6 | - "busibe.gemspec" 7 | - "spec/fixtures/**/*" 8 | UseCache: false 9 | Style/CollectionMethods: 10 | Description: Preferred collection methods. 11 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size 12 | Enabled: true 13 | PreferredMethods: 14 | collect: map 15 | collect!: map! 16 | find: detect 17 | find_all: select 18 | reduce: inject 19 | Style/DotPosition: 20 | Description: Checks the position of the dot in multi-line method calls. 21 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains 22 | Enabled: true 23 | EnforcedStyle: trailing 24 | SupportedStyles: 25 | - leading 26 | - trailing 27 | Style/FileName: 28 | Description: Use snake_case for source file names. 29 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files 30 | Enabled: false 31 | Exclude: [] 32 | Style/GuardClause: 33 | Description: Check for conditionals that can be replaced with guard clauses 34 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals 35 | Enabled: false 36 | MinBodyLength: 1 37 | Style/IfUnlessModifier: 38 | Description: Favor modifier if/unless usage when you have a single-line body. 39 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier 40 | Enabled: false 41 | MaxLineLength: 80 42 | Style/OptionHash: 43 | Description: Don't use option hashes when you can use keyword arguments. 44 | Enabled: false 45 | Style/PercentLiteralDelimiters: 46 | Description: Use `%`-literal delimiters consistently 47 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces 48 | Enabled: false 49 | PreferredDelimiters: 50 | "%": "()" 51 | "%i": "()" 52 | "%q": "()" 53 | "%Q": "()" 54 | "%r": "{}" 55 | "%s": "()" 56 | "%w": "()" 57 | "%W": "()" 58 | "%x": "()" 59 | Style/PredicateName: 60 | Description: Check the names of predicate methods. 61 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark 62 | Enabled: true 63 | NamePrefix: 64 | - is_ 65 | - has_ 66 | - have_ 67 | NamePrefixBlacklist: 68 | - is_ 69 | Exclude: 70 | - spec/**/* 71 | Style/RaiseArgs: 72 | Description: Checks the arguments passed to raise/fail. 73 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages 74 | Enabled: false 75 | EnforcedStyle: exploded 76 | SupportedStyles: 77 | - compact 78 | - exploded 79 | Style/SignalException: 80 | Description: Checks for proper usage of fail and raise. 81 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method 82 | Enabled: false 83 | EnforcedStyle: semantic 84 | SupportedStyles: 85 | - only_raise 86 | - only_fail 87 | - semantic 88 | Style/SingleLineBlockParams: 89 | Description: Enforces the names of some block params. 90 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks 91 | Enabled: false 92 | Methods: 93 | - reduce: 94 | - a 95 | - e 96 | - inject: 97 | - a 98 | - e 99 | Style/SingleLineMethods: 100 | Description: Avoid single-line methods. 101 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods 102 | Enabled: false 103 | AllowIfMethodIsEmpty: true 104 | Style/StringLiterals: 105 | Description: Checks if uses of quotes match the configured preference. 106 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals 107 | Enabled: true 108 | EnforcedStyle: double_quotes 109 | SupportedStyles: 110 | - single_quotes 111 | - double_quotes 112 | Style/StringLiteralsInInterpolation: 113 | Description: Checks if uses of quotes inside expressions in interpolated strings 114 | match the configured preference. 115 | Enabled: true 116 | EnforcedStyle: single_quotes 117 | SupportedStyles: 118 | - single_quotes 119 | - double_quotes 120 | Style/TrailingCommaInArguments: 121 | Description: Checks for trailing comma in parameter lists and literals. 122 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas 123 | Enabled: false 124 | EnforcedStyleForMultiline: no_comma 125 | SupportedStyles: 126 | - comma 127 | - no_comma 128 | Metrics/AbcSize: 129 | Description: A calculated magnitude based on number of assignments, branches, and 130 | conditions. 131 | Enabled: false 132 | Max: 15 133 | Metrics/ClassLength: 134 | Description: Avoid classes longer than 100 lines of code. 135 | Enabled: false 136 | CountComments: false 137 | Max: 100 138 | Metrics/ModuleLength: 139 | CountComments: false 140 | Max: 100 141 | Description: Avoid modules longer than 100 lines of code. 142 | Enabled: false 143 | Metrics/CyclomaticComplexity: 144 | Description: A complexity metric that is strongly correlated to the number of test 145 | cases needed to validate a method. 146 | Enabled: false 147 | Max: 6 148 | Metrics/MethodLength: 149 | Description: Avoid methods longer than 10 lines of code. 150 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods 151 | Enabled: false 152 | CountComments: false 153 | Max: 10 154 | Metrics/ParameterLists: 155 | Description: Avoid parameter lists longer than three or four parameters. 156 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params 157 | Enabled: false 158 | Max: 5 159 | CountKeywordArgs: true 160 | Metrics/PerceivedComplexity: 161 | Description: A complexity metric geared towards measuring complexity for a human 162 | reader. 163 | Enabled: false 164 | Max: 7 165 | Lint/AssignmentInCondition: 166 | Description: Don't use assignment in conditions. 167 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition 168 | Enabled: false 169 | AllowSafeAssignment: true 170 | Style/InlineComment: 171 | Description: Avoid inline comments. 172 | Enabled: false 173 | Style/AccessorMethodName: 174 | Description: Check the naming of accessor methods for get_/set_. 175 | Enabled: false 176 | Style/Alias: 177 | Description: Use alias_method instead of alias. 178 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method 179 | Enabled: false 180 | Style/Documentation: 181 | Description: Document classes and non-namespace modules. 182 | Enabled: false 183 | Style/DoubleNegation: 184 | Description: Checks for uses of double negation (!!). 185 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang 186 | Enabled: false 187 | Style/EachWithObject: 188 | Description: Prefer `each_with_object` over `inject` or `reduce`. 189 | Enabled: false 190 | Style/EmptyLiteral: 191 | Description: Prefer literals to Array.new/Hash.new/String.new. 192 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash 193 | Enabled: false 194 | Style/ModuleFunction: 195 | Description: Checks for usage of `extend self` in modules. 196 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function 197 | Enabled: false 198 | Style/OneLineConditional: 199 | Description: Favor the ternary operator(?:) over if/then/else/end constructs. 200 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator 201 | Enabled: false 202 | Style/PerlBackrefs: 203 | Description: Avoid Perl-style regex back references. 204 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers 205 | Enabled: false 206 | Style/Send: 207 | Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` 208 | may overlap with existing methods. 209 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send 210 | Enabled: false 211 | Style/SpecialGlobalVars: 212 | Description: Avoid Perl-style global variables. 213 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms 214 | Enabled: false 215 | Style/VariableInterpolation: 216 | Description: Don't interpolate global, instance and class variables directly in 217 | strings. 218 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate 219 | Enabled: false 220 | Style/WhenThen: 221 | Description: Use when x then ... for one-line cases. 222 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases 223 | Enabled: false 224 | Lint/EachWithObjectArgument: 225 | Description: Check for immutable argument given to each_with_object. 226 | Enabled: true 227 | Lint/HandleExceptions: 228 | Description: Don't suppress exception. 229 | StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions 230 | Enabled: false 231 | Lint/LiteralInCondition: 232 | Description: Checks of literals used in conditions. 233 | Enabled: false 234 | Lint/LiteralInInterpolation: 235 | Description: Checks for literals used in interpolation. 236 | Enabled: false -------------------------------------------------------------------------------- /spec/fixtures/.cassettes/status.yml: -------------------------------------------------------------------------------- 1 | --- 2 | http_interactions: 3 | - request: 4 | method: post 5 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 6 | body: 7 | encoding: UTF-8 8 | string: '' 9 | headers: 10 | User-Agent: 11 | - Faraday v0.9.2 12 | Authorization: 13 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 14 | Content-Type: 15 | - application/x-www-form-urlencoded 16 | response: 17 | status: 18 | code: 200 19 | message: 20 | headers: 21 | cache-control: 22 | - no-cache="set-cookie" 23 | content-type: 24 | - application/json 25 | date: 26 | - Sun, 17 Apr 2016 04:28:39 GMT 27 | server: 28 | - nginx 29 | set-cookie: 30 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 31 | content-length: 32 | - '134' 33 | connection: 34 | - Close 35 | body: 36 | encoding: ASCII-8BIT 37 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 38 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0049638748168945}' 39 | http_version: 40 | recorded_at: Sun, 17 Apr 2016 04:27:27 GMT 41 | - request: 42 | method: post 43 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 44 | body: 45 | encoding: UTF-8 46 | string: '' 47 | headers: 48 | User-Agent: 49 | - Faraday v0.9.2 50 | Authorization: 51 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 52 | Content-Type: 53 | - application/x-www-form-urlencoded 54 | response: 55 | status: 56 | code: 200 57 | message: 58 | headers: 59 | cache-control: 60 | - no-cache="set-cookie" 61 | content-type: 62 | - application/json 63 | date: 64 | - Sun, 17 Apr 2016 04:38:34 GMT 65 | server: 66 | - nginx 67 | set-cookie: 68 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 69 | content-length: 70 | - '133' 71 | connection: 72 | - Close 73 | body: 74 | encoding: ASCII-8BIT 75 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 76 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0054600238800049}' 77 | http_version: 78 | recorded_at: Sun, 17 Apr 2016 04:37:51 GMT 79 | - request: 80 | method: post 81 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 82 | body: 83 | encoding: UTF-8 84 | string: '' 85 | headers: 86 | User-Agent: 87 | - Faraday v0.9.2 88 | Authorization: 89 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 90 | Content-Type: 91 | - application/x-www-form-urlencoded 92 | response: 93 | status: 94 | code: 200 95 | message: 96 | headers: 97 | cache-control: 98 | - no-cache="set-cookie" 99 | content-type: 100 | - application/json 101 | date: 102 | - Mon, 18 Apr 2016 01:34:07 GMT 103 | server: 104 | - nginx 105 | set-cookie: 106 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 107 | content-length: 108 | - '133' 109 | connection: 110 | - Close 111 | body: 112 | encoding: ASCII-8BIT 113 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 114 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.081536054611206}' 115 | http_version: 116 | recorded_at: Mon, 18 Apr 2016 01:33:24 GMT 117 | - request: 118 | method: post 119 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 120 | body: 121 | encoding: UTF-8 122 | string: '' 123 | headers: 124 | User-Agent: 125 | - Faraday v0.9.2 126 | Authorization: 127 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 128 | Content-Type: 129 | - application/x-www-form-urlencoded 130 | response: 131 | status: 132 | code: 200 133 | message: 134 | headers: 135 | cache-control: 136 | - no-cache="set-cookie" 137 | content-type: 138 | - application/json 139 | date: 140 | - Mon, 18 Apr 2016 01:40:08 GMT 141 | server: 142 | - nginx 143 | set-cookie: 144 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 145 | content-length: 146 | - '134' 147 | connection: 148 | - Close 149 | body: 150 | encoding: ASCII-8BIT 151 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 152 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0053949356079102}' 153 | http_version: 154 | recorded_at: Mon, 18 Apr 2016 01:39:24 GMT 155 | - request: 156 | method: post 157 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 158 | body: 159 | encoding: UTF-8 160 | string: '' 161 | headers: 162 | User-Agent: 163 | - Faraday v0.9.2 164 | Authorization: 165 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 166 | Content-Type: 167 | - application/x-www-form-urlencoded 168 | response: 169 | status: 170 | code: 200 171 | message: 172 | headers: 173 | cache-control: 174 | - no-cache="set-cookie" 175 | content-type: 176 | - application/json 177 | date: 178 | - Mon, 18 Apr 2016 01:45:41 GMT 179 | server: 180 | - nginx 181 | set-cookie: 182 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 183 | content-length: 184 | - '134' 185 | connection: 186 | - Close 187 | body: 188 | encoding: ASCII-8BIT 189 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 190 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0062129497528076}' 191 | http_version: 192 | recorded_at: Mon, 18 Apr 2016 01:44:57 GMT 193 | - request: 194 | method: post 195 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 196 | body: 197 | encoding: UTF-8 198 | string: '' 199 | headers: 200 | User-Agent: 201 | - Faraday v0.9.2 202 | Authorization: 203 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 204 | Content-Type: 205 | - application/x-www-form-urlencoded 206 | response: 207 | status: 208 | code: 200 209 | message: 210 | headers: 211 | cache-control: 212 | - no-cache="set-cookie" 213 | content-type: 214 | - application/json 215 | date: 216 | - Mon, 18 Apr 2016 01:47:21 GMT 217 | server: 218 | - nginx 219 | set-cookie: 220 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 221 | content-length: 222 | - '133' 223 | connection: 224 | - Close 225 | body: 226 | encoding: ASCII-8BIT 227 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 228 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0055720806121826}' 229 | http_version: 230 | recorded_at: Mon, 18 Apr 2016 01:46:38 GMT 231 | - request: 232 | method: post 233 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 234 | body: 235 | encoding: UTF-8 236 | string: '' 237 | headers: 238 | User-Agent: 239 | - Faraday v0.9.2 240 | Authorization: 241 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 242 | Content-Type: 243 | - application/x-www-form-urlencoded 244 | response: 245 | status: 246 | code: 200 247 | message: 248 | headers: 249 | cache-control: 250 | - no-cache="set-cookie" 251 | content-type: 252 | - application/json 253 | date: 254 | - Mon, 18 Apr 2016 01:50:34 GMT 255 | server: 256 | - nginx 257 | set-cookie: 258 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 259 | content-length: 260 | - '134' 261 | connection: 262 | - Close 263 | body: 264 | encoding: ASCII-8BIT 265 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 266 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0051901340484619}' 267 | http_version: 268 | recorded_at: Mon, 18 Apr 2016 01:49:21 GMT 269 | - request: 270 | method: post 271 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 272 | body: 273 | encoding: UTF-8 274 | string: '' 275 | headers: 276 | User-Agent: 277 | - Faraday v0.9.2 278 | Authorization: 279 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 280 | Content-Type: 281 | - application/x-www-form-urlencoded 282 | response: 283 | status: 284 | code: 200 285 | message: 286 | headers: 287 | cache-control: 288 | - no-cache="set-cookie" 289 | content-type: 290 | - application/json 291 | date: 292 | - Mon, 18 Apr 2016 01:51:28 GMT 293 | server: 294 | - nginx 295 | set-cookie: 296 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 297 | content-length: 298 | - '133' 299 | connection: 300 | - Close 301 | body: 302 | encoding: ASCII-8BIT 303 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 304 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0049049854278564}' 305 | http_version: 306 | recorded_at: Mon, 18 Apr 2016 01:50:15 GMT 307 | - request: 308 | method: post 309 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 310 | body: 311 | encoding: UTF-8 312 | string: '' 313 | headers: 314 | User-Agent: 315 | - Faraday v0.9.2 316 | Authorization: 317 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 318 | Content-Type: 319 | - application/x-www-form-urlencoded 320 | response: 321 | status: 322 | code: 200 323 | message: 324 | headers: 325 | cache-control: 326 | - no-cache="set-cookie" 327 | content-type: 328 | - application/json 329 | date: 330 | - Mon, 18 Apr 2016 01:52:01 GMT 331 | server: 332 | - nginx 333 | set-cookie: 334 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 335 | content-length: 336 | - '134' 337 | connection: 338 | - Close 339 | body: 340 | encoding: ASCII-8BIT 341 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 342 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0056521892547607}' 343 | http_version: 344 | recorded_at: Mon, 18 Apr 2016 01:51:18 GMT 345 | - request: 346 | method: post 347 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 348 | body: 349 | encoding: UTF-8 350 | string: '' 351 | headers: 352 | User-Agent: 353 | - Faraday v0.9.2 354 | Authorization: 355 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 356 | Content-Type: 357 | - application/x-www-form-urlencoded 358 | response: 359 | status: 360 | code: 200 361 | message: 362 | headers: 363 | cache-control: 364 | - no-cache="set-cookie" 365 | content-type: 366 | - application/json 367 | date: 368 | - Mon, 18 Apr 2016 01:52:38 GMT 369 | server: 370 | - nginx 371 | set-cookie: 372 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 373 | content-length: 374 | - '133' 375 | connection: 376 | - Close 377 | body: 378 | encoding: ASCII-8BIT 379 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 380 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0047450065612793}' 381 | http_version: 382 | recorded_at: Mon, 18 Apr 2016 01:51:25 GMT 383 | - request: 384 | method: post 385 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 386 | body: 387 | encoding: UTF-8 388 | string: '' 389 | headers: 390 | User-Agent: 391 | - Faraday v0.9.2 392 | Authorization: 393 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 394 | Content-Type: 395 | - application/x-www-form-urlencoded 396 | response: 397 | status: 398 | code: 200 399 | message: 400 | headers: 401 | cache-control: 402 | - no-cache="set-cookie" 403 | content-type: 404 | - application/json 405 | date: 406 | - Mon, 18 Apr 2016 01:56:19 GMT 407 | server: 408 | - nginx 409 | set-cookie: 410 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 411 | content-length: 412 | - '134' 413 | connection: 414 | - Close 415 | body: 416 | encoding: ASCII-8BIT 417 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 418 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0049421787261963}' 419 | http_version: 420 | recorded_at: Mon, 18 Apr 2016 01:55:06 GMT 421 | - request: 422 | method: post 423 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 424 | body: 425 | encoding: UTF-8 426 | string: '' 427 | headers: 428 | User-Agent: 429 | - Faraday v0.9.2 430 | Authorization: 431 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 432 | Content-Type: 433 | - application/x-www-form-urlencoded 434 | response: 435 | status: 436 | code: 200 437 | message: 438 | headers: 439 | cache-control: 440 | - no-cache="set-cookie" 441 | content-type: 442 | - application/json 443 | date: 444 | - Mon, 18 Apr 2016 01:57:05 GMT 445 | server: 446 | - nginx 447 | set-cookie: 448 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 449 | content-length: 450 | - '133' 451 | connection: 452 | - Close 453 | body: 454 | encoding: ASCII-8BIT 455 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 456 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0058069229125977}' 457 | http_version: 458 | recorded_at: Mon, 18 Apr 2016 01:55:52 GMT 459 | - request: 460 | method: post 461 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 462 | body: 463 | encoding: UTF-8 464 | string: '' 465 | headers: 466 | User-Agent: 467 | - Faraday v0.9.2 468 | Authorization: 469 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 470 | Content-Type: 471 | - application/x-www-form-urlencoded 472 | response: 473 | status: 474 | code: 200 475 | message: 476 | headers: 477 | cache-control: 478 | - no-cache="set-cookie" 479 | content-type: 480 | - application/json 481 | date: 482 | - Mon, 18 Apr 2016 01:59:33 GMT 483 | server: 484 | - nginx 485 | set-cookie: 486 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 487 | content-length: 488 | - '133' 489 | connection: 490 | - Close 491 | body: 492 | encoding: ASCII-8BIT 493 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 494 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0052139759063721}' 495 | http_version: 496 | recorded_at: Mon, 18 Apr 2016 01:58:20 GMT 497 | - request: 498 | method: post 499 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 500 | body: 501 | encoding: UTF-8 502 | string: '' 503 | headers: 504 | User-Agent: 505 | - Faraday v0.9.2 506 | Authorization: 507 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 508 | Content-Type: 509 | - application/x-www-form-urlencoded 510 | response: 511 | status: 512 | code: 200 513 | message: 514 | headers: 515 | cache-control: 516 | - no-cache="set-cookie" 517 | content-type: 518 | - application/json 519 | date: 520 | - Mon, 18 Apr 2016 02:00:14 GMT 521 | server: 522 | - nginx 523 | set-cookie: 524 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 525 | content-length: 526 | - '134' 527 | connection: 528 | - Close 529 | body: 530 | encoding: ASCII-8BIT 531 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 532 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0051450729370117}' 533 | http_version: 534 | recorded_at: Mon, 18 Apr 2016 01:59:01 GMT 535 | - request: 536 | method: post 537 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 538 | body: 539 | encoding: UTF-8 540 | string: '' 541 | headers: 542 | User-Agent: 543 | - Faraday v0.9.2 544 | Authorization: 545 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 546 | Content-Type: 547 | - application/x-www-form-urlencoded 548 | response: 549 | status: 550 | code: 200 551 | message: 552 | headers: 553 | cache-control: 554 | - no-cache="set-cookie" 555 | content-type: 556 | - application/json 557 | date: 558 | - Mon, 18 Apr 2016 02:06:16 GMT 559 | server: 560 | - nginx 561 | set-cookie: 562 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 563 | content-length: 564 | - '133' 565 | connection: 566 | - Close 567 | body: 568 | encoding: ASCII-8BIT 569 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 570 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0077629089355469}' 571 | http_version: 572 | recorded_at: Mon, 18 Apr 2016 02:05:03 GMT 573 | - request: 574 | method: post 575 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 576 | body: 577 | encoding: UTF-8 578 | string: '' 579 | headers: 580 | User-Agent: 581 | - Faraday v0.9.2 582 | Authorization: 583 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 584 | Content-Type: 585 | - application/x-www-form-urlencoded 586 | response: 587 | status: 588 | code: 200 589 | message: 590 | headers: 591 | cache-control: 592 | - no-cache="set-cookie" 593 | content-type: 594 | - application/json 595 | date: 596 | - Mon, 18 Apr 2016 02:06:23 GMT 597 | server: 598 | - nginx 599 | set-cookie: 600 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 601 | content-length: 602 | - '134' 603 | connection: 604 | - Close 605 | body: 606 | encoding: ASCII-8BIT 607 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 608 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0061309337615967}' 609 | http_version: 610 | recorded_at: Mon, 18 Apr 2016 02:05:39 GMT 611 | - request: 612 | method: post 613 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 614 | body: 615 | encoding: UTF-8 616 | string: '' 617 | headers: 618 | User-Agent: 619 | - Faraday v0.9.2 620 | Authorization: 621 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 622 | Content-Type: 623 | - application/x-www-form-urlencoded 624 | response: 625 | status: 626 | code: 200 627 | message: 628 | headers: 629 | cache-control: 630 | - no-cache="set-cookie" 631 | content-type: 632 | - application/json 633 | date: 634 | - Mon, 18 Apr 2016 02:08:25 GMT 635 | server: 636 | - nginx 637 | set-cookie: 638 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 639 | content-length: 640 | - '133' 641 | connection: 642 | - Close 643 | body: 644 | encoding: ASCII-8BIT 645 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 646 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0049247741699219}' 647 | http_version: 648 | recorded_at: Mon, 18 Apr 2016 02:07:12 GMT 649 | - request: 650 | method: post 651 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 652 | body: 653 | encoding: UTF-8 654 | string: '' 655 | headers: 656 | User-Agent: 657 | - Faraday v0.9.2 658 | Authorization: 659 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 660 | Content-Type: 661 | - application/x-www-form-urlencoded 662 | response: 663 | status: 664 | code: 200 665 | message: 666 | headers: 667 | cache-control: 668 | - no-cache="set-cookie" 669 | content-type: 670 | - application/json 671 | date: 672 | - Mon, 18 Apr 2016 02:09:11 GMT 673 | server: 674 | - nginx 675 | set-cookie: 676 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 677 | content-length: 678 | - '132' 679 | connection: 680 | - Close 681 | body: 682 | encoding: ASCII-8BIT 683 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 684 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0061578750610352}' 685 | http_version: 686 | recorded_at: Mon, 18 Apr 2016 02:08:29 GMT 687 | - request: 688 | method: post 689 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 690 | body: 691 | encoding: UTF-8 692 | string: '' 693 | headers: 694 | User-Agent: 695 | - Faraday v0.9.2 696 | Authorization: 697 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 698 | Content-Type: 699 | - application/x-www-form-urlencoded 700 | response: 701 | status: 702 | code: 200 703 | message: 704 | headers: 705 | cache-control: 706 | - no-cache="set-cookie" 707 | content-type: 708 | - application/json 709 | date: 710 | - Mon, 18 Apr 2016 02:09:53 GMT 711 | server: 712 | - nginx 713 | set-cookie: 714 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 715 | content-length: 716 | - '135' 717 | connection: 718 | - Close 719 | body: 720 | encoding: ASCII-8BIT 721 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 722 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0054938793182373}' 723 | http_version: 724 | recorded_at: Mon, 18 Apr 2016 02:09:09 GMT 725 | - request: 726 | method: post 727 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 728 | body: 729 | encoding: UTF-8 730 | string: '' 731 | headers: 732 | User-Agent: 733 | - Faraday v0.9.2 734 | Authorization: 735 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 736 | Content-Type: 737 | - application/x-www-form-urlencoded 738 | response: 739 | status: 740 | code: 200 741 | message: 742 | headers: 743 | cache-control: 744 | - no-cache="set-cookie" 745 | content-type: 746 | - application/json 747 | date: 748 | - Mon, 18 Apr 2016 02:12:13 GMT 749 | server: 750 | - nginx 751 | set-cookie: 752 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 753 | content-length: 754 | - '133' 755 | connection: 756 | - Close 757 | body: 758 | encoding: ASCII-8BIT 759 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 760 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.005141019821167}' 761 | http_version: 762 | recorded_at: Mon, 18 Apr 2016 02:11:00 GMT 763 | - request: 764 | method: post 765 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 766 | body: 767 | encoding: UTF-8 768 | string: '' 769 | headers: 770 | User-Agent: 771 | - Faraday v0.9.2 772 | Authorization: 773 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 774 | Content-Type: 775 | - application/x-www-form-urlencoded 776 | response: 777 | status: 778 | code: 200 779 | message: 780 | headers: 781 | cache-control: 782 | - no-cache="set-cookie" 783 | content-type: 784 | - application/json 785 | date: 786 | - Mon, 18 Apr 2016 02:13:26 GMT 787 | server: 788 | - nginx 789 | set-cookie: 790 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 791 | content-length: 792 | - '134' 793 | connection: 794 | - Close 795 | body: 796 | encoding: ASCII-8BIT 797 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 798 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0046498775482178}' 799 | http_version: 800 | recorded_at: Mon, 18 Apr 2016 02:12:12 GMT 801 | - request: 802 | method: post 803 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 804 | body: 805 | encoding: UTF-8 806 | string: '' 807 | headers: 808 | User-Agent: 809 | - Faraday v0.9.2 810 | Authorization: 811 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 812 | Content-Type: 813 | - application/x-www-form-urlencoded 814 | response: 815 | status: 816 | code: 200 817 | message: 818 | headers: 819 | cache-control: 820 | - no-cache="set-cookie" 821 | content-type: 822 | - application/json 823 | date: 824 | - Mon, 18 Apr 2016 02:13:10 GMT 825 | server: 826 | - nginx 827 | set-cookie: 828 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 829 | content-length: 830 | - '134' 831 | connection: 832 | - Close 833 | body: 834 | encoding: ASCII-8BIT 835 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 836 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0056970119476318}' 837 | http_version: 838 | recorded_at: Mon, 18 Apr 2016 02:12:26 GMT 839 | - request: 840 | method: post 841 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 842 | body: 843 | encoding: UTF-8 844 | string: '' 845 | headers: 846 | User-Agent: 847 | - Faraday v0.9.2 848 | Authorization: 849 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 850 | Content-Type: 851 | - application/x-www-form-urlencoded 852 | response: 853 | status: 854 | code: 200 855 | message: 856 | headers: 857 | cache-control: 858 | - no-cache="set-cookie" 859 | content-type: 860 | - application/json 861 | date: 862 | - Mon, 18 Apr 2016 02:14:05 GMT 863 | server: 864 | - nginx 865 | set-cookie: 866 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 867 | content-length: 868 | - '134' 869 | connection: 870 | - Close 871 | body: 872 | encoding: ASCII-8BIT 873 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 874 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0071980953216553}' 875 | http_version: 876 | recorded_at: Mon, 18 Apr 2016 02:12:52 GMT 877 | - request: 878 | method: post 879 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 880 | body: 881 | encoding: UTF-8 882 | string: '' 883 | headers: 884 | User-Agent: 885 | - Faraday v0.9.2 886 | Authorization: 887 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 888 | Content-Type: 889 | - application/x-www-form-urlencoded 890 | response: 891 | status: 892 | code: 200 893 | message: 894 | headers: 895 | cache-control: 896 | - no-cache="set-cookie" 897 | content-type: 898 | - application/json 899 | date: 900 | - Mon, 18 Apr 2016 02:22:34 GMT 901 | server: 902 | - nginx 903 | set-cookie: 904 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 905 | content-length: 906 | - '132' 907 | connection: 908 | - Close 909 | body: 910 | encoding: ASCII-8BIT 911 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 912 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.006303071975708}' 913 | http_version: 914 | recorded_at: Mon, 18 Apr 2016 02:21:50 GMT 915 | - request: 916 | method: post 917 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 918 | body: 919 | encoding: UTF-8 920 | string: '' 921 | headers: 922 | User-Agent: 923 | - Faraday v0.9.2 924 | Authorization: 925 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 926 | Content-Type: 927 | - application/x-www-form-urlencoded 928 | response: 929 | status: 930 | code: 200 931 | message: 932 | headers: 933 | cache-control: 934 | - no-cache="set-cookie" 935 | content-type: 936 | - application/json 937 | date: 938 | - Mon, 18 Apr 2016 02:23:39 GMT 939 | server: 940 | - nginx 941 | set-cookie: 942 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 943 | content-length: 944 | - '133' 945 | connection: 946 | - Close 947 | body: 948 | encoding: ASCII-8BIT 949 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 950 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0049319267272949}' 951 | http_version: 952 | recorded_at: Mon, 18 Apr 2016 02:22:25 GMT 953 | - request: 954 | method: post 955 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 956 | body: 957 | encoding: UTF-8 958 | string: '' 959 | headers: 960 | User-Agent: 961 | - Faraday v0.9.2 962 | Authorization: 963 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 964 | Content-Type: 965 | - application/x-www-form-urlencoded 966 | response: 967 | status: 968 | code: 200 969 | message: 970 | headers: 971 | cache-control: 972 | - no-cache="set-cookie" 973 | content-type: 974 | - application/json 975 | date: 976 | - Mon, 18 Apr 2016 02:24:19 GMT 977 | server: 978 | - nginx 979 | set-cookie: 980 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 981 | content-length: 982 | - '133' 983 | connection: 984 | - Close 985 | body: 986 | encoding: ASCII-8BIT 987 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 988 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0051310062408447}' 989 | http_version: 990 | recorded_at: Mon, 18 Apr 2016 02:23:06 GMT 991 | - request: 992 | method: post 993 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 994 | body: 995 | encoding: UTF-8 996 | string: '' 997 | headers: 998 | User-Agent: 999 | - Faraday v0.9.2 1000 | Authorization: 1001 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1002 | Content-Type: 1003 | - application/x-www-form-urlencoded 1004 | response: 1005 | status: 1006 | code: 200 1007 | message: 1008 | headers: 1009 | cache-control: 1010 | - no-cache="set-cookie" 1011 | content-type: 1012 | - application/json 1013 | date: 1014 | - Mon, 18 Apr 2016 02:24:32 GMT 1015 | server: 1016 | - nginx 1017 | set-cookie: 1018 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 1019 | content-length: 1020 | - '133' 1021 | connection: 1022 | - Close 1023 | body: 1024 | encoding: ASCII-8BIT 1025 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1026 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.005295991897583}' 1027 | http_version: 1028 | recorded_at: Mon, 18 Apr 2016 02:23:19 GMT 1029 | - request: 1030 | method: post 1031 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1032 | body: 1033 | encoding: UTF-8 1034 | string: '' 1035 | headers: 1036 | User-Agent: 1037 | - Faraday v0.9.2 1038 | Authorization: 1039 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1040 | Content-Type: 1041 | - application/x-www-form-urlencoded 1042 | response: 1043 | status: 1044 | code: 200 1045 | message: 1046 | headers: 1047 | cache-control: 1048 | - no-cache="set-cookie" 1049 | content-type: 1050 | - application/json 1051 | date: 1052 | - Mon, 18 Apr 2016 02:24:23 GMT 1053 | server: 1054 | - nginx 1055 | set-cookie: 1056 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 1057 | content-length: 1058 | - '134' 1059 | connection: 1060 | - Close 1061 | body: 1062 | encoding: ASCII-8BIT 1063 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1064 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0053720474243164}' 1065 | http_version: 1066 | recorded_at: Mon, 18 Apr 2016 02:23:39 GMT 1067 | - request: 1068 | method: post 1069 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1070 | body: 1071 | encoding: UTF-8 1072 | string: '' 1073 | headers: 1074 | User-Agent: 1075 | - Faraday v0.9.2 1076 | Authorization: 1077 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1078 | Content-Type: 1079 | - application/x-www-form-urlencoded 1080 | response: 1081 | status: 1082 | code: 200 1083 | message: 1084 | headers: 1085 | cache-control: 1086 | - no-cache="set-cookie" 1087 | content-type: 1088 | - application/json 1089 | date: 1090 | - Mon, 18 Apr 2016 04:23:25 GMT 1091 | server: 1092 | - nginx 1093 | set-cookie: 1094 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 1095 | content-length: 1096 | - '134' 1097 | connection: 1098 | - Close 1099 | body: 1100 | encoding: ASCII-8BIT 1101 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1102 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0051250457763672}' 1103 | http_version: 1104 | recorded_at: Mon, 18 Apr 2016 04:22:11 GMT 1105 | - request: 1106 | method: post 1107 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1108 | body: 1109 | encoding: UTF-8 1110 | string: '' 1111 | headers: 1112 | User-Agent: 1113 | - Faraday v0.9.2 1114 | Authorization: 1115 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1116 | Content-Type: 1117 | - application/x-www-form-urlencoded 1118 | response: 1119 | status: 1120 | code: 200 1121 | message: 1122 | headers: 1123 | cache-control: 1124 | - no-cache="set-cookie" 1125 | content-type: 1126 | - application/json 1127 | date: 1128 | - Mon, 18 Apr 2016 04:30:49 GMT 1129 | server: 1130 | - nginx 1131 | set-cookie: 1132 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 1133 | content-length: 1134 | - '133' 1135 | connection: 1136 | - Close 1137 | body: 1138 | encoding: ASCII-8BIT 1139 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1140 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.005558967590332}' 1141 | http_version: 1142 | recorded_at: Mon, 18 Apr 2016 04:30:05 GMT 1143 | - request: 1144 | method: post 1145 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1146 | body: 1147 | encoding: UTF-8 1148 | string: '' 1149 | headers: 1150 | User-Agent: 1151 | - Faraday v0.9.2 1152 | Authorization: 1153 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1154 | Content-Type: 1155 | - application/x-www-form-urlencoded 1156 | response: 1157 | status: 1158 | code: 200 1159 | message: 1160 | headers: 1161 | cache-control: 1162 | - no-cache="set-cookie" 1163 | content-type: 1164 | - application/json 1165 | date: 1166 | - Mon, 18 Apr 2016 09:07:53 GMT 1167 | server: 1168 | - nginx 1169 | set-cookie: 1170 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 1171 | content-length: 1172 | - '134' 1173 | connection: 1174 | - Close 1175 | body: 1176 | encoding: ASCII-8BIT 1177 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1178 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0053119659423828}' 1179 | http_version: 1180 | recorded_at: Mon, 18 Apr 2016 09:06:39 GMT 1181 | - request: 1182 | method: post 1183 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1184 | body: 1185 | encoding: UTF-8 1186 | string: '' 1187 | headers: 1188 | User-Agent: 1189 | - Faraday v0.9.2 1190 | Authorization: 1191 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1192 | Content-Type: 1193 | - application/x-www-form-urlencoded 1194 | response: 1195 | status: 1196 | code: 200 1197 | message: 1198 | headers: 1199 | cache-control: 1200 | - no-cache="set-cookie" 1201 | content-type: 1202 | - application/json 1203 | date: 1204 | - Wed, 20 Apr 2016 05:57:25 GMT 1205 | server: 1206 | - nginx 1207 | set-cookie: 1208 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 1209 | content-length: 1210 | - '133' 1211 | connection: 1212 | - Close 1213 | body: 1214 | encoding: ASCII-8BIT 1215 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1216 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0046260356903076}' 1217 | http_version: 1218 | recorded_at: Wed, 20 Apr 2016 05:56:09 GMT 1219 | - request: 1220 | method: post 1221 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1222 | body: 1223 | encoding: UTF-8 1224 | string: '' 1225 | headers: 1226 | User-Agent: 1227 | - Faraday v0.9.2 1228 | Authorization: 1229 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1230 | Content-Type: 1231 | - application/x-www-form-urlencoded 1232 | response: 1233 | status: 1234 | code: 200 1235 | message: 1236 | headers: 1237 | cache-control: 1238 | - no-cache="set-cookie" 1239 | content-type: 1240 | - application/json 1241 | date: 1242 | - Wed, 20 Apr 2016 05:59:27 GMT 1243 | server: 1244 | - nginx 1245 | set-cookie: 1246 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 1247 | content-length: 1248 | - '133' 1249 | connection: 1250 | - Close 1251 | body: 1252 | encoding: ASCII-8BIT 1253 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1254 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0058860778808594}' 1255 | http_version: 1256 | recorded_at: Wed, 20 Apr 2016 05:58:43 GMT 1257 | - request: 1258 | method: post 1259 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1260 | body: 1261 | encoding: UTF-8 1262 | string: '' 1263 | headers: 1264 | User-Agent: 1265 | - Faraday v0.9.2 1266 | Authorization: 1267 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1268 | Content-Type: 1269 | - application/x-www-form-urlencoded 1270 | response: 1271 | status: 1272 | code: 200 1273 | message: 1274 | headers: 1275 | cache-control: 1276 | - no-cache="set-cookie" 1277 | content-type: 1278 | - application/json 1279 | date: 1280 | - Wed, 20 Apr 2016 06:00:14 GMT 1281 | server: 1282 | - nginx 1283 | set-cookie: 1284 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE24C72716D1598092BA84F2A4D0CD05FB80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 1285 | content-length: 1286 | - '133' 1287 | connection: 1288 | - Close 1289 | body: 1290 | encoding: ASCII-8BIT 1291 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1292 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0049889087677002}' 1293 | http_version: 1294 | recorded_at: Wed, 20 Apr 2016 05:58:58 GMT 1295 | - request: 1296 | method: post 1297 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1298 | body: 1299 | encoding: UTF-8 1300 | string: '' 1301 | headers: 1302 | User-Agent: 1303 | - Faraday v0.9.2 1304 | Authorization: 1305 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1306 | Content-Type: 1307 | - application/x-www-form-urlencoded 1308 | response: 1309 | status: 1310 | code: 200 1311 | message: 1312 | headers: 1313 | cache-control: 1314 | - no-cache="set-cookie" 1315 | content-type: 1316 | - application/json 1317 | date: 1318 | - Wed, 20 Apr 2016 06:00:43 GMT 1319 | server: 1320 | - nginx 1321 | set-cookie: 1322 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC9EB985401B1EF9927BA37C8650EA8CD80AF12A236DDED0891787B85697921A87CAF5921B951EBA6F871B7CF56F8FAFF;PATH=/;MAX-AGE=900 1323 | content-length: 1324 | - '134' 1325 | connection: 1326 | - Close 1327 | body: 1328 | encoding: ASCII-8BIT 1329 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1330 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0051259994506836}' 1331 | http_version: 1332 | recorded_at: Wed, 20 Apr 2016 05:59:28 GMT 1333 | - request: 1334 | method: post 1335 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1336 | body: 1337 | encoding: UTF-8 1338 | string: '' 1339 | headers: 1340 | User-Agent: 1341 | - Faraday v0.9.2 1342 | Authorization: 1343 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1344 | Content-Type: 1345 | - application/x-www-form-urlencoded 1346 | response: 1347 | status: 1348 | code: 200 1349 | message: 1350 | headers: 1351 | cache-control: 1352 | - no-cache="set-cookie" 1353 | content-type: 1354 | - application/json 1355 | date: 1356 | - Wed, 20 Apr 2016 06:01:04 GMT 1357 | server: 1358 | - nginx 1359 | set-cookie: 1360 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FE68921C05410A99714E8F20686BAA3D6483E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 1361 | content-length: 1362 | - '134' 1363 | connection: 1364 | - Close 1365 | body: 1366 | encoding: ASCII-8BIT 1367 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1368 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0056118965148926}' 1369 | http_version: 1370 | recorded_at: Wed, 20 Apr 2016 06:00:20 GMT 1371 | - request: 1372 | method: post 1373 | uri: https://jusibe.com/smsapi/delivery_status?message_id=message_id 1374 | body: 1375 | encoding: UTF-8 1376 | string: '' 1377 | headers: 1378 | User-Agent: 1379 | - Faraday v0.9.2 1380 | Authorization: 1381 | - Basic NjBmNTQxYzAxYmZmMmZmNTViZjhjZTc2NDMwMDk2ODM6NDVjM2M1ODc3ZDg4YzJhYWQ1MjYzYmFlOTI0ZGRhZGE= 1382 | Content-Type: 1383 | - application/x-www-form-urlencoded 1384 | response: 1385 | status: 1386 | code: 200 1387 | message: 1388 | headers: 1389 | cache-control: 1390 | - no-cache="set-cookie" 1391 | content-type: 1392 | - application/json 1393 | date: 1394 | - Wed, 20 Apr 2016 06:05:50 GMT 1395 | server: 1396 | - nginx 1397 | set-cookie: 1398 | - AWSELB=CF47C7270E7E0FA602E751EFF42FB148D6C61D79FEC19CA2FD6B35C5F31CC3673DB183FC5683E52775EDE06319E4C99A4319262B2F067EF553842B596ABE715D7F971C2BAE;PATH=/;MAX-AGE=900 1399 | content-length: 1400 | - '134' 1401 | connection: 1402 | - Close 1403 | body: 1404 | encoding: ASCII-8BIT 1405 | string: '{"message_id":"message_id","status":"Delivered","date_sent":"2016-04-16 1406 | 00:02:13","date_delivered":"2016-04-16 00:02:18","request_speed":0.0057070255279541}' 1407 | http_version: 1408 | recorded_at: Wed, 20 Apr 2016 06:05:05 GMT 1409 | recorded_with: VCR 3.0.1 1410 | --------------------------------------------------------------------------------