Method: Jets::Commands::Call#client_context

Defined in:
lib/jets/commands/call.rb

#client_contextObject

TODO: Hook client_context up and make sure it works. Think I’ve figure out how to sign client_context below. Client context must be a valid Base64-encoded JSON object Example: docs.aws.amazon.com/mobileanalytics/latest/ug/PutEvents.html



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/jets/commands/call.rb', line 147

def client_context
  context = {
    "client" => {
      "client_id" => "Jets",
      "app_title" => "jets call cli",
      "app_version_name" => Jets::VERSION,
    },
    "custom" => {},
    "env" =>{
      "platform" => RUBY_PLATFORM,
      "platform_version" => RUBY_VERSION,
    }
  }
  Base64.encode64(JSON.dump(context))
end