new GfApi(apiKey, secret, options)
Create GfApi client
Parameters:
Name | Type | Description |
---|---|---|
apiKey |
string | API Key, eg |
secret |
hash | TOTP secret, eg |
options |
hash | Options, eg
|
Methods
bulk_get(bulk) → {hash}
Get bulk object.
Parameters:
Name | Type | Description |
---|---|---|
bulk |
uuid | id |
Returns:
Sample result
{
"id": "b4ef3e91-dca9-46ea-8e4b-5f38062fb26d",
"owner": "us-east-1:ab36c6a0-2cb6-476c-809c-77a08908499f",
"offer_key": "Ol4YAU5g-l0w",
"status": "listed",
"num_listed": 2,
"listings": [
{
"id": "f005c650-567c-4494-85ef-57cc567d27cc",
"status": "draft"
}, {
"id": "555f8301-2f3f-451d-b69f-7a2fe0241016",
"status": "draft"
}],
"updated": "2017-01-21T02:29:53.511Z",
"created": "2017-01-21T02:03:56.164Z"
}
bulk.status
-
+-- steam_escrow --+ | v start <-> receive_pending --> received -----> listed | ^ +-> trade_hold -+
- *start*: initial state
- *receive_pending*: trade offer made
- *steam_escrow*: trade offer accepted but held by STEAM
- *received*: trade offer accepted and item received by bot
- *trade_hold*: item received by bot, but trade hold on item (e.g., Just Survive)
- *listed*: listings and escrows created (search index may still be pending)
- Type
- hash
bulk_mine_get(Query)
Query your bulk object (subset of data fields) by status
Parameters:
Name | Type | Description |
---|---|---|
Query |
hash | options. Warning: modified by callee.
|
Returns:
Array of bulks (subset of data fields) or null if none left
bulk_post() → {hash}
Create bulk object
Returns:
Sample result
{
"id": "b4ef3e91-dca9-46ea-8e4b-5f38062fb26d",
"owner": "us-east-1:ab36c6a0-2cb6-476c-809c-77a08908499f",
"offer_key": "Ol4YAU5g-l0w",
"status": "start",
"updated": "2017-01-21T02:29:53.511Z",
"created": "2017-01-21T02:03:56.164Z"
}
The main field you are concerned about is 'id'.
- Type
- hash
bulk_put(id, data) → {hash}
Initiate trade offer or gets latest bulk object (if data parameter not specified).
Parameters:
Name | Type | Default | Description |
---|---|---|---|
id |
uuid | Bulk ID from bulk_post() |
|
data |
hash | null | Optional. If specified, create offer for items specified:
If not specified, updates and returns latest bulk object. |
Returns:
bulk data
- Type
- hash
check_trade_ban()
Check if you have a Steam trade ban or hold
Throws:
UnprocessableEntityError you have trade ban or hold
digital_goods_get(listing)
Get digital goods from listing if any available. This method will retrieve, decrypt, and return the digital goods.
Parameters:
Name | Type | Description |
---|---|---|
listing |
string | id |
Returns:
digital content previously stored for the listing
digital_goods_put()
Put digital goods/content for digital listing
escrow_get(listing) → {hash}
Get escrow data, if exists, for given listing id. Caller must own listing.
Parameters:
Name | Type | Description |
---|---|---|
listing |
uuid | id |
Returns:
escrow data escrow.status
received <--> deliver_pending --> delivered ^ | +----> return_pending -----> returned ```
- received: trade offer accepted and item received by bot
- deliver_pending: trade offer made to buyer but not accepted
- delivered: trade offer accepted by buyer. Initiate listing completion.
- return_pending: trade offer made to seller to return item
- return: trade offer accepted and seller has item
- Type
- hash
escrow_mine_get(Query)
Query your escrows (subset of data fields) by status
Parameters:
Name | Type | Description |
---|---|---|
Query |
hash | options. Warning: modified by callee. status Either 'received' (default), 'delivered', 'returned'. limit # of entries to get (default: 20, max: 100) |
Returns:
Array of escrows (subset of data fields) or null if none left
exchange_search()
Search exchanges (purchases or sold listings).
Returns:
the search result which also contains an array of exchanges owned by the API key owner
(async) listing_delete(id)
Delete a single listing by id.
Parameters:
Name | Type | Description |
---|---|---|
id |
list id |
Returns:
result
listing_get(id)
Get a single listing by id. The listing owner can view any listing they own. Anyone else may only view listings that are publicly viewable or get an error.
Parameters:
Name | Type | Description |
---|---|---|
id |
list id |
Returns:
listing
listing_of(owner)
Get a user's listings.
Parameters:
Name | Type | Description |
---|---|---|
owner |
of the user. |
Returns:
listings
listing_patch(Query)
Update a listing with new or updated properties.
Parameters:
Name | Type | Description |
---|---|---|
Query |
hash | options. |
Returns:
listing
listing_post()
Create a blank listing to be edited and posted.
Returns:
listing
listing_search()
Search listings.
Returns:
Array of listings or null if none left
listing_status(id, status)
Change a listing's status.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | |
status |
enum |
Returns:
listing
product_get(id)
Get a single product by id.
Parameters:
Name | Type | Description |
---|---|---|
id |
product id |
Returns:
product
product_search()
Search the product catalog.
Returns:
Array of products or null if none found
profile_get()
Get profile
Returns:
profile
steam_inventory_get(profileId, appId, query)
Get public steam inventory. This is not part of the Gameflip API and is an unsupported helper function.
Parameters:
Name | Type | Description |
---|---|---|
profileId |
string | Profile ID of Steam User |
appId |
string | APP ID of game inventory to retrieve (such as, GfApi.STEAM.APP_ID.CS2) |
query |
hash | parameters including l= |
(async) upload_photo(listing_id, url, display_order) → {object}
Upload an online image to Gameflip for use as the listing's photo.
Parameters:
Name | Type | Description |
---|---|---|
listing_id |
string | to update the listing |
url |
string | of the photo |
display_order |
int | for multiple photos. If not provided then it is a cover photo and is shown on the search pages (should be lower res). If provided then it is a listing page photo (should be higher res), and the number is its order in the photo carousel. |
Returns:
photo object with url
- Type
- object
wallet_get(owner, options)
Get wallet balance and transaction history/ledger NOTE: the balance amount is the lowest possible unit for that currency. Ex: cents for USD and atto (10e-18) for FLP)
Parameters:
Name | Type | Description |
---|---|---|
owner |
the user's owner/user id |
|
options |
Options for data return
|
Returns:
wallet information