robinhood-api 0.6.1 → 0.6.4

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/robinhood/api.rb +7 -27
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10cebf9bac38761ff2e032bbebd34dd842580f4590a8766451a0687514b0f073
4
- data.tar.gz: 8221f6a97c41a3c91d2df8e52c1d7c499f98f5d1aca09b3bbbcd40346f78f4d3
3
+ metadata.gz: 45527da658148faf70dcd8b6c1897445bfee2337b7b46b22203efa6d39c585e7
4
+ data.tar.gz: e2e5a197be3bfbc572bb9c3db0e272641c0c10def4b7bc96d64bb103b01cba72
5
5
  SHA512:
6
- metadata.gz: 5dc1d8b88f0fef0cc1c7b1c51c2c9bf6e5c15b0f9ab720baf25938ab6ca692ab85d7f2e37d9ef0753f2ba32f30436daaf40341421bf6fd8525200853daa29186
7
- data.tar.gz: 845b46edcb19cdc6b4517e996c2113a4cb637a4b94060d312beb56fc3cc67d66f52a638fd9501d912e6e7ea99716c60f13b59c88e8f7e8c0cf131f4054055a91
6
+ metadata.gz: b29b1231243e15aef3a6623a7e5c330541f4cd48f52425657ae27dab4cd004741669150b995270d43a7584386d2aa14f97e5d1d2c8f54572916ec620c0e87ed6
7
+ data.tar.gz: f4ce6159d225935cfb3fc88d1b6b0b31033b2ae3d765362ba2eaa6fc9439299e064ecaf355d6a25bd1c18f546edbedf468895b984b98144521b3bccc86ccc1c0
@@ -25,6 +25,7 @@ module Robinhood
25
25
  require 'httparty'
26
26
  require 'json'
27
27
 
28
+ require_relative './api/accounts'
28
29
  require_relative './api/orders'
29
30
 
30
31
  include HTTParty
@@ -50,26 +51,6 @@ module Robinhood
50
51
  response
51
52
  end
52
53
 
53
- def investment_profile
54
- raw_response = HTTParty.get(
55
- endpoints[:investment_profile], headers: headers
56
- )
57
- JSON.parse(raw_response.body)
58
- end
59
-
60
- def accounts
61
- raw_response = HTTParty.get(endpoints[:accounts], headers: headers)
62
- JSON.parse(raw_response.body)
63
- end
64
-
65
- def portfolio(account_number)
66
- raw_response = HTTParty.get(
67
- "https://api.robinhood.com/accounts/#{account_number}/portfolio/",
68
- headers: headers
69
- )
70
- JSON.parse(raw_response.body)
71
- end
72
-
73
54
  def instruments(symbol)
74
55
  if symbol.include?('-')
75
56
  raw_response = HTTParty.get(
@@ -127,12 +108,6 @@ module Robinhood
127
108
  }
128
109
  end
129
110
 
130
- def methodlist
131
- %i[investment_profile accounts ach_iav_auth ach_relationships
132
- ach_transfers applications dividends edocuments margin_upgrade
133
- notifications orders password_reset document_requests user watchlists]
134
- end
135
-
136
111
  def headers
137
112
  @headers ||= {
138
113
  'Accept' => 'application/json'
@@ -150,7 +125,6 @@ module Robinhood
150
125
  true
151
126
  end
152
127
  end
153
-
154
128
  # before(*instance_methods) { puts 'start' }
155
129
  end
156
130
 
@@ -158,6 +132,12 @@ module Robinhood
158
132
  class Api
159
133
  include ApiModule
160
134
 
135
+ def self.methodlist
136
+ %i[investment_profile accounts ach_iav_auth ach_relationships
137
+ ach_transfers applications dividends edocuments margin_upgrade
138
+ notifications orders password_reset document_requests user watchlists]
139
+ end
140
+
161
141
  def self.flatten(var)
162
142
  new_var = {}
163
143
  var.each do |k, v|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robinhood-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Alcala
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-22 00:00:00.000000000 Z
11
+ date: 2018-04-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Get the most of Robinhood: accounts, positions, portfolio, buy and sell
14
14
  securities, etc.'