mmi 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b06278de132f8f2d3579987335931bdafe56470aef8641b7157b78922d12bd99
4
- data.tar.gz: 046a5c00f73f2ae5151411572978ef1af74662136d72a82ad30e2570e12c0523
3
+ metadata.gz: 54e9d7ed91e3ac72f8c78ba1d9bb550de696e87b134e4bd1f5db393e99e7d7d2
4
+ data.tar.gz: 55df81f836288de4d0166c03488b7a3362992e6fc76304ccba2dc085758b1bb8
5
5
  SHA512:
6
- metadata.gz: 252ff8dcf6dfc7ece06c47300903e4bd3cf50ede5c7b82b8bcaf8ef7bdbd63b35f72a9a02d553c050e2a81fd17941523d7814435eb3c34e55f0071e6a073d1c5
7
- data.tar.gz: 57127da3df65211b4b4b1afa2899f404f95da5a9c14ba4067da24749ae5261ec6d0003d60e66d7f9eafcf3ad7b577b19b89600ef174e3d35276e64c79c5eb960
6
+ metadata.gz: 2c9e1954062c87ea12251b23103fee16b141a9c1f78ca88199c70441649090c16f5bb09481e5d6b158903f6553c201a754608346b12dbc208400fa973eebab73
7
+ data.tar.gz: '0481cffce09c9bf0439c1b739cb53cfeba1779a994c4b0ee203f45c3c17becd0164cc8c4b6c7400da01e26605e4e2065c4eeb141f0c6054fef06722f7bd7def2'
@@ -3,15 +3,11 @@ require 'open-uri'
3
3
 
4
4
  module Mmi
5
5
  module ModrinthApi
6
- BASE_URL = URI('https://api.modrinth.com/api/v1/')
6
+ BASE_URL = URI('https://api.modrinth.com/v2/')
7
7
 
8
8
  class << self
9
- def mod(name)
10
- JSON.parse((BASE_URL + "mod/#{CGI.escape(name)}").open.read)
11
- end
12
-
13
- def mod_versions(mod_id)
14
- JSON.parse((BASE_URL + "mod/#{mod_id}/version").open.read)
9
+ def project_versions(mod_slug)
10
+ JSON.parse((BASE_URL + "project/#{mod_slug}/version").open.read)
15
11
  end
16
12
  end
17
13
  end
@@ -42,12 +42,8 @@ module Mmi
42
42
  end
43
43
  end
44
44
 
45
- def cached_mod_id
46
- @cached_mod_id ||= Mmi::ModrinthApi.mod(self.name)['id']
47
- end
48
-
49
45
  def cached_mod_versions
50
- @cached_mod_versions ||= Mmi::ModrinthApi.mod_versions(cached_mod_id)
46
+ @cached_mod_versions ||= Mmi::ModrinthApi.project_versions(self.name)
51
47
  end
52
48
 
53
49
  def download_url
data/lib/mmi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mmi
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mmi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - expeehaa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-14 00:00:00.000000000 Z
11
+ date: 2023-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cli-ui
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubygems_version: 3.3.3
188
+ rubygems_version: 3.4.1
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Program to install minecraft modloaders, mods and other assets through a