Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tím souhlasíte. Další informace

API help

Overview
Data types

xwg.query

Description

Query for xWG information. The all purpose method to access anything about xWG.

Params

token
string

Access token.

filterOptions
struct

Filtering options. At least one filtering option must be set.

forceShowUnofficial
bool
optional
default: true

By default, each category (tag) has specified whether it should display unofficial xWGs in the listing. This allows to display only official catalogue for categories that official catalogue contains, and unofficial xWGs in categories which are only on this site. But you can force to show unofficial items regardless specified category filtering.

You should almost always set this to true in all cases where you don't want to display catalogue pages. For example if you want to search for xWGs or display user's collection, you must set this to true to be able to show entire result set.

query
string
optional

Search query (anything that can be entered into the search box on the website) You can use the query to search xWGs by name.

xwgIds
array
optional

Search for xWGs with given IDs only.

xwgId
int

ID of xWG.

collected
bool
optional

Only show xWGs that authorized user has collected. If true, list items that authorized has collected. If false, list items that authorized user doesn't have collected. Do not specify this filter if you don't care.

offered
bool
optional

Only show xWGs that authorized user offers. Same logic as for collected apply here.

wanted
bool
optional

Only show xWGs that authorized user wants. Same logic as for collected apply here.

notWanted
bool
optional

Only show xWGs that authorized user does not want. Same logic as for collected apply here.

collectedBy
string
optional

Only retrieve items collected by certain user. Specify that user's name.

offeredBy
string
optional

Only retrieve items offered by certain user. Specify that user's name.

wantedBy
string
optional

Only retrieve items wanted by certain user. Specify that user's name.

notWantedBy
string
optional

Only retrieve items not wanted by certain user. Specify that user's name.

tags
array
optional

Only retrieve items that has specified tags set. All tags must be set for certain item to include that item in the result set.

tag
struct
name
string

Tag name

category
string
optional

Tag category identifier. If not specified, search in user defined tags. Otherwise, search for tag name in given category.

displayOptions
struct

Options that affects what is returned.

sort
array
optional

Sort by specified columns

sortColumn
struct
columnName
string
enum
ValueDescription
name

Sort by xWG name

version

Sort by xWG version

cat_no

Sort by catalogue number

last_collect_date

Date of last collection

direction
string
enum
ValueDescription
DESC

Sort in descending order

ASC

Sort by ascending order

limit
int
optional
default: 100

Maximum number of returned items. You can request at most 100 items at one method call.

offset
int
optional
default: 0

How many items to skip from start of result.

show
array

List of columns to return. Always request only columns that you want, to reduce traffic needed to transfer data over network. In large result sets, this method can return in a lot of data.

columnName
string
enum
ValueDescription
id

xWG ID

name

xWG name

version

xWG version

cat_no

Catalogue number

note

xWG comment

tags

Retrieve list of tags. Includes both tags in categories and also user's defined tags.

collected

Whether the item is collected by authorized user. Only loads the collected flag. To load entire collection, use collection column name.

offered

Whether the item is offered by authorized user.

wanted

Whether the item is wanted by authorized user.

notwanted

Whether the item is not wanted by authorized user.

collection

Include full collection information for authorized user.

offer

Offer additional information (pieces and comment).

Response

response
struct
status
int
enum

Status code

ValueDescription
200

OK

400

Bad params

403

User has hidden profile, you cannot retrieve items based on that user's information.

404

One of items specified by filterOptions.xwgIds was not found. Or user specified in filterOptions.collectedBy, filterOptions.offeredBy, filterOptions.wantedBy or filterOptions.notwantedBy does not exists.

500

Server error

statusMessage
string

Status code description

items
array

List of xWGs matching specified filtering criteria.

item
struct

One xWG

id
int
optional

xWG ID. Only if displayOptions.show contains id.

name
string
optional

xWG name. Only if displayOptions.show contains name.

version
string
optional

xWG version. Only if displayOptions.show contains version.

cat_no
string
optional
null

Catalogue number. Only if displayOptions.show contains cat_no. NULL if xWG is not from official catalogue.

comment
string
optional

xWG comment. Only if displayOptions.show contains note.

flags
struct
optional

xWG flags. Only if displayOptions.show contains one of collected, offered, wanted, notwanted.

collected
bool
optional

Is the xWG collected by authorized user? Only if displayOptions.show contains collected.

offered
bool
optional

Is the xWG offered by authorized user? Only if displayOptions.show contains offered.

wanted
bool
optional

Is the xWG wanted by authorized user? Only if displayOptions.show contains wanted.

notwanted
bool
optional

Is the xWG not wanted by authorized user? Only if displayOptions.show contains notwanted.

tags
array

List of tags. Only if displayOptions.show contains tags.

tag
struct

Tag

name
string

Tag name

categories
array
optional

List all categories that the tag is member of. If tag is user-defined, this field is missing.

category
struct

Category information

id
string

Category ID

name
string

Category name

collection
array

Collection information. Only if displayOptions.show contains collection.

entry
struct

One collection entry

date
date

Date of collection

year
int

Year of xWG

pieces
int

Number of pieces

comment
string

Comment that user can specify.

totalCount
int

Total number of items not affected by limit and offset.

Call example

xwg.query("elit", {"forceShowUnofficial": false, "query": "pariatur", "xwgIds": [934291601], "collected": false, "offered": false, "wanted": true, "notWanted": false, "collectedBy": "incididunt ut labore", "offeredBy": "sed", "wantedBy": "in", "notWantedBy": "consectetur adipiscing elit", "tags": [{"name": "duis", "category": "qui officia"}]}, {"sort": [{"columnName": "version", "direction": "ASC"}], "limit": 760528803, "offset": 1339104550, "show": ["notwanted"]})