lib/etsy/response.rb in etsy-0.2.2 vs lib/etsy/response.rb in etsy-0.2.3
- old
+ new
@@ -47,9 +47,14 @@
count == 1 ? results.first : results
else
[]
end
end
+
+ # Total number of results of the request
+ def total
+ @total ||= to_hash['count']
+ end
def success?
!!(code =~ /2\d\d/)
end