collection.set
Description
Insert xWGs into collection. If given combination of date and year exists, it will be overwritten.
The date
, year
, pieces
and comment
are optional, when you omit them, only collected flag will be set
without additional collection information.
Params
- token
- string
-
Access token.
- items
- array
-
List of xWGs to collect.
- item
- struct
-
- xwgId
- int
-
ID of xWG to collect
- pieces
- int
- optional
- requires: year, date
-
Number of pieces in collection
- year
- int
- optional
- requires: pieces, date
-
Year of xWG.
- date
- date
- optional
- requires: pieces, year
-
Date of collection.
- comment
- string
- optional
- requires: year, date, pieces
-
Comment for the collection
Response
- response
- struct
-
- status
- int
- enum
-
Status code
Value | Description |
200 | All items were successfully collected. |
206 | Some items encountered non fatal error while setting collection. See result for details. |
400 | Bad params |
404 | Some xWG IDs were not found. |
500 | Server error |
- statusMessage
- string
-
Status code description
- result
- array
-
- item
- struct
-
- xwgId
- int
-
ID of xWG.
- collected
- bool
-
Is this item collected?
- collection
- array
-
Additional collection information (if available)
- entry
- struct
-
- date
- date
-
Date of collection
- pieces
- int
-
Number of collected pieces
- year
- int
-
Year
- comment
- string
-
Comment
Call example
collection.set("nulla", [{"xwgId": 1092497695, "pieces": 1854761978, "year": 629079455, "date": 2008-12-30, "comment": "nulla pariatur excepteur"}])