Module: VkApiSimple::Market::Add

Included in:
VkApiSimple::Market
Defined in:
lib/vk_api_simple/market/add.rb

Overview

Save uploaded image at server

Instance Method Summary collapse

Instance Method Details

#add(args = {}) ⇒ Object



5
6
7
8
# File 'lib/vk_api_simple/market/add.rb', line 5

def add(args = {})
  response = RestClient.post("#{BASE_URI}add?access_token=#{token}&owner_id=-#{args[:owner_id]}&category_id=#{args[:category_id]}&price=#{args[:price]}&main_photo_id=#{args[:main_photo_id]}&v=#{api_version}", name: args[:name], description: args[:description])
  JSON.parse(response.body)
end