kabustation_client 1.0.0 → 1.2.0
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/.github/workflows/gem-push.yml +36 -0
- data/.github/workflows/ruby.yml +38 -0
- data/.gitignore +39 -0
- data/.gitlab-ci.yml +26 -0
- data/.openapi-generator/FILES +162 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +23 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/.travis.yml +11 -0
- data/README.md +74 -9
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/docs/InfoApi.md +157 -93
- data/docs/OrderApi.md +48 -28
- data/docs/RegisterApi.md +37 -23
- data/docs/RequestSendOrderDerivFutureReverseLimitOrder.md +1 -1
- data/docs/RequestSendOrderReverseLimitOrder.md +1 -1
- data/docs/WalletApi.md +100 -64
- data/kabu_STATION_API.yaml +8698 -0
- data/kabustation_client.gemspec +6 -2
- data/lib/kabustation_client/api/info_api.rb +52 -143
- data/lib/kabustation_client/api/order_api.rb +16 -44
- data/lib/kabustation_client/api/register_api.rb +12 -33
- data/lib/kabustation_client/api/wallet_api.rb +32 -88
- data/lib/kabustation_client/api_client.rb +1 -0
- data/lib/kabustation_client/configuration.rb +7 -0
- data/lib/kabustation_client/models/request_send_order_deriv_future_reverse_limit_order.rb +1 -1
- data/lib/kabustation_client/models/request_send_order_reverse_limit_order.rb +1 -1
- data/lib/kabustation_client/push_client.rb +53 -0
- data/lib/kabustation_client/version.rb +1 -1
- data/lib/kabustation_client.rb +3 -0
- metadata +91 -63
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b056cd69b523eeb7805d822583d0b9ab7299e93fa4e60544f3dc2eb9238a97
|
4
|
+
data.tar.gz: 90bfc5292755371196b2e3cc7ebc638022a4c31fd6ec6c661be590ea87c2f23c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d03115c357982ee9c529fe729079d3ce02aec781b6237adf12fb6af02f539c46c89c14a56648581f619d7e632101fb7bc13e192873c0d3074b4b49ebc279d46
|
7
|
+
data.tar.gz: 66e52d768dc7e54b2551b4d2bd25e5c21c50d4fbbf6166c15448f55f3242210a045f97dadd9e8193bcc84fc1b782d57db52d7a1a8cd40a92e2e9b9b20068c5a3
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "main" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "main" ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
name: Build + Publish
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
permissions:
|
14
|
+
contents: read
|
15
|
+
packages: write
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v3
|
19
|
+
- name: Set up Ruby 3.3
|
20
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
21
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
22
|
+
# uses: ruby/setup-ruby@v1
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: 3.3.0
|
26
|
+
|
27
|
+
- name: Publish to RubyGems
|
28
|
+
run: |
|
29
|
+
mkdir -p $HOME/.gem
|
30
|
+
touch $HOME/.gem/credentials
|
31
|
+
chmod 0600 $HOME/.gem/credentials
|
32
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
33
|
+
gem build *.gemspec
|
34
|
+
gem push *.gem
|
35
|
+
env:
|
36
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ "main" ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ "main" ]
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
matrix:
|
25
|
+
ruby-version: ['2.7.8','3.2.2']
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v3
|
29
|
+
- name: Set up Ruby
|
30
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
31
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
32
|
+
# uses: ruby/setup-ruby@v1
|
33
|
+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rake
|
data/.gitignore
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Generated by: https://openapi-generator.tech
|
2
|
+
#
|
3
|
+
|
4
|
+
*.gem
|
5
|
+
*.rbc
|
6
|
+
/.config
|
7
|
+
/coverage/
|
8
|
+
/InstalledFiles
|
9
|
+
/pkg/
|
10
|
+
/spec/reports/
|
11
|
+
/spec/examples.txt
|
12
|
+
/test/tmp/
|
13
|
+
/test/version_tmp/
|
14
|
+
/tmp/
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
|
21
|
+
## Documentation cache and generated files:
|
22
|
+
/.yardoc/
|
23
|
+
/_yardoc/
|
24
|
+
/doc/
|
25
|
+
/rdoc/
|
26
|
+
|
27
|
+
## Environment normalization:
|
28
|
+
/.bundle/
|
29
|
+
/vendor/bundle
|
30
|
+
/lib/bundler/man/
|
31
|
+
|
32
|
+
# for a library or gem, you might want to ignore these files since the code is
|
33
|
+
# intended to run in multiple environments; otherwise, check them in:
|
34
|
+
Gemfile.lock
|
35
|
+
.ruby-version
|
36
|
+
# .ruby-gemset
|
37
|
+
|
38
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
39
|
+
.rvmrc
|
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
.ruby: &ruby
|
2
|
+
variables:
|
3
|
+
LANG: "C.UTF-8"
|
4
|
+
before_script:
|
5
|
+
- ruby -v
|
6
|
+
- bundle config set --local deployment true
|
7
|
+
- bundle install -j $(nproc)
|
8
|
+
parallel:
|
9
|
+
matrix:
|
10
|
+
- RUBY_VERSION: ['2.7', '3.0', '3.1']
|
11
|
+
image: "ruby:$RUBY_VERSION"
|
12
|
+
cache:
|
13
|
+
paths:
|
14
|
+
- vendor/ruby
|
15
|
+
key: 'ruby-$RUBY_VERSION'
|
16
|
+
|
17
|
+
gem:
|
18
|
+
extends: .ruby
|
19
|
+
script:
|
20
|
+
- bundle exec rspec
|
21
|
+
- bundle exec rake build
|
22
|
+
- bundle exec rake install
|
23
|
+
artifacts:
|
24
|
+
paths:
|
25
|
+
- pkg/*.gem
|
26
|
+
|
@@ -0,0 +1,162 @@
|
|
1
|
+
.gitignore
|
2
|
+
.gitlab-ci.yml
|
3
|
+
.rspec
|
4
|
+
.rubocop.yml
|
5
|
+
.travis.yml
|
6
|
+
Gemfile
|
7
|
+
README.md
|
8
|
+
Rakefile
|
9
|
+
docs/ApiSoftLimitResponse.md
|
10
|
+
docs/AuthApi.md
|
11
|
+
docs/BoardSuccess.md
|
12
|
+
docs/BoardSuccessBuy1.md
|
13
|
+
docs/BoardSuccessBuy10.md
|
14
|
+
docs/BoardSuccessBuy2.md
|
15
|
+
docs/BoardSuccessBuy3.md
|
16
|
+
docs/BoardSuccessBuy4.md
|
17
|
+
docs/BoardSuccessBuy5.md
|
18
|
+
docs/BoardSuccessBuy6.md
|
19
|
+
docs/BoardSuccessBuy7.md
|
20
|
+
docs/BoardSuccessBuy8.md
|
21
|
+
docs/BoardSuccessBuy9.md
|
22
|
+
docs/BoardSuccessSell1.md
|
23
|
+
docs/BoardSuccessSell10.md
|
24
|
+
docs/BoardSuccessSell2.md
|
25
|
+
docs/BoardSuccessSell3.md
|
26
|
+
docs/BoardSuccessSell4.md
|
27
|
+
docs/BoardSuccessSell5.md
|
28
|
+
docs/BoardSuccessSell6.md
|
29
|
+
docs/BoardSuccessSell7.md
|
30
|
+
docs/BoardSuccessSell8.md
|
31
|
+
docs/BoardSuccessSell9.md
|
32
|
+
docs/ErrorResponse.md
|
33
|
+
docs/ExchangeResponse.md
|
34
|
+
docs/InfoApi.md
|
35
|
+
docs/MarginPremiumResponse.md
|
36
|
+
docs/MarginPremiumResponseDayTrade.md
|
37
|
+
docs/MarginPremiumResponseGeneralMargin.md
|
38
|
+
docs/OrderApi.md
|
39
|
+
docs/OrderSuccess.md
|
40
|
+
docs/OrdersSuccess.md
|
41
|
+
docs/OrdersSuccessDetailsInner.md
|
42
|
+
docs/Positions.md
|
43
|
+
docs/PositionsDeriv.md
|
44
|
+
docs/PositionsSuccess.md
|
45
|
+
docs/PrimaryExchangeResponse.md
|
46
|
+
docs/RankingByCategoryResponse.md
|
47
|
+
docs/RankingByCategoryResponseRankingInner.md
|
48
|
+
docs/RankingByMarginResponse.md
|
49
|
+
docs/RankingByMarginResponseRankingInner.md
|
50
|
+
docs/RankingByTickCountResponse.md
|
51
|
+
docs/RankingByTickCountResponseRankingInner.md
|
52
|
+
docs/RankingByTradeValueResponse.md
|
53
|
+
docs/RankingByTradeValueResponseRankingInner.md
|
54
|
+
docs/RankingByTradeVolumeResponse.md
|
55
|
+
docs/RankingByTradeVolumeResponseRankingInner.md
|
56
|
+
docs/RankingDefaultResponse.md
|
57
|
+
docs/RankingDefaultResponseRankingInner.md
|
58
|
+
docs/RankingGet200Response.md
|
59
|
+
docs/RegistSuccess.md
|
60
|
+
docs/RegisterApi.md
|
61
|
+
docs/RegulationsResponse.md
|
62
|
+
docs/RegulationsResponseRegulationsInfoInner.md
|
63
|
+
docs/RequestCancelOrder.md
|
64
|
+
docs/RequestRegister.md
|
65
|
+
docs/RequestRegisterSymbolsInner.md
|
66
|
+
docs/RequestSendOrder.md
|
67
|
+
docs/RequestSendOrderDerivFuture.md
|
68
|
+
docs/RequestSendOrderDerivFutureReverseLimitOrder.md
|
69
|
+
docs/RequestSendOrderDerivOption.md
|
70
|
+
docs/RequestSendOrderReverseLimitOrder.md
|
71
|
+
docs/RequestToken.md
|
72
|
+
docs/RequestUnregister.md
|
73
|
+
docs/SymbolNameSuccess.md
|
74
|
+
docs/SymbolSuccess.md
|
75
|
+
docs/TokenSuccess.md
|
76
|
+
docs/UnregisterAllSuccess.md
|
77
|
+
docs/WalletApi.md
|
78
|
+
docs/WalletCashSuccess.md
|
79
|
+
docs/WalletFutureSuccess.md
|
80
|
+
docs/WalletMarginSuccess.md
|
81
|
+
docs/WalletOptionSuccess.md
|
82
|
+
git_push.sh
|
83
|
+
kabustation_client.gemspec
|
84
|
+
lib/kabustation_client.rb
|
85
|
+
lib/kabustation_client/api/auth_api.rb
|
86
|
+
lib/kabustation_client/api/info_api.rb
|
87
|
+
lib/kabustation_client/api/order_api.rb
|
88
|
+
lib/kabustation_client/api/register_api.rb
|
89
|
+
lib/kabustation_client/api/wallet_api.rb
|
90
|
+
lib/kabustation_client/api_client.rb
|
91
|
+
lib/kabustation_client/api_error.rb
|
92
|
+
lib/kabustation_client/configuration.rb
|
93
|
+
lib/kabustation_client/models/api_soft_limit_response.rb
|
94
|
+
lib/kabustation_client/models/board_success.rb
|
95
|
+
lib/kabustation_client/models/board_success_buy1.rb
|
96
|
+
lib/kabustation_client/models/board_success_buy10.rb
|
97
|
+
lib/kabustation_client/models/board_success_buy2.rb
|
98
|
+
lib/kabustation_client/models/board_success_buy3.rb
|
99
|
+
lib/kabustation_client/models/board_success_buy4.rb
|
100
|
+
lib/kabustation_client/models/board_success_buy5.rb
|
101
|
+
lib/kabustation_client/models/board_success_buy6.rb
|
102
|
+
lib/kabustation_client/models/board_success_buy7.rb
|
103
|
+
lib/kabustation_client/models/board_success_buy8.rb
|
104
|
+
lib/kabustation_client/models/board_success_buy9.rb
|
105
|
+
lib/kabustation_client/models/board_success_sell1.rb
|
106
|
+
lib/kabustation_client/models/board_success_sell10.rb
|
107
|
+
lib/kabustation_client/models/board_success_sell2.rb
|
108
|
+
lib/kabustation_client/models/board_success_sell3.rb
|
109
|
+
lib/kabustation_client/models/board_success_sell4.rb
|
110
|
+
lib/kabustation_client/models/board_success_sell5.rb
|
111
|
+
lib/kabustation_client/models/board_success_sell6.rb
|
112
|
+
lib/kabustation_client/models/board_success_sell7.rb
|
113
|
+
lib/kabustation_client/models/board_success_sell8.rb
|
114
|
+
lib/kabustation_client/models/board_success_sell9.rb
|
115
|
+
lib/kabustation_client/models/error_response.rb
|
116
|
+
lib/kabustation_client/models/exchange_response.rb
|
117
|
+
lib/kabustation_client/models/margin_premium_response.rb
|
118
|
+
lib/kabustation_client/models/margin_premium_response_day_trade.rb
|
119
|
+
lib/kabustation_client/models/margin_premium_response_general_margin.rb
|
120
|
+
lib/kabustation_client/models/order_success.rb
|
121
|
+
lib/kabustation_client/models/orders_success.rb
|
122
|
+
lib/kabustation_client/models/orders_success_details_inner.rb
|
123
|
+
lib/kabustation_client/models/positions.rb
|
124
|
+
lib/kabustation_client/models/positions_deriv.rb
|
125
|
+
lib/kabustation_client/models/positions_success.rb
|
126
|
+
lib/kabustation_client/models/primary_exchange_response.rb
|
127
|
+
lib/kabustation_client/models/ranking_by_category_response.rb
|
128
|
+
lib/kabustation_client/models/ranking_by_category_response_ranking_inner.rb
|
129
|
+
lib/kabustation_client/models/ranking_by_margin_response.rb
|
130
|
+
lib/kabustation_client/models/ranking_by_margin_response_ranking_inner.rb
|
131
|
+
lib/kabustation_client/models/ranking_by_tick_count_response.rb
|
132
|
+
lib/kabustation_client/models/ranking_by_tick_count_response_ranking_inner.rb
|
133
|
+
lib/kabustation_client/models/ranking_by_trade_value_response.rb
|
134
|
+
lib/kabustation_client/models/ranking_by_trade_value_response_ranking_inner.rb
|
135
|
+
lib/kabustation_client/models/ranking_by_trade_volume_response.rb
|
136
|
+
lib/kabustation_client/models/ranking_by_trade_volume_response_ranking_inner.rb
|
137
|
+
lib/kabustation_client/models/ranking_default_response.rb
|
138
|
+
lib/kabustation_client/models/ranking_default_response_ranking_inner.rb
|
139
|
+
lib/kabustation_client/models/ranking_get200_response.rb
|
140
|
+
lib/kabustation_client/models/regist_success.rb
|
141
|
+
lib/kabustation_client/models/regulations_response.rb
|
142
|
+
lib/kabustation_client/models/regulations_response_regulations_info_inner.rb
|
143
|
+
lib/kabustation_client/models/request_cancel_order.rb
|
144
|
+
lib/kabustation_client/models/request_register.rb
|
145
|
+
lib/kabustation_client/models/request_register_symbols_inner.rb
|
146
|
+
lib/kabustation_client/models/request_send_order.rb
|
147
|
+
lib/kabustation_client/models/request_send_order_deriv_future.rb
|
148
|
+
lib/kabustation_client/models/request_send_order_deriv_future_reverse_limit_order.rb
|
149
|
+
lib/kabustation_client/models/request_send_order_deriv_option.rb
|
150
|
+
lib/kabustation_client/models/request_send_order_reverse_limit_order.rb
|
151
|
+
lib/kabustation_client/models/request_token.rb
|
152
|
+
lib/kabustation_client/models/request_unregister.rb
|
153
|
+
lib/kabustation_client/models/symbol_name_success.rb
|
154
|
+
lib/kabustation_client/models/symbol_success.rb
|
155
|
+
lib/kabustation_client/models/token_success.rb
|
156
|
+
lib/kabustation_client/models/unregister_all_success.rb
|
157
|
+
lib/kabustation_client/models/wallet_cash_success.rb
|
158
|
+
lib/kabustation_client/models/wallet_future_success.rb
|
159
|
+
lib/kabustation_client/models/wallet_margin_success.rb
|
160
|
+
lib/kabustation_client/models/wallet_option_success.rb
|
161
|
+
lib/kabustation_client/version.rb
|
162
|
+
spec/spec_helper.rb
|
@@ -0,0 +1 @@
|
|
1
|
+
7.6.0
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# OpenAPI Generator Ignore
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
3
|
+
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
6
|
+
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
9
|
+
#ApiClient.cs
|
10
|
+
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
12
|
+
#foo/*/qux
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
14
|
+
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
16
|
+
#foo/**/qux
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
18
|
+
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
21
|
+
#docs/*.md
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
23
|
+
#!docs/README.md
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license)
|
2
|
+
# Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
|
3
|
+
AllCops:
|
4
|
+
TargetRubyVersion: 2.4
|
5
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
6
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
7
|
+
DisabledByDefault: true
|
8
|
+
Exclude:
|
9
|
+
- '**/templates/**/*'
|
10
|
+
- '**/vendor/**/*'
|
11
|
+
- 'actionpack/lib/action_dispatch/journey/parser.rb'
|
12
|
+
|
13
|
+
# Prefer &&/|| over and/or.
|
14
|
+
Style/AndOr:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
# Align `when` with `case`.
|
18
|
+
Layout/CaseIndentation:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
# Align comments with method definitions.
|
22
|
+
Layout/CommentIndentation:
|
23
|
+
Enabled: true
|
24
|
+
|
25
|
+
Layout/ElseAlignment:
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
Layout/EmptyLineAfterMagicComment:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
# In a regular class definition, no empty lines around the body.
|
32
|
+
Layout/EmptyLinesAroundClassBody:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
# In a regular method definition, no empty lines around the body.
|
36
|
+
Layout/EmptyLinesAroundMethodBody:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
# In a regular module definition, no empty lines around the body.
|
40
|
+
Layout/EmptyLinesAroundModuleBody:
|
41
|
+
Enabled: true
|
42
|
+
|
43
|
+
Layout/FirstArgumentIndentation:
|
44
|
+
Enabled: true
|
45
|
+
|
46
|
+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
47
|
+
Style/HashSyntax:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
# Method definitions after `private` or `protected` isolated calls need one
|
51
|
+
# extra level of indentation.
|
52
|
+
Layout/IndentationConsistency:
|
53
|
+
Enabled: true
|
54
|
+
EnforcedStyle: indented_internal_methods
|
55
|
+
|
56
|
+
# Two spaces, no tabs (for indentation).
|
57
|
+
Layout/IndentationWidth:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Layout/LeadingCommentSpace:
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Layout/SpaceAfterColon:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Layout/SpaceAfterComma:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Layout/SpaceAroundKeyword:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Layout/SpaceAroundOperators:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Layout/SpaceBeforeComma:
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Layout/SpaceBeforeFirstArg:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Style/DefWithParentheses:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
# Defining a method with parameters needs parentheses.
|
88
|
+
Style/MethodDefParentheses:
|
89
|
+
Enabled: true
|
90
|
+
|
91
|
+
Style/FrozenStringLiteralComment:
|
92
|
+
Enabled: false
|
93
|
+
EnforcedStyle: always
|
94
|
+
|
95
|
+
# Use `foo {}` not `foo{}`.
|
96
|
+
Layout/SpaceBeforeBlockBraces:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
# Use `foo { bar }` not `foo {bar}`.
|
100
|
+
Layout/SpaceInsideBlockBraces:
|
101
|
+
Enabled: true
|
102
|
+
|
103
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
104
|
+
Layout/SpaceInsideHashLiteralBraces:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
Layout/SpaceInsideParens:
|
108
|
+
Enabled: true
|
109
|
+
|
110
|
+
# Check quotes usage according to lint rule below.
|
111
|
+
#Style/StringLiterals:
|
112
|
+
# Enabled: true
|
113
|
+
# EnforcedStyle: single_quotes
|
114
|
+
|
115
|
+
# Detect hard tabs, no hard tabs.
|
116
|
+
Layout/IndentationStyle:
|
117
|
+
Enabled: true
|
118
|
+
|
119
|
+
# Blank lines should not have any spaces.
|
120
|
+
Layout/TrailingEmptyLines:
|
121
|
+
Enabled: true
|
122
|
+
|
123
|
+
# No trailing whitespace.
|
124
|
+
Layout/TrailingWhitespace:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
# Use quotes for string literals when they are enough.
|
128
|
+
Style/RedundantPercentQ:
|
129
|
+
Enabled: true
|
130
|
+
|
131
|
+
# Align `end` with the matching keyword or starting expression except for
|
132
|
+
# assignments, where it should be aligned with the LHS.
|
133
|
+
Layout/EndAlignment:
|
134
|
+
Enabled: true
|
135
|
+
EnforcedStyleAlignWith: variable
|
136
|
+
AutoCorrect: true
|
137
|
+
|
138
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
139
|
+
Lint/RequireParentheses:
|
140
|
+
Enabled: true
|
141
|
+
|
142
|
+
Style/RedundantReturn:
|
143
|
+
Enabled: true
|
144
|
+
AllowMultipleReturnValues: true
|
145
|
+
|
146
|
+
Style/Semicolon:
|
147
|
+
Enabled: true
|
148
|
+
AllowAsExpressionSeparator: true
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -9,8 +9,8 @@ KabustationClient - the Ruby gem for the kabuステーションAPI
|
|
9
9
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
10
10
|
|
11
11
|
- API version: 1.5
|
12
|
-
- Package version: 1.
|
13
|
-
- Generator version: 7.
|
12
|
+
- Package version: 1.2.0
|
13
|
+
- Generator version: 7.6.0
|
14
14
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
15
15
|
For more information, please visit [https://kabucom.github.io/kabusapi/ptal/index.html](https://kabucom.github.io/kabusapi/ptal/index.html)
|
16
16
|
|
@@ -27,22 +27,22 @@ gem build kabustation_client.gemspec
|
|
27
27
|
Then either install the gem locally:
|
28
28
|
|
29
29
|
```shell
|
30
|
-
gem install ./kabustation_client-1.
|
30
|
+
gem install ./kabustation_client-1.1.0.gem
|
31
31
|
```
|
32
32
|
|
33
|
-
(for development, run `gem install --dev ./kabustation_client-1.
|
33
|
+
(for development, run `gem install --dev ./kabustation_client-1.1.0.gem` to install the development dependencies)
|
34
34
|
|
35
35
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
36
36
|
|
37
37
|
Finally add this to the Gemfile:
|
38
38
|
|
39
|
-
gem 'kabustation_client', '~> 1.
|
39
|
+
gem 'kabustation_client', '~> 1.1.0'
|
40
40
|
|
41
41
|
### Install from Git
|
42
42
|
|
43
|
-
If the Ruby gem is hosted at a git repository: https://github.com/
|
43
|
+
If the Ruby gem is hosted at a git repository: https://github.com/kyohah/kabustation_client-ruby, then add the following in the Gemfile:
|
44
44
|
|
45
|
-
gem 'kabustation_client', :git => 'https://github.com/
|
45
|
+
gem 'kabustation_client', :git => 'https://github.com/kyohah/kabustation_client-ruby.git'
|
46
46
|
|
47
47
|
### Include the Ruby code directly
|
48
48
|
|
@@ -56,10 +56,52 @@ ruby -Ilib script.rb
|
|
56
56
|
|
57
57
|
Please follow the [installation](#installation) procedure and then run the following code:
|
58
58
|
|
59
|
+
## Windowsのnginxの設定
|
60
|
+
windows マシンで rubyを動かすなら不要
|
61
|
+
|
62
|
+
```nginx.conf
|
63
|
+
worker_processes 1;
|
64
|
+
events {
|
65
|
+
worker_connections 1024;
|
66
|
+
}
|
67
|
+
http {
|
68
|
+
include mime.types;
|
69
|
+
default_type application/octet-stream;
|
70
|
+
sendfile on;
|
71
|
+
keepalive_timeout 65;
|
72
|
+
|
73
|
+
map $http_upgrade $connection_upgrade {
|
74
|
+
default upgrade;
|
75
|
+
'' close;
|
76
|
+
}
|
77
|
+
|
78
|
+
server {
|
79
|
+
listen 80;
|
80
|
+
server_name localhost;
|
81
|
+
|
82
|
+
proxy_http_version 1.1;
|
83
|
+
proxy_set_header Host localhost;
|
84
|
+
proxy_set_header Upgrade $http_upgrade;
|
85
|
+
proxy_set_header Connection $connection_upgrade;
|
86
|
+
|
87
|
+
location /production/ { # 本番用
|
88
|
+
proxy_pass http://127.0.0.1:18080/kabusapi;
|
89
|
+
}
|
90
|
+
|
91
|
+
location /development/ { # 検証用
|
92
|
+
proxy_pass http://127.0.0.1:18081/kabusapi;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
```
|
59
97
|
```ruby
|
60
|
-
# Load the gem
|
61
98
|
require 'kabustation_client'
|
62
99
|
|
100
|
+
KabustationClient.configure do |config|
|
101
|
+
config.host = ENV.fetch('KABUSTATION_HOST', 'localhost')
|
102
|
+
config.base_path = '/production'
|
103
|
+
end
|
104
|
+
|
63
105
|
api_instance = KabustationClient::AuthApi.new
|
64
106
|
request_token = KabustationClient::RequestToken.new({api_password: 'xxxxxx'}) # RequestToken |
|
65
107
|
|
@@ -71,6 +113,22 @@ rescue KabustationClient::ApiError => e
|
|
71
113
|
puts "Exception when calling AuthApi->token_post: #{e}"
|
72
114
|
end
|
73
115
|
|
116
|
+
|
117
|
+
KabustationClient.configure.api_key['ApiKeyAuth'] = result.token
|
118
|
+
|
119
|
+
register_instance = KabustationClient::RegisterApi.new
|
120
|
+
instance = KabustationClient::RequestRegister.new(symbols: [{symbol: '5401', exchange: 1}])
|
121
|
+
result = register_instance.register_put(instance)
|
122
|
+
|
123
|
+
|
124
|
+
client = KabustationClient::PushClient.new(
|
125
|
+
open: -> { puts "WebSocket opened" },
|
126
|
+
message: -> (board) { puts "Received message: #{board.symbol_name}" }, # KabustationClient::BoardSuccess
|
127
|
+
error: -> (e) { puts "Error occurred: #{e}" },
|
128
|
+
close: -> (e) { puts "Connection closed: #{e}" }
|
129
|
+
)
|
130
|
+
client.connect
|
131
|
+
|
74
132
|
```
|
75
133
|
|
76
134
|
## Documentation for API Endpoints
|
@@ -184,5 +242,12 @@ Class | Method | HTTP request | Description
|
|
184
242
|
|
185
243
|
## Documentation for Authorization
|
186
244
|
|
187
|
-
|
245
|
+
|
246
|
+
Authentication schemes defined for the API:
|
247
|
+
### ApiKeyAuth
|
248
|
+
|
249
|
+
|
250
|
+
- **Type**: API key
|
251
|
+
- **API key parameter name**: X-API-Key
|
252
|
+
- **Location**: HTTP header
|
188
253
|
|
data/bin/console
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "kabustation_client"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
require "irb"
|
11
|
+
IRB.start(__FILE__)
|