mercadolibre 0.8.5 → 0.8.6

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
  SHA1:
3
- metadata.gz: 373c2b09b70cc02d99383461108cf7680d6b1682
4
- data.tar.gz: df8e6e5be5f2997ca5630177159554ad0a05a31f
3
+ metadata.gz: d6ca04c86d3dd7bbb8911188c7dff75b892cdb27
4
+ data.tar.gz: ed85d3b633f289b24ad4fa30b77cc48d2ed9b635
5
5
  SHA512:
6
- metadata.gz: f8168e3ae1bc4f9c66b06cb2e11cf36858083a1be2596c46a399085d9df28313d21f94e3fe1a1874ce7ddd22f4d7c93ad2dec4a3f0037264a58e1b76a00bb33f
7
- data.tar.gz: c2ff8e024a29d5728a45c4d21667efba17ad757428b89041fe957a3e83b6d08813868be907f376818fb67bf8d274a28744b8a3d73d5423c3c12483742dea5feb
6
+ metadata.gz: a830d9d78509ffbc62f1c22c8f53badc3f21499cfa1651bd65c38cadf1af80552cecb20187f57d4f41e312bace8269da22f31a5d8248bcb3f991a9dad395e5e5
7
+ data.tar.gz: 0c025ea8793571aeae4260bcf2d45f698e4950fc3364e6e428b5897c9527765d8a36ae106f72181bcf473b43c9c3137d6da0e8c8c594736bcaca8596381dd17d
data/CHANGELOG.md CHANGED
@@ -157,3 +157,7 @@
157
157
  ## v0.8.5
158
158
 
159
159
  * Improved method to get seller by nickname
160
+
161
+ ## v0.8.6
162
+
163
+ * Added method to get item description
@@ -114,6 +114,12 @@ module Mercadolibre
114
114
  end
115
115
  end
116
116
 
117
+ def get_item_description(item_id)
118
+ result = get_request("/items/#{item_id}/description")
119
+
120
+ Mercadolibre::Entity::ItemDescription.new(result)
121
+ end
122
+
117
123
  def get_item_descriptions(item_id)
118
124
  results = get_request("/items/#{item_id}/descriptions")
119
125
 
@@ -2,15 +2,17 @@ module Mercadolibre
2
2
  module Entity
3
3
  class ItemDescription
4
4
  def self.attr_list
5
- [:id, :created, :text, :plain_text]
5
+ [:id, :created, :last_updated, :date_created, :text, :plain_text]
6
6
  end
7
7
 
8
8
  attr_reader *attr_list
9
9
 
10
10
  def initialize(attributes={})
11
+ time_attrs = ['created', 'date_created', 'last_updated']
12
+
11
13
  attributes.each do |k, v|
12
- if k.to_s == 'created'
13
- self.created = Time.parse(v) unless v.nil?
14
+ if time_attrs.include?(k.to_s)
15
+ self.send("#{k}=", Time.parse(v)) unless v.nil?
14
16
  else
15
17
  self.send("#{k}=", v) if self.respond_to?(k)
16
18
  end
@@ -1,3 +1,3 @@
1
1
  module Mercadolibre
2
- VERSION = "0.8.5"
2
+ VERSION = "0.8.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercadolibre
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Hick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-01 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler