API: JS: Trading: get-itemtradinginfo-js
Shows the button to trade a specific game on an external website. The script is designed to be embedded on a HTML page with the <script> command, or as an iframe.
Url:
http://api.goozex.com/public/api/jscript/trading/get-itemtradinginfo-js.asp
Call as:
get-itemtradinginfo-rss.asp?appname=[ app_name ]&itemid=[ itemid ]&upc=[ upc ]&itemtitle=[ title ]&platformid=[ platformid ]&button=[0|1]&btype=[x]&points=[0|1]&avail=[0|1]&req=[0|1]&idcountry=[US|CA|BM ]&mode=[x]&htmlCSSurl=[url]&help=[0|1]
Parameters:
appname: Unique ID of the application or affiliate ID
values: alphanumeric string given by Goozex to identify each application. Required.
itemid: Goozex IDItem of the game
values: numeric value
upc: is the UPC code of the game you are interested in
values: alpha string with 11-chars or 12-chars UPC code
itemtitle: Title of the game
values: alpha string
platformid: Goozex IDPlatform
values: integer
button = (optional) flag to show the button image
values: [1 | 0] (default=1)
btype = specifies the type of button image
values: l = large - m = medium - s = small
points = flag to enable/disable the point value
values: [1 | 0] (default =1)
avail = (optional) flag to show the available copies
values: [1 | 0] (default=0)
req = (optional) flag to show the requests copies
values: [1 | 0] (default=0)
tradelink = (optional) flag to show the link to Goozex
values: [1 | 0] (default=0)
idcountry: (optional) specifies country of the offer/request
values: US, CA, BM (USA, Canada or Bermuda). Default = ALL
mode : specifies whether the output should be in HTML (mode=2) or Jscript (mode=1) (default = 1)
htmlCSSurl : [url] specifies url of CSS file to be used with HTML version (htmlonly=1). Max lenght: 200 chars
help : [1 | 0] specifies whether to show the help text (default 0 = show help)
================================================
NOTE: the system considers the following priority order:
1) itemid
2) upccode
3) itemtitle+platformid
================================================
The script supports CSS stylesheets override to customize look and feel
All styles are defined as Goozex-xxxxxxxxxx:
================================================
Example with UPC:
<script language="javascript" src="http://api.goozex.com/public/api/jscript/trading/get-itemtradinginfo-js.asp?appname=test&upc=023272320751">
</script>
Example with All options enabled:
<script language="javascript" src="http://api.goozex.com/public/api/jscript/trading/get-itemtradinginfo-js.asp?appname=test&upc=023272320751&button=1&btype=m&points=1&avail=1&req=1&tradelink=1&mode=1">
</script>
Example with Title + Platform:
<script language="javascript" src="http://api.goozex.com/public/api/jscript/trading/get-itemtradinginfo-js.asp?appname=test&itemtitle=bioshock&idplatform=45&avail=1">
</script>
Example of html button (iframe support)t:
http://api.goozex.com/public/api/jscript/trading/get-itemtradinginfo-js.asp?appname=test&itemid=13115&avail=1&mode=2&htmlCSSurl=http://www.goozex.com/layout.css&help=0
Note: The HTML version of the script (mode=2) can be used with an iframe on any HTML page. It allows CSS override with an external CSS url.
Sample CSS style override:
<style type="text/css">
/* Style for the Goozex button - Sample */
/* --------------------------------------------- */
#Goozex-mainTable {
/* table container */
margin: 0px;
background-color:#CCCCCC;
padding: 10px;
}
#Goozex-outer {
/* global container */
font-family:Arial, Helvetica, sans-serif;
font-size:10px;
text-decoration: none;
}
#Goozex-buttonCell {
/* cell that contains the button image */
display: inline;
padding:0px;
}
.Goozex-buttonImage {
/* button image */
}
#Goozex-pointsCell {
/* cell that contains the point value */
display:block;
padding:0px;
}
.Goozex-pointsValue {
/* point value text */
font-size: 14px;
}
.Goozex-pointsText {
/* point text */
}
#Goozex-availCell {
/* cell for available info */
display:block;
padding:0px;
}
.Goozex-availCopies {
/* number of available copies */
font-size: 14px;
}
.Goozex-availText {
/* text for available*/
}
#Goozex-reqCell {
/* cell for requested info */
display: inline;
padding:0px;
}
.Goozex-reqCopies {
/* number of requested copies */
font-size: 14px;
}
.Goozex-reqText {
/* text for requests*/
}
#Goozex-tradeCell {
/* cell for trade link on Goozex */
display:block;
padding:0px;
}
.Goozex-trade {
/* link to trade on Goozex */
}
.Goozex-trade A {
/* link to trade on Goozex */
color:#669900;
font-size:12px;
font-weight:bold;
text-transform:lowercase;
}
.Goozex-link {
/* link style for text */
font-weight: bold;
font-variant:small-caps;
text-decoration: none;
}
</style>
It results in the following output/layout:
