class FancyHands::Custom
Public Class Methods
new(client)
click to toggle source
# File lib/fancyhands/v1/custom.rb, line 5 def initialize(client) @client = client end
Public Instance Methods
get(key="", status="", cursor="")
click to toggle source
# File lib/fancyhands/v1/custom.rb, line 23 def get(key="", status="", cursor="") data = { :key => key, :status => status, :cursor => cursor } return @client.request.get("request/custom", data) end
post(title="", description="", bid=0.0, expiration_date=nil, custom_fields={})
click to toggle source
# File lib/fancyhands/v1/custom.rb, line 9 def post(title="", description="", bid=0.0, expiration_date=nil, custom_fields={}) if !expiration_date expiration_date = DateTime.now + 1 end data = { :title => title, :description => description, :bid => bid, :expiration_date => expiration_date.strftime("%Y-%m-%dT%H:%M:%SZ"), :custom_fields => custom_fields, } return @client.request.post("request/custom", data) end