appoxy_api 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/api/client.rb +17 -6
  2. 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
- def add_params(command_path, hash)
68
+ # old way
69
+ def add_params(command_path, hash)
70
70
  ts = Appoxy::Api::Signatures.generate_timestamp(Time.now.gmtime)
71
- #p "hash_to s" + command_path + Appoxy::Api::Signatures.hash_to_s(hash)
72
- sig = Appoxy::Api::Signatures.generate_signature(command_path + Appoxy::Api::Signatures.hash_to_s(hash), ts, secret_key)
73
- extra_params = {'sigv'=>"0.2", 'sig' => sig, 'timestamp' => ts, 'access_key' => access_key}
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
- end
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)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Travis Reeder