btrade 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/btrade.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f748ad6a5904fdc4793ba65e73ab2792a7a0dc71
|
4
|
+
data.tar.gz: df6f578c0229dbe6efdba951853d80ec1c090b9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60283f1214c143dfd0583bcabcfd00d6defa54b99922257e1645687dd531c7af70231be6713cd9727972f1bbccb378ae6b72653f093b3601e1df903ea0f3627c
|
7
|
+
data.tar.gz: 8737116feb0fa770d929c99ffdc4b72b3dcfff159e50b45380c50ff850e4c43cc3ae1b1f15a4c49db88d03bf2685193554029aff5f546c6206bac69207c264bf
|
data/lib/btrade.rb
CHANGED
@@ -19,6 +19,12 @@ module Btrade
|
|
19
19
|
@@consumer = OAuth::Consumer.new(consumer_key[:token], consumer_key[:secret], {:site => "https://etws.etrade.com", :http_method => :get})
|
20
20
|
end
|
21
21
|
|
22
|
+
def self.get_auth_url
|
23
|
+
token = @@consumer.get_request_token()
|
24
|
+
|
25
|
+
"https://us.etrade.com/e/t/etws/authorize?key=#{escape(@@consumer.key)}5&token=#{token.token}"
|
26
|
+
end
|
27
|
+
|
22
28
|
def self.get_request_token
|
23
29
|
@@consumer.get_request_token()
|
24
30
|
end
|