lib/ravelry/needles.rb in ravelry-0.0.6 vs lib/ravelry/needles.rb in ravelry-0.0.7
- old
+ new
@@ -10,11 +10,12 @@
# If you pass an argument (`'knitting'` or `'crochet'`), you will only get results that match that type.
#
# Arguments: needle type (string, optional)
#
def sizes(craft='')
- result = Utils::Request.get("needles/sizes.json?craft=#{craft}", :needle_sizes)
+ result = Utils::Request
+ .get('needles/sizes.json', :needle_sizes, {:craft => craft})
result.map { |needle| Needle.new(needle) }
end
# Get needle types.
#
@@ -30,6 +31,6 @@
def list(username)
result = Utils::Request.get("people/#{username}/needles/list.json", :needle_records)
result.map { |needle| Needle.new(needle) }
end
end
-end
\ No newline at end of file
+end