api_duonghds 0.2.0 → 0.4.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: 5be8266c2a53ab0a1ecdf9cedd1165d80e4f2e04de37a1da42b01582070df4cf
|
4
|
+
data.tar.gz: d055c57e2f47a53c2a58bed7aa2934f46f10a321c5de728e2b92c12570638f91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dd493585df5416fae3f50c0098b2d46e08c4a959890bae49be1c76ae9f9021926a92bcfe78890aeaa180b28ef9176609a13730b86d11aa0de6b61c5f8553dcb
|
7
|
+
data.tar.gz: 495f008c268515382107ebb90de3e662195da5031ea89fb2b70eb02731034bdc37bd6fc8f877e069d2d62e65ffd2316ee5865c32d6a45b4385b406d500b22076
|
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.4.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:
|