eve_online 0.31.0 → 0.35.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +18 -49
  3. data/.deepsource.toml +5 -0
  4. data/.ruby-version +1 -1
  5. data/Appraisals +0 -12
  6. data/CHANGELOG.md +42 -0
  7. data/Gemfile.lock +55 -51
  8. data/Gemfile.mutant.lock +38 -35
  9. data/README.md +308 -111
  10. data/eve_online.gemspec +3 -3
  11. data/lib/eve_online.rb +24 -6
  12. data/lib/eve_online/esi/alliance_corporations.rb +1 -1
  13. data/lib/eve_online/esi/alliances.rb +1 -1
  14. data/lib/eve_online/esi/base.rb +8 -0
  15. data/lib/eve_online/esi/character_assets.rb +1 -1
  16. data/lib/eve_online/esi/character_calendar.rb +1 -1
  17. data/lib/eve_online/esi/character_calendar_event.rb +1 -1
  18. data/lib/eve_online/esi/{character_bookmarks.rb → character_contracts.rb} +7 -7
  19. data/lib/eve_online/esi/character_location.rb +1 -1
  20. data/lib/eve_online/esi/character_online.rb +1 -1
  21. data/lib/eve_online/esi/character_ship.rb +1 -1
  22. data/lib/eve_online/esi/character_skills.rb +1 -1
  23. data/lib/eve_online/esi/character_wallet.rb +1 -1
  24. data/lib/eve_online/esi/character_wallet_journal.rb +2 -2
  25. data/lib/eve_online/esi/character_wallet_transactions.rb +41 -0
  26. data/lib/eve_online/esi/corporation_assets.rb +1 -1
  27. data/lib/eve_online/esi/corporation_npc.rb +20 -0
  28. data/lib/eve_online/esi/killmail.rb +30 -0
  29. data/lib/eve_online/esi/market_prices.rb +27 -0
  30. data/lib/eve_online/esi/models/aggressor.rb +1 -1
  31. data/lib/eve_online/esi/models/alliance.rb +1 -1
  32. data/lib/eve_online/esi/models/alliance_icon.rb +1 -1
  33. data/lib/eve_online/esi/models/alliance_short.rb +1 -1
  34. data/lib/eve_online/esi/models/ally.rb +1 -1
  35. data/lib/eve_online/esi/models/ancestry.rb +1 -1
  36. data/lib/eve_online/esi/models/asset.rb +1 -1
  37. data/lib/eve_online/esi/models/asset_location.rb +1 -1
  38. data/lib/eve_online/esi/models/asset_name.rb +1 -1
  39. data/lib/eve_online/esi/models/asteroid_belt.rb +1 -1
  40. data/lib/eve_online/esi/models/attributes.rb +1 -1
  41. data/lib/eve_online/esi/models/bloodline.rb +1 -1
  42. data/lib/eve_online/esi/models/blueprint.rb +1 -1
  43. data/lib/eve_online/esi/models/category.rb +1 -1
  44. data/lib/eve_online/esi/models/character.rb +1 -1
  45. data/lib/eve_online/esi/models/character_corporation_history.rb +1 -1
  46. data/lib/eve_online/esi/models/character_industry_job.rb +1 -1
  47. data/lib/eve_online/esi/models/character_location.rb +1 -1
  48. data/lib/eve_online/esi/models/character_order.rb +1 -1
  49. data/lib/eve_online/esi/models/character_portrait.rb +1 -1
  50. data/lib/eve_online/esi/models/character_ship.rb +1 -1
  51. data/lib/eve_online/esi/models/constellation.rb +1 -1
  52. data/lib/eve_online/esi/models/contract.rb +132 -0
  53. data/lib/eve_online/esi/models/coordinates.rb +1 -1
  54. data/lib/eve_online/esi/models/corporation.rb +1 -1
  55. data/lib/eve_online/esi/models/corporation_alliance_history.rb +1 -1
  56. data/lib/eve_online/esi/models/corporation_industry_job.rb +1 -1
  57. data/lib/eve_online/esi/models/corporation_order.rb +1 -1
  58. data/lib/eve_online/esi/models/defender.rb +1 -1
  59. data/lib/eve_online/esi/models/dogma_attribute.rb +1 -1
  60. data/lib/eve_online/esi/models/dogma_attribute_short.rb +1 -1
  61. data/lib/eve_online/esi/models/dogma_effect.rb +1 -1
  62. data/lib/eve_online/esi/models/dogma_effect_modifier.rb +1 -1
  63. data/lib/eve_online/esi/models/dogma_effect_short.rb +1 -1
  64. data/lib/eve_online/esi/models/event.rb +1 -1
  65. data/lib/eve_online/esi/models/event_details.rb +1 -1
  66. data/lib/eve_online/esi/models/faction.rb +1 -1
  67. data/lib/eve_online/esi/models/fatigue.rb +1 -1
  68. data/lib/eve_online/esi/models/graphic.rb +1 -1
  69. data/lib/eve_online/esi/models/group.rb +1 -1
  70. data/lib/eve_online/esi/models/home_location.rb +1 -1
  71. data/lib/eve_online/esi/models/jump_clone.rb +1 -1
  72. data/lib/eve_online/esi/models/killmail.rb +47 -0
  73. data/lib/eve_online/esi/models/killmail_short.rb +1 -1
  74. data/lib/eve_online/esi/models/loyalty_point.rb +1 -1
  75. data/lib/eve_online/esi/models/loyalty_store_offer.rb +1 -1
  76. data/lib/eve_online/esi/models/mail.rb +1 -1
  77. data/lib/eve_online/esi/models/mail_label.rb +1 -1
  78. data/lib/eve_online/esi/models/mail_recipient.rb +1 -1
  79. data/lib/eve_online/esi/models/market_group.rb +1 -1
  80. data/lib/eve_online/esi/models/market_history.rb +1 -1
  81. data/lib/eve_online/esi/models/market_price.rb +29 -0
  82. data/lib/eve_online/esi/models/moon.rb +1 -1
  83. data/lib/eve_online/esi/models/notification.rb +1 -1
  84. data/lib/eve_online/esi/models/offer_required_item.rb +1 -1
  85. data/lib/eve_online/esi/models/online.rb +1 -1
  86. data/lib/eve_online/esi/models/planet.rb +1 -1
  87. data/lib/eve_online/esi/models/planet_short.rb +1 -1
  88. data/lib/eve_online/esi/models/position.rb +1 -1
  89. data/lib/eve_online/esi/models/public_contract.rb +98 -0
  90. data/lib/eve_online/esi/models/public_contract_item.rb +59 -0
  91. data/lib/eve_online/esi/models/race.rb +3 -3
  92. data/lib/eve_online/esi/models/region.rb +1 -1
  93. data/lib/eve_online/esi/models/server_status.rb +1 -1
  94. data/lib/eve_online/esi/models/skill.rb +1 -1
  95. data/lib/eve_online/esi/models/skill_queue_entry.rb +1 -1
  96. data/lib/eve_online/esi/models/standing.rb +1 -1
  97. data/lib/eve_online/esi/models/star.rb +1 -1
  98. data/lib/eve_online/esi/models/stargate.rb +1 -1
  99. data/lib/eve_online/esi/models/station.rb +1 -1
  100. data/lib/eve_online/esi/models/system.rb +1 -1
  101. data/lib/eve_online/esi/models/system_jump.rb +1 -1
  102. data/lib/eve_online/esi/models/system_kill.rb +1 -1
  103. data/lib/eve_online/esi/models/type.rb +1 -1
  104. data/lib/eve_online/esi/models/{wallet_journal_entry.rb → wallet_journal.rb} +4 -4
  105. data/lib/eve_online/esi/models/wallet_transaction.rb +66 -0
  106. data/lib/eve_online/esi/models/war.rb +1 -1
  107. data/lib/eve_online/esi/public_contract.rb +40 -0
  108. data/lib/eve_online/esi/public_contracts.rb +40 -0
  109. data/lib/eve_online/exceptions/error_limited.rb +8 -0
  110. data/lib/eve_online/formulas/blueprint_copy_time.rb +47 -0
  111. data/lib/eve_online/version.rb +1 -1
  112. metadata +25 -13
  113. data/lib/eve_online/esi/character_bookmark_folders.rb +0 -41
  114. data/lib/eve_online/esi/models/bookmark.rb +0 -71
  115. data/lib/eve_online/esi/models/bookmark_folder.rb +0 -24
