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 +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/lib/torn_ruby/client.rb +7 -0
- data/lib/torn_ruby/endpoints/key.rb +15 -0
- data/lib/torn_ruby/key.rb +10 -0
- data/lib/torn_ruby/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93cbf60f4a1194c373729ae08c968902e63c338804eebb9dee0144d4985249a3
|
4
|
+
data.tar.gz: fd9125832469562ac451872048c17f7eeaf938b8c85069381b69fd681a3412c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/torn_ruby/client.rb
CHANGED
@@ -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
|
data/lib/torn_ruby/version.rb
CHANGED
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.
|
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
|