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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e4335a225891b8de10c105b11ad5cd86f12fa2612c1784b5bcda6045dd1e9f9
4
- data.tar.gz: 1c2fa5478f669f161c8ced2e6f2e2d8ccaacb387b5e4d16b9e4a5e6acf3c7b13
3
+ metadata.gz: 5be8266c2a53ab0a1ecdf9cedd1165d80e4f2e04de37a1da42b01582070df4cf
4
+ data.tar.gz: d055c57e2f47a53c2a58bed7aa2934f46f10a321c5de728e2b92c12570638f91
5
5
  SHA512:
6
- metadata.gz: aba3da3fded4ed88195f591c7d70c6454cbc0bdc83f213417ca10dd1cd3be6a707ccdda8bbd728f8750a306d2824d23aaa701d4b556fe680666df0482462b406
7
- data.tar.gz: '02093a03a31169daea38033c0762314f80189aea912aa4de02857895f7ab1530179739fb81f8f3328317dbf57af56ae73f0075a01397641be1d4791f8e1ad23d'
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApiDuonghds
4
- VERSION = "0.2.0"
4
+ VERSION = "0.4.0"
5
5
  end
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.2.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
- allowed_push_host: https://rubygems.org/
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: