remove old readme
[atutor.git] / jscripts / opensocial / dataresponse.js
1 /*
2  * Licensed under the Apache License, Version 2.0 (the "License");
3  * you may not use this file except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  *     http://www.apache.org/licenses/LICENSE-2.0
7  *
8  * Unless required by applicable law or agreed to in writing, software
9  * distributed under the License is distributed on an "AS IS" BASIS,
10  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  * See the License for the specific language governing permissions and
12  * limitations under the License.
13  */
14
15 /**
16  * @fileoverview DataResponse containing information about
17  * friends, contacts, profile, app data, and activities.
18  *
19  * Whenever a dataRequest is sent to the server it will return a dataResponse
20  * object. Values from the server will be mapped to the requested keys specified
21  * in the dataRequest.
22  */
23
24
25 /**
26  * @class
27  * This object contains the requested server data mapped to the requested keys.
28  *
29  * <p>
30  * <b>See also:</b>
31  * <a href="opensocial.DataRequest.html">DataRequest</a>
32  * </p>
33  *
34  * @name opensocial.DataResponse
35  */
36
37 /**
38  * Construct the data response.
39  * This object contains the requested server data mapped to the requested keys.
40  *
41  * @param {Map.<String, ResponseItem>} responseItems Key/value map of data
42  *    response information
43  * @param {Boolean} opt_globalError Optional field indicating whether there were
44  *    any errors generating this data response
45  *
46  * @private
47  * @constructor
48  */
49 opensocial.DataResponse = function() {};
50
51
52 /**
53  * Returns true if there was an error in fetching this data from the server.
54  *
55  * @return {Boolean} True if there was an error; otherwise, false
56  * @member opensocial.DataResponse
57  */
58 opensocial.DataResponse.prototype.hadError = function() {};
59
60
61 /**
62  * If the entire request had a batch level error, returns the error message.
63  *
64  * @return {String} A human-readable description of the error that occurred.
65  */
66 opensocial.DataResponse.prototype.getErrorMessage = function() {};
67
68
69 /**
70  * Gets the ResponseItem for the requested field.
71  *
72  * @return {opensocial.ResponseItem} The requested
73  *    <a href="opensocial.ResponseItem.html">response</a> calculated by the
74  *    server
75  * @member opensocial.DataResponse
76  */
77 opensocial.DataResponse.prototype.get = function(key) {};