Allows you to use the API to remove (and re-add) items to your collection on the Everygamegoing site.

http://www.everygamegoing.com/egg/api/toggleMyItemInCollection/index/[key]/[value]/

You must be logged in to use this API call.

Both [key] and [value] are mandatory parameters.

The [key] can be either

  1. item_id, or
  2. sales_item_id.

If using the [key] item_id, the [value] must be the item_id of the specific Everygamegoing item (as found at the bottom of a landing page).

If using the [key] sales_item_id, the [value] must be of one of your own sales items.

Make sure you know the difference between Sales Item ID and Item ID to save yourself a lot of inconvenience.

Simple Usage To Add An Item To Your Collection

If you have been lucky enough to acquire Kuon (Item ID 6737), and you do not yet have it in your collection, you would call:

http://www.everygamegoing.com/egg/api/toggleMyItemInCollection/index/item_id/6737/

to add it to your collection. A response containing an array similar to the following would be returned:

{
	"cmd":"toggleMyItemInCollection",
	"report":"Success",
	"sales_item_id":"3746",
	"collection_code":100,
	"audit_operation_performed":"Added Item ID 6737 to Collection of User ID 1"
}

indicating that you have now successfully added it to your collection. As this is a 'toggle' command, you can fire the exact same command again to remove it from your collection:

http://www.everygamegoing.com/egg/api/toggleMyItemInCollection/index/item_id/6737/

reports:

{
	"cmd":"toggleMyItemInCollection",
	"report":"Success",
	"sales_item_id":"3746",
	"collection_code":999,
	"audit_operation_performed":"Removed Item ID 6737 from Collection of User ID 1"
}

If you are familiar with the Everygamegoing site, you will see this API call demonstrated when a logged-in user performs any search. The results displayed show whether the user already owns a copy of any item in the search results by displaying its cover scan (black and white indicates he does not own it, colour indicates that he does own it). Clicking on the item's cover art brings up a pop-up menu, the first button being 'Add To Collection' or 'Remove From Collection' as appropriate. This API command is called when that button is clicked.

Simple Usage To Toggle By Sales Item

Alternatively, you may toggle items in your collection by the unique sales_item_id. This is useful if you have more than one copy of the same item in your collection:

If you are the owner of sales_item_id 563 and wish to remove it from your collection, then call:

http://www.everygamegoing.com/egg/api/toggleMyItemInCollection/index/sales_item_id/563/

A response containing an array similar to the following would be returned:

{
	"cmd":"toggleMyItemInCollection",
	"report":"Success",
	"sales_item_id":"563",
	"collection_code":999,
	"audit_operation_performed":"Removed Sales Item ID 563 from Collection of User ID 1"
}

  The following text is from the original v1 of these documents and should be removed once guaranteed to no longer be relevant...

flag_in_collection will be 0 if a successful removal of the item from your collection took place.

flag_in_collection will be 1 if a successful re-addition of the item to your collection took place.

If you are familiar with the Everygamegoing Admin Panel, then you can see this API command in operation if you view an item in your collection and click the button 'Remove From Collection'.