data/README.md CHANGED
@@ -3,8 +3,9 @@
3
3
  [![CircleCI](https://circleci.com/gh/evemonk/eve_online.svg?style=svg)](https://circleci.com/gh/evemonk/eve_online)
4
4
  [![Gem Version](https://badge.fury.io/rb/eve_online.svg)](https://badge.fury.io/rb/eve_online)
5
5
  [![Gem Downloads](https://img.shields.io/gem/dt/eve_online.svg)](https://rubygems.org/gems/eve_online)
6
- [![Test Coverage](https://api.codeclimate.com/v1/badges/955073c905b91d53e68c/test_coverage)](https://codeclimate.com/github/evemonk/eve_online/test_coverage)
6
+ [![Known Vulnerabilities](https://snyk.io/test/github/evemonk/eve_online/badge.svg)](https://snyk.io/test/github/evemonk/eve_online)
7
7
  [![security](https://hakiri.io/github/evemonk/eve_online/master.svg)](https://hakiri.io/github/evemonk/eve_online/master)
8
+ [![DeepSource](https://static.deepsource.io/deepsource-badge-light-mini.svg)](https://deepsource.io/gh/evemonk/eve_online/?ref=repository-badge)
8
9
 
9
10
  This gem implement Ruby API for EveOnline MMORPG (ESI).
10
11
 
@@ -48,17 +49,13 @@ gem install eve_online
48
49
 
49
50
  ## Supported ruby versions
50
51
 
51
- * MRI 2.4
52
52
  * MRI 2.5
53
53
  * MRI 2.6
54
54
  * MRI 2.7
55
- * JRuby 9.2.9.0
55
+ * JRuby 9.2.11.1
56
56
 
57
57
  ## Supported rails versions
58
58
 
59
- * 4.2
60
- * 5.0
61
- * 5.1
62
59
  * 5.2
63
60
  * 6.0
64
61
  * Edge
@@ -331,74 +328,8 @@ corporation_assets_names.etag # => NotImplementedError
331
328
 
332
329
  #### List bookmarks
333
330
 
334
- ```ruby
335
- options = { token: 'token123', character_id: 90_729_314, page: 1 }
336
-
337
- character_bookmarks = EveOnline::ESI::CharacterBookmarks.new(options)
338
-
339
- character_bookmarks.scope # => "esi-bookmarks.read_character_bookmarks.v1"
340
-
341
- character_bookmarks.page # => 1
342
-
343
- character_bookmarks.total_pages # => 1
344
-
345
- character_bookmarks.bookmarks.size # => 20
346
-
347
- bookmark = character_bookmarks.bookmarks.first
348
-
349
- bookmark.as_json # => {:bookmark_id=>4,
350
- # :created=>Mon, 09 Jul 2012 22:38:31 UTC +00:00,
351
- # :creator_id=>2112625428,
352
- # :folder_id=>5,
353
- # :item_id=>30003496,
354
- # :item_type_id=>5,
355
- # :label=>"Stargate",
356
- # :location_id=>30003430,
357
- # :notes=>"This is a stargate"}
358
-
359
- bookmark.bookmark_id # => 4
360
- bookmark.created # => Mon, 09 Jul 2012 22:38:31 UTC +00:00
361
- bookmark.creator_id # => 2112625428
362
- bookmark.folder_id # => 5
363
- bookmark.item_id # => 30003496
364
- bookmark.item_type_id # => 5
365
- bookmark.label # => "Stargate"
366
- bookmark.location_id # => 30003430
367
- bookmark.notes # => "This is a stargate"
368
-
369
- bookmark.coordinates.as_json # => {:x=>-144951231521.81625,
370
- # :y=>164030047870.25558,
371
- # :z=>211467631848.1311}
372
-
373
- # TODO: character_bookmarks.etag
374
- ```
375
-
376
331
  #### List bookmark folders
377
332
 
378
- ```ruby
379
- options = { token: 'token123', character_id: 90_729_314, page: 1 }
380
-
381
- character_bookmark_folders = EveOnline::ESI::CharacterBookmarkFolders.new(options)
382
-
383
- character_bookmark_folders.scope # => "esi-bookmarks.read_character_bookmarks.v1"
384
-
385
- character_bookmark_folders.page # => 1
386
-
387
- character_bookmark_folders.total_pages # => 1
388
-
389
- character_bookmark_folders.bookmark_folders.size # => 1
390
-
391
- bookmark_folder = character_bookmark_folders.bookmark_folders.first
392
-
393
- bookmark_folder.as_json # => {:folder_id=>5,
394
- # :name=>"Icecream"}
395
-
396
- bookmark_folder.folder_id # => 5
397
- bookmark_folder.name # => "Icecream"
398
-
399
- # TODO: character_bookmark_folders.etag
400
- ```
401
-
402
333
  #### List corporation bookmarks
403
334
 
404
335
  #### List corporation bookmark folders
@@ -645,15 +576,15 @@ character_portrait = EveOnline::ESI::CharacterPortrait.new(options)
645
576
 
646
577
  character_portrait.scope # => nil
647
578
 
648
- character_portrait.as_json # => {:medium=>"http://imageserver.eveonline.com/Character/90729314_128.jpg",
649
- # :large=>"http://imageserver.eveonline.com/Character/90729314_256.jpg",
650
- # :huge=>"http://imageserver.eveonline.com/Character/90729314_512.jpg",
651
- # :small=>"http://imageserver.eveonline.com/Character/90729314_64.jpg"}
579
+ character_portrait.as_json # => {:medium=>"https://images.evetech.net/Character/1337512245_128.jpg",
580
+ # :large=>"https://images.evetech.net/Character/1337512245_256.jpg",
581
+ # :huge=>"https://images.evetech.net/Character/1337512245_512.jpg",
582
+ # :small=>"https://images.evetech.net/Character/1337512245_64.jpg"}
652
583
 
653
- character_portrait.medium # => "http://imageserver.eveonline.com/Character/90729314_128.jpg"
654
- character_portrait.large # => "http://imageserver.eveonline.com/Character/90729314_256.jpg"
655
- character_portrait.huge # => "http://imageserver.eveonline.com/Character/90729314_512.jpg"
656
- character_portrait.small # => "http://imageserver.eveonline.com/Character/90729314_64.jpg"
584
+ character_portrait.medium # => "https://images.evetech.net/Character/1337512245_128.jpg"
585
+ character_portrait.large # => "https://images.evetech.net/Character/1337512245_256.jpg"
586
+ character_portrait.huge # => "https://images.evetech.net/Character/1337512245_512.jpg"
587
+ character_portrait.small # => "https://images.evetech.net/Character/1337512245_64.jpg"
657
588
 
658
589
  character_portrait.etag # => "2c8392581d493e06c015ca3d48d4076079bf4c976b1f776742592260"
659
590
  ```
@@ -767,14 +698,164 @@ character_implants.implant_ids # => [9899, 9941, 9942, 9943, 9956]
767
698
 
768
699
  #### Get contracts
769
700
 
701
+ ```ruby
702
+ options = { token: 'token123', character_id: 1337512245, page: 1 }
703
+
704
+ contracts = EveOnline::ESI::CharacterContracts.new(options)
705
+
706
+ contracts.scope # => "esi-contracts.read_character_contracts.v1"
707
+
708
+ contracts.contracts.size # => 3
709
+
710
+ contract = contracts.contracts.first
711
+
712
+ contract.as_json # => {:acceptor_id=>2116199184,
713
+ # :assignee_id=>2116199184,
714
+ # :availability=>"personal",
715
+ # :buyout=>nil,
716
+ # :collateral=>0.0,
717
+ # :contract_id=>154837125,
718
+ # :date_accepted=>Fri, 06 Mar 2020 21:09:32 UTC +00:00,
719
+ # :date_completed=>Fri, 06 Mar 2020 21:09:32 UTC +00:00,
720
+ # :date_expired=>Sat, 07 Mar 2020 21:09:11 UTC +00:00,
721
+ # :date_issued=>Fri, 06 Mar 2020 21:09:11 UTC +00:00,
722
+ # :days_to_complete=>0,
723
+ # :end_location_id=>60008674,
724
+ # :for_corporation=>false,
725
+ # :issuer_corporation_id=>98134807,
726
+ # :issuer_id=>1337512245,
727
+ # :price=>0.0,
728
+ # :reward=>0.0,
729
+ # :start_location_id=>60008674,
730
+ # :status=>"finished",
731
+ # :title=>"",
732
+ # :type=>"item_exchange",
733
+ # :volume=>15000.0}
734
+
735
+ contract.acceptor_id # => 2116199184
736
+ contract.assignee_id # => 2116199184
737
+ contract.availability # => "personal"
738
+ contract.buyout # => nil
739
+ contract.collateral # => 0.0
740
+ contract.contract_id # => 154837125
741
+ contract.date_accepted # => Fri, 06 Mar 2020 21:09:32 UTC +00:00
742
+ contract.date_completed # => Fri, 06 Mar 2020 21:09:32 UTC +00:00
743
+ contract.date_expired # => Sat, 07 Mar 2020 21:09:11 UTC +00:00
744
+ contract.date_issued # => Fri, 06 Mar 2020 21:09:11 UTC +00:00
745
+ contract.days_to_complete # => 0
746
+ contract.end_location_id # => 60008674
747
+ contract.for_corporation # => false
748
+ contract.issuer_corporation_id # => 98134807
749
+ contract.issuer_id # => 1337512245
750
+ contract.price # => 0.0
751
+ contract.reward # => 0.0
752
+ contract.start_location_id # => 60008674
753
+ contract.status # => "finished"
754
+ contract.title # => ""
755
+ contract.type # => "item_exchange"
756
+ contract.volume # => 15000.0
757
+
758
+ contracts.etag # => "6e18566a8f786f08aba678262360d0c74a783f9923aa43f8043133e4"
759
+ ```
760
+
770
761
  #### Get contract bids
771
762
 
772
763
  #### Get contract items
773
764
 
774
765
  #### Get public contracts
775
766
 
767
+ ```ruby
768
+ options = { region_id: 10_000_043, page: 1 }
769
+
770
+ contracts = EveOnline::ESI::PublicContracts.new(options)
771
+
772
+ contracts.scope # => nil
773
+
774
+ contracts.page # => 1
775
+
776
+ contracts.total_pages # => 4
777
+
778
+ contracts.contracts.size # => 1000
779
+
780
+ contract = contracts.contracts.first
781
+
782
+ contract.as_json # => {:buyout=>nil,
783
+ # :collateral=>0.0,
784
+ # :contract_id=>157834735,
785
+ # :date_expired=>Wed, 17 Jun 2020 21:36:41 UTC +00:00,
786
+ # :date_issued=>Wed, 20 May 2020 21:36:41 UTC +00:00,
787
+ # :days_to_complete=>0,
788
+ # :end_location_id=>60008494,
789
+ # :for_corporation=>true,
790
+ # :issuer_corporation_id=>897372069,
791
+ # :issuer_id=>1314102096,
792
+ # :price=>1250000000.0,
793
+ # :reward=>0.0,
794
+ # :start_location_id=>60008494,
795
+ # :title=>"Apostle Me10/Te16 Complete Bpc 10 Pack",
796
+ # :kind=>"item_exchange",
797
+ # :volume=>100.0}
798
+
799
+ contract.buyout # => nil
800
+ contract.collateral # => 0.0
801
+ contract.contract_id # => 157834735
802
+ contract.date_expired # => Wed, 17 Jun 2020 21:36:41 UTC +00:00
803
+ contract.date_issued # => Wed, 20 May 2020 21:36:41 UTC +00:00
804
+ contract.days_to_complete # => 0
805
+ contract.end_location_id # => 60008494
806
+ contract.for_corporation # => true
807
+ contract.issuer_corporation_id # => 897372069
808
+ contract.issuer_id # => 1314102096
809
+ contract.price # => 1250000000.0
810
+ contract.reward # => 0.0
811
+ contract.start_location_id # => 60008494
812
+ contract.title # => "Apostle Me10/Te16 Complete Bpc 10 Pack"
813
+ contract.kind # => "item_exchange"
814
+ contract.volume # => 100.0
815
+
816
+ contracts.etag # => "3f7fdf9a69e35bb35d619b6cb5043a2766d11ca6306a8b5af369ce6e"
817
+ ```
818
+
776
819
  #### Get public contract bids
777
820
 
821
+ ```ruby
822
+ options = { contract_id: 157_872_948, page: 1 }
823
+
824
+ contract = EveOnline::ESI::PublicContract.new(options)
825
+
826
+ contract.scope # => nil
827
+
828
+ contract.page # => 1
829
+
830
+ contract.total_pages # => 1
831
+
832
+ contract.items.size # => 1
833
+
834
+ item = contract.items.first
835
+
836
+ item.as_json # => {:is_blueprint_copy=>true,
837
+ # :is_included=>true,
838
+ # :item_id=>1029552558074,
839
+ # :material_efficiency=>10,
840
+ # :quantity=>1,
841
+ # :record_id=>3210378611,
842
+ # :runs=>400,
843
+ # :time_efficiency=>20,
844
+ # :type_id=>29040}
845
+
846
+ item.is_blueprint_copy # => true
847
+ item.is_included # => true
848
+ item.item_id # => 1029552558074
849
+ item.material_efficiency # => 10
850
+ item.quantity # => 1
851
+ item.record_id # => 3210378611
852
+ item.runs # => 400
853
+ item.time_efficiency # => 20
854
+ item.type_id # => 29040
855
+
856
+ contract.etag # => "d458c3f56c114882a9ecfe1aaf173837310b15b6e7cef86a019e700f"
857
+ ```
858
+
778
859
  #### Get public contract items
779
860
 
780
861
  #### Get corporation contracts
@@ -933,6 +1014,18 @@ corporation_blueprints.roles # => ["Director"]
933
1014
 
934
1015
  #### Get npc corporations
935
1016
 
1017
+ ```ruby
1018
+ corporation_npcs = EveOnline::ESI::CorporationNPC.new
1019
+
1020
+ corporation_npcs.scope # => nil
1021
+
1022
+ corporation_npcs.corporation_npc_ids.size # => 262
1023
+
1024
+ corporation_npcs.corporation_npc_ids.first # => 1000001
1025
+
1026
+ corporation_npcs.etag # => "085946820256a4f7be2e9926e9d1de9e420cca53ffb31f7547740a05"
1027
+ ```
1028
+
936
1029
  ### Dogma
937
1030
 
938
1031
  #### Get attributes
@@ -1298,13 +1391,13 @@ character_killmails.killmails.size # => 1
1298
1391
 
1299
1392
  killmail = character_killmails.killmails.first
1300
1393
 
1301
- killmail.as_json # => {:killmail_hash=>"07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5",
1302
- # :killmail_id=>72410059}
1394
+ killmail.as_json # => {:killmail_hash=>"8f1450fca8ce97be9b10e106a1257088407ef387",
1395
+ # :killmail_id=>81_646_519}
1303
1396
 
1304
- killmail.killmail_hash # => "07f7ef1d7f6090e78d8e85b4a98e680f67b5e9d5"
1305
- killmail.killmail_id # => 72410059
1397
+ killmail.killmail_hash # => "8f1450fca8ce97be9b10e106a1257088407ef387"
1398
+ killmail.killmail_id # => 81646519
1306
1399
 
1307
- # TODO: character_killmails.etag
1400
+ character_killmails.etag # => "ba5068bc1b07db98d9efce93437295fbdb9d29b14b4ffbcbfa91ac0d"
1308
1401
  ```
1309
1402
 
1310
1403
  #### Get a corporation's recent kills and losses
@@ -1337,6 +1430,14 @@ corporation_killmails.roles # => ["Director"]
1337
1430
 
1338
1431
  #### Get a single killmail
1339
1432
 
1433
+ ```ruby
1434
+ options = { killmail_id: 81_646_519, killmail_hash: "8f1450fca8ce97be9b10e106a1257088407ef387" }
1435
+
1436
+ killmail = EveOnline::ESI::Killmail.new(options)
1437
+
1438
+ # TODO: finish this
1439
+ ```
1440
+
1340
1441
  ### Location
1341
1442
 
1342
1443
  #### Get character location
@@ -1727,6 +1828,27 @@ market_group.etag # => "bf7832bfc20f5f9fdeddc9cb0360b941067310e7e3a2a80315b45a43
1727
1828
 
1728
1829
  #### List market prices
1729
1830
 
1831
+ ```ruby
1832
+ market_prices = EveOnline::ESI::MarketPrices.new
1833
+
1834
+ market_prices.scope # => nil
1835
+
1836
+ market_prices.market_prices.size # => 12565
1837
+
1838
+ market_price = market_prices.market_prices.first
1839
+
1840
+
1841
+ market_price.as_json # => {:adjusted_price=>923296.88,
1842
+ # :average_price=>1273871.6,
1843
+ # :type_id=>32772}
1844
+
1845
+ market_price.adjusted_price # => 923296.88
1846
+ market_price.average_price # => 1273871.6
1847
+ market_price.type_id # => 32772
1848
+
1849
+ market_prices.etag # => "2d5acc3bd4555821bb91d787596f5ddad129f849739e83162e93c02f"
1850
+ ```
1851
+
1730
1852
  #### List orders in a structure
1731
1853
 
1732
1854
  ### Opportunities
@@ -2020,7 +2142,7 @@ category.published # => true
2020
2142
  category.group_ids.size # => 46
2021
2143
  category.group_ids.first # => 25
2022
2144
 
2023
- # TODO: category.etag
2145
+ category.etag # => "37a39e7a5f5ecc07b19a3128c319f1198d035aee10052d0a21ccdd94"
2024
2146
  ```
2025
2147
 
2026
2148
  #### Get constellations
@@ -2267,12 +2389,12 @@ races.races.size # => 4
2267
2389
 
2268
2390
  race = races.races.first
2269
2391
 
2270
- race.as_json # => {:alliance_id=>500002,
2392
+ race.as_json # => {:faction_id=>500002,
2271
2393
  # :description=>"Once a thriving tribal civilization, the Minmatar...",
2272
2394
  # :name=>"Minmatar",
2273
2395
  # :race_id=>2}
2274
2396
 
2275
- race.alliance_id # => 500002
2397
+ race.faction_id # => 500002
2276
2398
  race.description # => "Once a thriving tribal civilization, the Minmatar..."
2277
2399
  race.name # => "Minmatar"
2278
2400
  race.race_id # => 2
@@ -2690,7 +2812,7 @@ type.etag # => "e3f6a76b4a1287f54966c6253f8f5d6ac6460bc43d47570331b43e0b"
2690
2812
  #### Get a character's wallet balance
2691
2813
 
2692
2814
  ```ruby
2693
- options = { token: 'token123', character_id: 90729314 }
2815
+ options = { token: 'token123', character_id: 90_729_314 }
2694
2816
 
2695
2817
  character_wallet = EveOnline::ESI::CharacterWallet.new(options)
2696
2818
 
@@ -2700,13 +2822,13 @@ character_wallet.as_json # => {:wallet=>409488252.49}
2700
2822
 
2701
2823
  character_wallet.wallet # => 409488252.49
2702
2824
 
2703
- # TODO: character_wallet.etag
2825
+ character_wallet.etag # => "482786a491138fdf393f42c457424b0cd3f3c3c7c2c9afb3f55c618a"
2704
2826
  ```
2705
2827
 
2706
2828
  #### Get character wallet journal
2707
2829
 
2708
2830
  ```ruby
2709
- options = { token: 'token123', character_id: 90729314, page: 1 }
2831
+ options = { token: 'token123', character_id: 90_729_314, page: 1 }
2710
2832
 
2711
2833
  character_wallet_journal = EveOnline::ESI::CharacterWalletJournal.new(options)
2712
2834
 
@@ -2716,39 +2838,94 @@ character_wallet_journal.page # => 1
2716
2838
 
2717
2839
  character_wallet_journal.total_pages # => 1
2718
2840
 
2719
- character_wallet_journal.wallet_journal_entries.size # => 1
2841
+ character_wallet_journal.wallet_journal_entries.size # => 220
2720
2842
 
2721
2843
  wallet_journal_entry = character_wallet_journal.wallet_journal_entries.first
2722
2844
 
2723
- wallet_journal_entry.as_json
2724
-
2725
- wallet_journal_entry.amount
2726
- wallet_journal_entry.balance
2727
- wallet_journal_entry.context_id
2728
- wallet_journal_entry.context_id_type
2729
- wallet_journal_entry.date
2730
- wallet_journal_entry.description
2731
- wallet_journal_entry.first_party_id
2732
- wallet_journal_entry.id
2733
- wallet_journal_entry.reason
2734
- wallet_journal_entry.ref_type
2735
- wallet_journal_entry.second_party_id
2736
- wallet_journal_entry.tax
2737
- wallet_journal_entry.tax_receiver_id
2738
-
2739
- # TODO: update example
2740
-
2741
- # TODO: character_wallet_journal.etag
2845
+ wallet_journal_entry.as_json # => {:amount=>87375.0,
2846
+ # :balance=>2405126.01,
2847
+ # :context_id=>30003498,
2848
+ # :context_id_type=>"system_id",
2849
+ # :date=>Sun, 08 Mar 2020 12:08:25 UTC +00:00,
2850
+ # :description=>"Johnn Dillinger got bounty prizes for killing pirates in Sharhelund",
2851
+ # :first_party_id=>1000125,
2852
+ # :wallet_journal_id=>17740466914,
2853
+ # :reason=>"3744: 2,3748: 2,18085: 2,18070: 1",
2854
+ # :ref_type=>"bounty_prizes",
2855
+ # :second_party_id=>1337512245,
2856
+ # :tax=>nil,
2857
+ # :tax_receiver_id=>nil}
2858
+
2859
+ wallet_journal_entry.amount # => 87375.0
2860
+ wallet_journal_entry.balance # => 2405126.01
2861
+ wallet_journal_entry.context_id # => 30003498
2862
+ wallet_journal_entry.context_id_type # => "system_id"
2863
+ wallet_journal_entry.date # => Sun, 08 Mar 2020 12:08:25 UTC +00:00
2864
+ wallet_journal_entry.description # => "Johnn Dillinger got bounty prizes for killing pirates in Sharhelund"
2865
+ wallet_journal_entry.first_party_id # => 1000125
2866
+ wallet_journal_entry.wallet_journal_id # => 17740466914
2867
+ wallet_journal_entry.reason # => "3744: 2,3748: 2,18085: 2,18070: 1"
2868
+ wallet_journal_entry.ref_type # => "bounty_prizes"
2869
+ wallet_journal_entry.second_party_id # => 1337512245
2870
+ wallet_journal_entry.tax # => nil
2871
+ wallet_journal_entry.tax_receiver_id # => nil
2872
+
2873
+ character_wallet_journal.etag # => "b618a1a584f6aad53cb79c72d6de26d8c9210d0a18be1421d5355446"
2742
2874
  ```
2743
2875
 
2744
2876
  #### Get wallet transactions
2745
2877
 
2878
+ ```ruby
2879
+ options = { token: "token123", character_id: 1_337_512_245 } # optional, add `from_id: 123` to skip records
2880
+
2881
+ wallet_transactions = EveOnline::ESI::CharacterWalletTransactions.new(options)
2882
+
2883
+ wallet_transactions.scope # => "esi-wallet.read_character_wallet.v1"
2884
+
2885
+ wallet_transactions.wallet_transactions.size # => 47
2886
+
2887
+ wallet_transaction = wallet_transactions.wallet_transactions.first
2888
+
2889
+ wallet_transaction.as_json # => {:client_id=>2116253203,
2890
+ # :date=>Sun, 08 Mar 2020 11:49:16 UTC +00:00,
2891
+ # :is_buy=>true,
2892
+ # :is_personal=>true,
2893
+ # :journal_ref_id=>17740411474,
2894
+ # :location_id=>60008494,
2895
+ # :quantity=>1,
2896
+ # :transaction_id=>5296927639,
2897
+ # :type_id=>3538,
2898
+ # :unit_price=>99887.79}
2899
+
2900
+ wallet_transaction.client_id # => 2116253203
2901
+ wallet_transaction.date # => Sun, 08 Mar 2020 11:49:16 UTC +00:00
2902
+ wallet_transaction.is_buy # => true
2903
+ wallet_transaction.is_personal # => true
2904
+ wallet_transaction.journal_ref_id # => 17740411474
2905
+ wallet_transaction.location_id # => 60008494
2906
+ wallet_transaction.quantity # => 1
2907
+ wallet_transaction.transaction_id # => 5296927639
2908
+ wallet_transaction.type_id # => 3538
2909
+ wallet_transaction.unit_price # => 99887.79
2910
+
2911
+ wallet_transactions.etag # => "55d0fbe8b408d6a76dab70c0a709d4e7c5dd58d4e0b7bd785549e268"
2912
+ ```
2913
+
2746
2914
  #### Returns a corporation's wallet balance
2747
2915
 
2916
+ ```ruby
2917
+ ```
2918
+
2748
2919
  #### Get corporation wallet journal
2749
2920
 
2921
+ ```ruby
2922
+ ```
2923
+
2750
2924
  #### Get corporation wallet transactions
2751
2925
 
2926
+ ```ruby
2927
+ ```
2928
+
2752
2929
  ### Wars
2753
2930
 
2754
2931
  #### List wars
@@ -2956,6 +3133,26 @@ Oj.mimic_JSON()
2956
3133
  races = EveOnline::ESI::UniverseRaces.new
2957
3134
  ```
2958
3135
 
3136
+ ## Formulas
3137
+
3138
+ ### Blueprint copy time
3139
+
3140
+ ```ruby
3141
+ seconds = 240 # 240 seconds it time to copy e.g. "Acolyte I Blueprint"
3142
+ science_level = 5 # character science level
3143
+ advanced_industry_level = 1 # character advanced industry level
3144
+ science_copy_speed_bonus_per_level = -5.00 # type dogma attribute copy speed bonus for science
3145
+ advanced_industry_skill_industry_job_time_bonus_per_level = -3.00 # type dogma attribute industry job time bonuse for advanced industry
3146
+ runs = 1 # number of copy, optional. default: 1
3147
+
3148
+ formula = EveOnline::Formulas::BlueprintCopyTime.new(seconds, science_level,
3149
+ advanced_industry_level, science_copy_speed_bonus_per_level,
3150
+ advanced_industry_skill_industry_job_time_bonus_per_level, runs)
3151
+
3152
+ # time of copy in seconds
3153
+ formula.time # => 174.6
3154
+ ```
3155
+
2959
3156
  ## Useful links
2960
3157
 
2961
3158
  * [BREAKING CHANGES AND YOU - HOW TO USE ALT-ROUTES TO ENHANCE YOUR SANITY](https://developers.eveonline.com/blog/article/breaking-changes-and-you)