ishapi 0.1.8.206 → 0.1.8.208

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3aeface2dba2d166267df32fcc6680c9f121465d3f9ae66804834585e1f2547e
4
- data.tar.gz: d1c630a20e6b0c32be76dc410e79d90f1389fb16b3622051af18c3b345c236fb
3
+ metadata.gz: 61aa78240308a81dd1943ca2ec266875544c11a6a2f6032911cc16813a3ded11
4
+ data.tar.gz: b36754c20ba230883a1d69419e2e0a43de5d6b54d8053702b0c406a0efedada5
5
5
  SHA512:
6
- metadata.gz: 7c398ea25e892904e09dfedbef7bbd6a29035d1c3e03efb973b686fcb622fa1187dcde4c4d60b982b4d9863bd777f399e132c10bc31c87e60e5976a1d280f021
7
- data.tar.gz: a9f2009714bb5d353819560e1433cd43ed533c16cfa1f64b6432fd7bc1c7e9692673b88148720d2aa0529cf1ee206789c5fe947950807a4f0c7e44596f285f0f
6
+ metadata.gz: a8a2220dceeeb7854292e1f84d38138568d80938316d9816d0483c6833b85c0e8d6994a311f1b8178ebc70fd8db429ae0b5c93cc790726e0f728130088304f88
7
+ data.tar.gz: d2e087f2156e1b32a772afefede46e22542b7116c8121ba5007c9ede4b344a7bcba6f1e28b735ece2e30218d463f2a57a631e912168b522b497b19b720db12fc
@@ -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
@@ -63,6 +63,11 @@ class Ishapi::Ability
63
63
  m.is_public
64
64
  end
65
65
 
66
+ #
67
+ # O
68
+ #
69
+ # can [ :view_chain ], ::Iro::OptionPriceItem
70
+
66
71
  #
67
72
  # P
68
73
  #
@@ -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
- ## 2022-02-12 moved to iron_warbler gem _vp_
47
- # resources "stock_watches"
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.206
4
+ version: 0.1.8.208
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-31 00:00:00.000000000 Z
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