require File.expand_path('../../../config/environment', __FILE__)

Swars::Battle.destroy_all
Swars::Importer::FullHistoryImporter.new(user_key: "DevUser1").call
tp Swars::Membership
# >> [fetch][history] https://shogiwars.heroz.jp/games/history?gtype=&page=1&user_id=DevUser1
# >> DevUser1 P1 10分 [全3件][新3件][最後]
# >> 最後のページと思われるので終わる
# >> [fetch][record] https://shogiwars.heroz.jp/games/DevUser1-YamadaTaro-20200101_123401?locale=ja
# >> [fetch][record] https://shogiwars.heroz.jp/games/DevUser2-YamadaTaro-20200101_123402?locale=ja
# >> [fetch][record] https://shogiwars.heroz.jp/games/DevUser3-YamadaTaro-20200101_123403?locale=ja
# >> [fetch][history] https://shogiwars.heroz.jp/games/history?gtype=sb&page=1&user_id=DevUser1
# >> DevUser1 P1 3分 [全3件][新0件][最後]
# >> 最後のページと思われるので終わる
# >> [fetch][history] https://shogiwars.heroz.jp/games/history?gtype=s1&page=1&user_id=DevUser1
# >> DevUser1 P1 10秒 [全3件][新0件][最後]
# >> 最後のページと思われるので終わる
# >> |------+-----------+---------+------------+----------+----------+------------+---------------------------+---------------------------+---------------+---------------+----------------+------------+-----------+---------------+--------------+----------+-------------+------------------+-----------------+--------------------+---------------+----------------|
# >> | id   | battle_id | user_id | op_user_id | grade_id | position | grade_diff | created_at                | updated_at                | think_all_avg | think_end_avg | two_serial_max | think_last | think_max | obt_think_avg | ai_drop_total | judge_id | location_id | defense_tag_list | attack_tag_list | technique_tag_list | note_tag_list | other_tag_list |
# >> |------+-----------+---------+------------+----------+----------+------------+---------------------------+---------------------------+---------------+---------------+----------------+------------+-----------+---------------+--------------+----------+-------------+------------------+-----------------+--------------------+---------------+----------------|
# >> | 1389 |       793 |     241 |        242 |        8 |        0 |          1 | 2022-11-07 10:31:03 +0900 | 2022-11-07 10:31:03 +0900 |             7 |            14 |              3 |          6 |        58 |            11 |            2 |        1 |           1 |                  |                 |                    |               |                |
# >> | 1390 |       793 |     242 |        241 |        7 |        1 |         -1 | 2022-11-07 10:31:03 +0900 | 2022-11-07 10:31:03 +0900 |            10 |            10 |              1 |          8 |        98 |            14 |            2 |        2 |           2 |                  |                 |                    |               |                |
# >> | 1391 |       794 |     243 |        242 |        8 |        0 |          1 | 2022-11-07 10:31:04 +0900 | 2022-11-07 10:31:04 +0900 |             7 |            14 |              3 |          6 |        58 |            11 |            2 |        1 |           1 |                  |                 |                    |               |                |
# >> | 1392 |       794 |     242 |        243 |        7 |        1 |         -1 | 2022-11-07 10:31:04 +0900 | 2022-11-07 10:31:04 +0900 |            10 |            10 |              1 |          8 |        98 |            14 |            2 |        2 |           2 |                  |                 |                    |               |                |
# >> | 1393 |       795 |     244 |        242 |        8 |        0 |          1 | 2022-11-07 10:31:04 +0900 | 2022-11-07 10:31:04 +0900 |             7 |            14 |              3 |          6 |        58 |            11 |            2 |        1 |           1 |                  |                 |                    |               |                |
# >> | 1394 |       795 |     242 |        244 |        7 |        1 |         -1 | 2022-11-07 10:31:04 +0900 | 2022-11-07 10:31:04 +0900 |            10 |            10 |              1 |          8 |        98 |            14 |            2 |        2 |           2 |                  |                 |                    |               |                |
# >> |------+-----------+---------+------------+----------+----------+------------+---------------------------+---------------------------+---------------+---------------+----------------+------------+-----------+---------------+--------------+----------+-------------+------------------+-----------------+--------------------+---------------+----------------|
