Class: Etsy4r::UserCommands

Inherits:
Commands show all
Defined in:
lib/etsy4r/user_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_user_details(user_id, optional_params = {}) ⇒ Object



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

def get_user_details(user_id, optional_params = {})
  @client.process("/users/#{user_id}", optional_params)
end

#get_users_by_name(search_name, optional_params = {}) ⇒ Object



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

def get_users_by_name(search_name, optional_params = {})
  search_name_param = search_name.gsub(" ", "_")
  @client.process("/users/keywords/#{search_name_param}", optional_params)
end