Class: Etsy4r::CategoryCommands

Inherits:
Commands
  • Object
show all
Defined in:
lib/etsy4r/category_commands.rb

Instance Attribute Summary

Attributes inherited from Commands

#client

Instance Method Summary collapse

Methods inherited from Commands

#initialize

Constructor Details

This class inherits a constructor from Etsy4r::Commands

Instance Method Details

#get_child_categories(category) ⇒ Object



8
9
10
11
# File 'lib/etsy4r/category_commands.rb', line 8

def get_child_categories(category)
  cat_param = category.gsub(/\s|\-/, "_")
  @client.process("/categories/#{cat_param}/children")
end

#get_top_categoriesObject



4
5
6
# File 'lib/etsy4r/category_commands.rb', line 4

def get_top_categories
  @client.process("/categories")
end