appoxy_api 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/api/client.rb +17 -6
- metadata +2 -2
data/lib/api/client.rb
CHANGED
@@ -65,15 +65,26 @@ module Appoxy
|
|
65
65
|
url
|
66
66
|
end
|
67
67
|
|
68
|
-
|
69
|
-
|
68
|
+
# old way
|
69
|
+
def add_params(command_path, hash)
|
70
70
|
ts = Appoxy::Api::Signatures.generate_timestamp(Time.now.gmtime)
|
71
|
-
#
|
72
|
-
sig = Appoxy::Api::Signatures.generate_signature(command_path
|
73
|
-
|
71
|
+
# puts 'timestamp = ' + ts
|
72
|
+
sig = Appoxy::Api::Signatures.generate_signature(command_path, ts, secret_key)
|
73
|
+
|
74
|
+
extra_params = {'sigv'=>"0.1", 'sig' => sig, 'timestamp' => ts, 'access_key' => access_key}
|
74
75
|
hash.merge!(extra_params)
|
75
76
|
|
76
|
-
|
77
|
+
end
|
78
|
+
|
79
|
+
# new way
|
80
|
+
# def add_params(command_path, hash)
|
81
|
+
# ts = Appoxy::Api::Signatures.generate_timestamp(Time.now.gmtime)
|
82
|
+
# #p "hash_to s" + command_path + Appoxy::Api::Signatures.hash_to_s(hash)
|
83
|
+
# sig = Appoxy::Api::Signatures.generate_signature(command_path + Appoxy::Api::Signatures.hash_to_s(hash), ts, secret_key)
|
84
|
+
# extra_params = {'sigv'=>"0.2", 'sig' => sig, 'timestamp' => ts, 'access_key' => access_key}
|
85
|
+
# hash.merge!(extra_params)
|
86
|
+
#
|
87
|
+
# end
|
77
88
|
|
78
89
|
|
79
90
|
def append_params(host, params)
|