new Items() → {Items}
- Source:
Returns:
- Type
- Items
Methods
-
get(itemId, cb)
-
Query the GW2 Spidy database for a specific item identified by its unique item number. For example, to get the details for The Juggernaut, you'd supply 49192 as the
itemId
.Parameters:
Name Type Description itemId
number The unique item identfier to retrieve cb
Items~ItemDataCallback The callback to invoke when done - Since:
- 0.2.0
- Source:
-
getAll(cb)
-
Gets a list of all available items. This is a large list. You should use a different method to narrow down your search.
Parameters:
Name Type Description cb
Items~ItemListCallback The callback to invoke when done - Source:
-
getBuyListings(params, cb)
-
This is a wrapper to Items#getListings. The
params
parameter can be a number, identifying the item to look up, or an object with properties "itemId" and "page".Example:
{ itemId: 49192, page: 1 }
Parameters:
Name Type Description params
number | object The item id to look up or a valid params object cb
Items~ItemListingsCallback The callback to invoke when done - Since:
- 0.3.0
- Source:
-
getListings(params, cb)
-
Retrieves a set of buy or sell listings from the GW2 Spidy API. The
params
parameter is an object with an "itemId" property, a "page" property, and a "buyOrSell" property (set to 'buy' or 'sell').Example:
{ itemId: 49192, page: 1, buyOrSell: 'buy' }
Parameters:
Name Type Description params
number | object The item id to lookup or a params object cb
Items~ItemListingsCallback The callback to invoke when done - Since:
- 0.3.0
- Source:
-
getSellListings(params, cb)
-
This is a wrapper to Items#getListings. The
params
parameter can be a number, identifying the item to look up, or an object with properties "itemId" and "page".Example:
{ itemId: 49192, page: 1 }
Parameters:
Name Type Description params
number | object The item id to look up or a valid params object cb
Items~ItemListingsCallback The callback to invoke when done - Since:
- 0.3.0
- Source:
-
search(term, cb)
-
Search for items in the GW2 Spidy database. The search
term
can be a string or an object.String search term: should be a simple term like "jugg" or "red dye".
Object search term: this object should have properties "term" and "page". The "term" property should be just as the aforementioned string search term. The "page" property should indicate which page of the results to retrieve. The default page is 1, and pages are in lists of 100.
Object term example:
{ term: "jugg", page: 1 }
Parameters:
Name Type Description term
string | object The search term or an object with term and page cb
Items~ItemListCallback The callback to invoke when done - Source:
Type Definitions
-
ItemDataCallback(err, response)
-
This callback is invoked when a query for a specific item has completed.
Parameters:
Name Type Description err
Error An error or null (no error) response
ItemDataResponse An instance of ItemDataResponse - Source:
-
ItemListCallback(err, response)
-
This callback is invoked when a query for a list of items has completed. This could be all available items, or all items of a specific type.
Parameters:
Name Type Description err
Error An error or null (no error) response
ItemListResponse An instance of ItemListResponse - Source:
-
ItemListingsCallback(err, An)
-
This callback is invoked upon completion of a request for retrieving item buy or sell listings from the GW2 Spidy REST API.
Parameters:
Name Type Description err
Error An error or null (no error) An
ItemListingsResponse instance of ItemsListingsResponse - Source: