ishapi 0.1.8.206 → 0.1.8.209
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.
- checksums.yaml +4 -4
- data/app/controllers/ishapi/email_messages_controller.rb +22 -0
- data/app/controllers/ishapi/maps_controller.rb +0 -2
- data/app/controllers/ishapi/option_price_items_controller.rb +47 -0
- data/app/controllers/ishapi/stock_watches_controller.rb +2 -2
- data/app/models/ishapi/ability.rb +5 -0
- data/app/views/ishapi/option_price_items/view.jbuilder +17 -0
- data/config/routes.rb +6 -2
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d5821b755e518868140a727c0573bb165589fba598f861da1c8a9e08c34d95d
|
4
|
+
data.tar.gz: 708c3128c4893be521cf0bb01e60c62829181c0cbf6c3e7e875bf4e5a9c06a22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfbde56e9220445dde4ba96c22625d67eae9fd75aa3423ec9758a48997c19702b33624323dd331741f9de792d6ce221b03ba22b5a7a0973a80d7a69293e2d90f
|
7
|
+
data.tar.gz: bf634683fa9f83a98eb5f996c9cee9fbf5dbad0b0621ce66597f0422252430c4cbb6548cbffc5302fd3299acb96a9e0c088f2a2084ec781f759442b7e7b37ebc
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
require_dependency "ishapi/application_controller"
|
3
|
+
|
4
|
+
module Ishapi
|
5
|
+
class EmailMessagesController < ApplicationController
|
6
|
+
|
7
|
+
def receive
|
8
|
+
if params[:secret] != AWS_SES_LAMBDA_SECRET
|
9
|
+
render status: 400, json: { status: 400 }
|
10
|
+
return
|
11
|
+
end
|
12
|
+
|
13
|
+
msg = Office::EmailMessage.new({ object_path: params[:object_path] })
|
14
|
+
if msg.save
|
15
|
+
render status: :ok, json: { status: :ok }
|
16
|
+
else
|
17
|
+
render status: 400, json: { status: 400 }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -5,8 +5,6 @@ class Ishapi::MapsController < Ishapi::ApplicationController
|
|
5
5
|
before_action :check_profile, only: [ :show ]
|
6
6
|
|
7
7
|
def show
|
8
|
-
puts! @current_profile, '@current_profile'
|
9
|
-
|
10
8
|
if 'self' == params[:slug] # @TODO: constantize _vp_ 2023-01-11
|
11
9
|
@location = ::Gameui::Map.where( slug: @current_profile[:email] ).first
|
12
10
|
else
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require_dependency "ishapi/application_controller"
|
2
|
+
|
3
|
+
module Ishapi
|
4
|
+
class OptionPriceItemsController < ApplicationController
|
5
|
+
|
6
|
+
# before_action :soft_check_long_term_token, only: [ :show ]
|
7
|
+
# before_action :check_jwt
|
8
|
+
|
9
|
+
## params: symbol, begin_at, end_at
|
10
|
+
def view
|
11
|
+
authorize! :view_chain, ::Iro::OptionPriceItem.new
|
12
|
+
@opis = ::Iro::OptionPriceItem.where({ ticker: params[:symbol]
|
13
|
+
}).where( "timestamp BETWEEN ? and ? ", params[:begin_at], params[:end_at]
|
14
|
+
).limit(100)
|
15
|
+
end
|
16
|
+
|
17
|
+
def view_by_symbol
|
18
|
+
authorize! :view_chain, ::Iro::OptionPriceItem.new
|
19
|
+
@opis = ::Iro::OptionPriceItem.where({ symbol: params[:symbol]
|
20
|
+
}).limit(100)
|
21
|
+
render 'view'
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
=begin
|
28
|
+
|
29
|
+
SELECT symbol, bid, ask, MAX(`timestamp`) as a
|
30
|
+
FROM iwa_option_price_items
|
31
|
+
where symbol = "GME_021023P20"
|
32
|
+
GROUP BY symbol, bid, ask, DATE(`timestamp`), HOUR(`timestamp`), Minute(`timestamp`)
|
33
|
+
order by a desc;
|
34
|
+
|
35
|
+
SELECT symbol, MAX(`timestamp`) as a
|
36
|
+
FROM iwa_option_price_items
|
37
|
+
where symbol = "GME_021023P20"
|
38
|
+
GROUP BY symbol, DATE(`timestamp`), HOUR(`timestamp`), Minute(`timestamp`)
|
39
|
+
order by a desc;
|
40
|
+
|
41
|
+
select timestamp as a FROM iwa_option_price_items
|
42
|
+
where symbol = "GME_021023P20"
|
43
|
+
order by a desc;
|
44
|
+
|
45
|
+
=end
|
46
|
+
|
47
|
+
|
@@ -5,8 +5,8 @@ module Ishapi
|
|
5
5
|
before_action :check_jwt
|
6
6
|
|
7
7
|
def index
|
8
|
-
authorize! :index, IronWarbler::StockWatch
|
9
|
-
@stock_watches = IronWarbler::StockWatch.active # @TODO: restrict by-profile, no?
|
8
|
+
# authorize! :index, IronWarbler::StockWatch
|
9
|
+
# @stock_watches = IronWarbler::StockWatch.active # @TODO: restrict by-profile, no?
|
10
10
|
end
|
11
11
|
|
12
12
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# ishapi / option_price_items / view
|
3
|
+
#
|
4
|
+
|
5
|
+
|
6
|
+
json.array! @opis do |opi|
|
7
|
+
json.ticker opi.ticker
|
8
|
+
# json.putCall opi.putCall
|
9
|
+
json.symbol opi.symbol
|
10
|
+
json.bid opi.bid
|
11
|
+
json.ask opi.ask
|
12
|
+
json.last opi.last
|
13
|
+
# json.lastPrice opi.lastPrice
|
14
|
+
# json.open opi.openPrice
|
15
|
+
json.timestamp opi.timestamp
|
16
|
+
end
|
17
|
+
|
data/config/routes.rb
CHANGED
@@ -28,6 +28,8 @@ Ishapi::Engine.routes.draw do
|
|
28
28
|
# N
|
29
29
|
delete 'newsitems/:id', to: 'newsitems#destroy'
|
30
30
|
|
31
|
+
post 'email_message', to: 'email_messages#receive'
|
32
|
+
|
31
33
|
post 'do_purchase', to: 'gameui#do_purchase' # @TODO: rename to just purchase, or destroy endpoint
|
32
34
|
post 'payments', :to => 'payments#create'
|
33
35
|
post 'payments2', :to => 'payments#create2' # @TODO: change
|
@@ -43,8 +45,10 @@ Ishapi::Engine.routes.draw do
|
|
43
45
|
|
44
46
|
post 'stars/buy', to: 'gameui#buy_stars'
|
45
47
|
|
46
|
-
|
47
|
-
# resources
|
48
|
+
|
49
|
+
# resources :option_price_items
|
50
|
+
get 'option_price_items/view-by/symbol/:symbol', to: 'option_price_items#view_by_symbol' ## the symbol is detailed eg 'GME_011924P30'
|
51
|
+
get 'option_price_items/view/:symbol/from/:begin_at/to/:end_at', to: 'option_price_items#view'
|
48
52
|
|
49
53
|
|
50
54
|
get 'test', to: 'application#test'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.209
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '2.7'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: aws-sdk-s3
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: stripe
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,6 +210,7 @@ files:
|
|
196
210
|
- app/assets/stylesheets/scaffold.css
|
197
211
|
- app/controllers/ishapi/addresses_controller.rb
|
198
212
|
- app/controllers/ishapi/application_controller.rb
|
213
|
+
- app/controllers/ishapi/email_messages_controller.rb
|
199
214
|
- app/controllers/ishapi/galleries_controller.rb
|
200
215
|
- app/controllers/ishapi/gameui_controller.rb
|
201
216
|
- app/controllers/ishapi/invoices_controller.rb
|
@@ -204,6 +219,7 @@ files:
|
|
204
219
|
- app/controllers/ishapi/my/reports_controller.rb
|
205
220
|
- app/controllers/ishapi/my/videos_controller.rb
|
206
221
|
- app/controllers/ishapi/newsitems_controller.rb
|
222
|
+
- app/controllers/ishapi/option_price_items_controller.rb
|
207
223
|
- app/controllers/ishapi/order_items_controller.rb
|
208
224
|
- app/controllers/ishapi/orders_controller.rb
|
209
225
|
- app/controllers/ishapi/payments_controller.rb
|
@@ -243,6 +259,7 @@ files:
|
|
243
259
|
- app/views/ishapi/my/videos/index.jbuilder
|
244
260
|
- app/views/ishapi/newsitems/_index.jbuilder
|
245
261
|
- app/views/ishapi/newsitems/index.jbuilder
|
262
|
+
- app/views/ishapi/option_price_items/view.jbuilder
|
246
263
|
- app/views/ishapi/orders/_item.jbuilder
|
247
264
|
- app/views/ishapi/orders/_show.jbuilder
|
248
265
|
- app/views/ishapi/photos/_index.jbuilder
|