torn_ruby 1.0.1.beta → 1.1.1

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: bf1168a05ee032a581d00e8188c2f53ab677a02c828cf6ec8320b68e48b4c220
4
- data.tar.gz: 33188bb3d07fb5c107dfb9c7ca9a84d476f7f2389e4a2f976dff5677fca0565c
3
+ metadata.gz: 93cbf60f4a1194c373729ae08c968902e63c338804eebb9dee0144d4985249a3
4
+ data.tar.gz: fd9125832469562ac451872048c17f7eeaf938b8c85069381b69fd681a3412c0
5
5
  SHA512:
6
- metadata.gz: 9a2fc12525e4c16a927c0772301572906098f611fcca87433998e954e1f31cb4dab5b92b653f396560825e17de875e3ffab4b4557f294dfeac416cf2d62e82a6
7
- data.tar.gz: 15942273fcc790da47b136513824d9c8dfb84e27c98f1bbb18b562b6cc8acda2433281a9de0c0cbfaf6be6d60d15afbc71c4c1d1668df0d402735adf55b4a697
6
+ metadata.gz: fe1064178eb5e23417f175ac6e9c5c5749feece565c30afa3b1d8c786e94f8f8af666e9062911f15acf9174b10a6515f8bae9a56eae364ca9749db49406c6085
7
+ data.tar.gz: e8114c8aa4e4b9ddcc209ecbb8628e556bafbc6a30e5af27474339a1fca7a1188f4c777924cf4e437a0eec74f090027ac3119dd12b55e4380539c674e4b3ce35
data/CHANGELOG.md CHANGED
@@ -15,3 +15,11 @@
15
15
  - Improved internal architecture by extracting common logic to `Base` endpoint class
16
16
  - Added comprehensive test coverage for all v2 endpoints
17
17
  - Refactored and documented code for maintainability and clarity
18
+
19
+ ## [1.0.1.beta] - 2025-04-18
20
+
21
+ - Fix Docs
22
+
23
+ ## [1.1.0] - 2025-04-18
24
+
25
+ - Added `Key` endpoint
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- torn_ruby (0.1.0.beta)
4
+ torn_ruby (1.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -8,6 +8,7 @@ require_relative "endpoints/market"
8
8
  require_relative "endpoints/torn"
9
9
  require_relative "endpoints/racing"
10
10
  require_relative "endpoints/forum"
11
+ require_relative "endpoints/key"
11
12
  require_relative "user"
12
13
  require_relative "property"
13
14
  require_relative "faction"
@@ -16,6 +17,7 @@ require_relative "market"
16
17
  require_relative "torn"
17
18
  require_relative "racing"
18
19
  require_relative "forum"
20
+ require_relative "key"
19
21
 
20
22
  module TornRuby
21
23
  # Responsible for interacting with the Torn API
@@ -64,5 +66,10 @@ module TornRuby
64
66
  data = TornRuby::Endpoints::Forum.new(@api_key).fetch(path:, selections:)
65
67
  TornRuby::Forum.new(data)
66
68
  end
69
+
70
+ def key(path: nil, selections: nil)
71
+ data = TornRuby::Endpoints::Key.new(@api_key).fetch(path:, selections:)
72
+ TornRuby::Key.new(data)
73
+ end
67
74
  end
68
75
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "uri"
4
+ require "net/http"
5
+ require "json"
6
+ require_relative "base"
7
+
8
+ module TornRuby
9
+ module Endpoints
10
+ # Responsible for interacting with the Torn City API's key endpoint.
11
+ class Key < Base
12
+ AVAILABLE_FIELDS = %i[info].freeze
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "utils"
4
+ require_relative "base"
5
+
6
+ module TornRuby
7
+ # Responsible for representing an api key in the Torn City game.
8
+ class Key < Base
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TornRuby
4
- VERSION = "1.0.1.beta"
4
+ VERSION = "1.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torn_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1.beta
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram
@@ -66,6 +66,7 @@ files:
66
66
  - lib/torn_ruby/endpoints/company.rb
67
67
  - lib/torn_ruby/endpoints/faction.rb
68
68
  - lib/torn_ruby/endpoints/forum.rb
69
+ - lib/torn_ruby/endpoints/key.rb
69
70
  - lib/torn_ruby/endpoints/market.rb
70
71
  - lib/torn_ruby/endpoints/property.rb
71
72
  - lib/torn_ruby/endpoints/racing.rb
@@ -73,6 +74,7 @@ files:
73
74
  - lib/torn_ruby/endpoints/user.rb
74
75
  - lib/torn_ruby/faction.rb
75
76
  - lib/torn_ruby/forum.rb
77
+ - lib/torn_ruby/key.rb
76
78
  - lib/torn_ruby/market.rb
77
79
  - lib/torn_ruby/property.rb
78
80
  - lib/torn_ruby/racing.rb