[Up]: Storage API : DropItemCount

DropItemCount

Script path: /storage/bin/api/drop_item_count.cgi

Description: Returns the count of drop item in user's dropbox and also the count of unseen ones.

INPUT (via GET or POST)

Mandatory parameters are: sid
Optional parameters are:  ofmt

sid session id of the login user. [mandatory]
 
ofmt
= null | json | jsonp
   null is the default, and the legacy "flat" output format is returned.
   json means the output format is in JSON format
   jsonp is like json, but in "pretty" form for easier human readability.
 

OUTPUT (content-type: text/plain)

Successful return:

	true <tab> drop_item_count <tab> new_drop_item_count <newline>

drop_item_count and new_drop_item_count are integers 0..N. drop_item_count is the number of drop items, which the user will see if he opens his dropbox. new_drop_item_count (always less or equal to drop_item_count) is the number that the use received since he last list his dropbox. So, a number greater than 0 for new_drop_item_count indicates there are newly dropped item that the user might be interested in inspecting.

e.g.

	true <tab> 0 <tab> 0 <newline>
	true <tab> 3 <tab> 1 <newline>

          Equivalent JSON output would look like the following:

	{
   "status" : true,
   "drop_item_count" : "3",
   "new_drop_item_count" : "1"
}


Unsuccessful return:

	false <tab> <error message> <newline>

e.g.

	false <TAB> Invalid user profile.

       Equivalent JSON output would look like the following:

	{
"http_status" : "401 Invalid user profile",
"status" : false,
"errmsg" : "Invalid user profile."
}

   In both legacy "flat" output and also JSON output, appropriate HTTP header status codes are also returned e.g. 200 OK, 401 Invalid user profile, etc.