Class: Themebox::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/themebox/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ Client

Returns a new instance of Client.



2
3
4
# File 'lib/themebox/client.rb', line 2

def initialize(token)
	@token = token
end

Instance Method Details

#upload_template(template_path, file) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/themebox/client.rb', line 6

def upload_template(template_path, file)
	upload_path = "http://tablefillr.dev/themes/#{template_path}"

	puts "putting #{upload_path}"
	RestClient.put upload_path, :body => file, 
								:token => @token,
								:content_type => "application/x-www-form-urlencoded"
end