api_duonghds 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/api_duonghds-0.2.0.gem +0 -0
- data/api_duonghds.gemspec +1 -0
- data/lib/api_duonghds/version.rb +1 -1
- data/lib/api_duonghds.rb +4 -0
- metadata +3 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e06e6fd8d0db1956fed36e7a4b8f0d42fef08426e2af52580fc2c293bacb6b3
|
4
|
+
data.tar.gz: 52bcd3fa39ae8acc63a8ef15336086beb54785f1e6799d50596a111bb8ade558
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7d4536ab31d8329a03946207ccf151626093071cce8b616f630f2c7ad3bc831196fd5986d2c9448222937e9f943929388f6ac4b1c1bbb765e2ab72167daf207
|
7
|
+
data.tar.gz: 4f61245faad9f9d9d1d13c00b79aca82e03e3f8f022aba1320f5d163fbfee2ba4af8a8102cdf3daad9c0a41136169da7bff786f033c60f23526cb39fdd4a1e13
|
Binary file
|
data/api_duonghds.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.metadata["homepage_uri"] = spec.homepage
|
20
20
|
spec.metadata["source_code_uri"] = "https://github.com/duonghds24/api_duonghds"
|
21
21
|
spec.metadata["changelog_uri"] = "https://github.com/duonghds24/api_duonghds/blob/main/CHANGELOG.md"
|
22
|
+
spec.metadata = { 'documentation' => 'http://www.rubydoc.info/gems/api_duonghds' }
|
22
23
|
spec.add_development_dependency "rspec", "~> 3.2"
|
23
24
|
# Specify which files should be added to the gem when it is released.
|
24
25
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
data/lib/api_duonghds/version.rb
CHANGED
data/lib/api_duonghds.rb
CHANGED
@@ -5,6 +5,10 @@ require 'json'
|
|
5
5
|
module ApiDuonghds
|
6
6
|
class Api
|
7
7
|
Product = Struct.new(:id, :title, :price, :description, :discountPercentage)
|
8
|
+
# call api get product
|
9
|
+
#
|
10
|
+
# @param [String] id The id of the product.
|
11
|
+
# @return [Product] The product.
|
8
12
|
def self.get_product(id)
|
9
13
|
uri = URI("https://dummyjson.com/products/#{id}")
|
10
14
|
response = Net::HTTP.get_response(uri)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_duonghds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- duonghdse
|
@@ -38,6 +38,7 @@ files:
|
|
38
38
|
- LICENSE.txt
|
39
39
|
- README.md
|
40
40
|
- Rakefile
|
41
|
+
- api_duonghds-0.2.0.gem
|
41
42
|
- api_duonghds.gemspec
|
42
43
|
- lib/api_duonghds.rb
|
43
44
|
- lib/api_duonghds/version.rb
|
@@ -46,10 +47,7 @@ homepage: https://duonghds.com
|
|
46
47
|
licenses:
|
47
48
|
- MIT
|
48
49
|
metadata:
|
49
|
-
|
50
|
-
homepage_uri: https://duonghds.com
|
51
|
-
source_code_uri: https://github.com/duonghds24/api_duonghds
|
52
|
-
changelog_uri: https://github.com/duonghds24/api_duonghds/blob/main/CHANGELOG.md
|
50
|
+
documentation: http://www.rubydoc.info/gems/api_duonghds
|
53
51
|
post_install_message:
|
54
52
|
rdoc_options: []
|
55
53
|
require_paths:
|