Debian Codegraph @

contrib/externs/facebook_javascript_sdk.js

raw symbols SCIP
1 /*
2 * Copyright 2010 The Closure Compiler Authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /**
18 * @fileoverview Externs for Facebook Javascript SDK
19 * @see http://developers.facebook.com/docs/reference/javascript/
20 * @externs
21 */
22
23 /** @const */
24 var FB = {};
25
26 /**
27 * @see http://developers.facebook.com/docs/reference/javascript/fb.getsession/
28 * @return {Object.<*,*>}
29 */
30 FB.getSession = function() { };
31
32 /**
33 * @see http://developers.facebook.com/docs/reference/javascript/fb.api/
34 * @param {string} path
35 * @param {(string|Object.<string, *>|function(Object.<*,*>))=} method
36 * @param {(Object.<string, *>|function(Object.<*,*>))=} params
37 * @param {function(Object.<*,*>)=} callback
38 */
39 FB.api = function(path, method, params, callback) { };
40
41 /**
42 * @see http://developers.facebook.com/docs/reference/javascript/fb.getloginstatus/
43 * @param {function(Object.<*,*>)} callback
44 * @param {boolean=} force
45 */
46 FB.getLoginStatus = function(callback, force) {};
47
48 /**
49 * @see http://developers.facebook.com/docs/reference/javascript/fb.init/
50 * @param {Object.<string,*>=} opt_opts
51 */
52 FB.init = function(opt_opts) {};
53
54 /**
55 * @see http://developers.facebook.com/docs/reference/javascript/fb.login/
56 * @param {function(Object.<*,*>)} callback
57 * @param {Object.<string,*>=} opt_opts
58 */
59 FB.login = function(callback, opt_opts) {};
60
61 /**
62 * @see http://developers.facebook.com/docs/reference/javascript/fb.logout/
63 * @param {function(Object.<*,*>)=} callback
64 */
65 FB.logout = function(callback) {};
66
67 /**
68 * @see http://developers.facebook.com/docs/reference/javascript/fb.ui/
69 * @param {Object.<string, *>} params
70 * @param {function(Object.<*,*>)=} callback
71 */
72 FB.ui = function(params, callback) { };
73
74 /** @const */
75 FB.Event = {};
76
77 /**
78 * @see http://developers.facebook.com/docs/reference/javascript/fb.Event.subscribe/
79 * @param {string} eventName
80 * @param {function(Object.<*,*>)} callback
81 */
82 FB.Event.subscribe = function(eventName, callback) {};
83
84 /**
85 * @see http://developers.facebook.com/docs/reference/javascript/fb.Event.unsubscribe/
86 * @param {string} eventName
87 * @param {function(Object.<*,*>)} callback
88 */
89 FB.Event.unsubscribe = function(eventName, callback) {};
90
91 /** @const */
92 FB.XFBML = {};
93
94 /**
95 * @see http://developers.facebook.com/docs/reference/javascript/fb.XFBML.parse/
96 * @param {Element=} node
97 * @param {function(Object.<*,*>)=} callback
98 */
99 FB.XFBML.parse = function(node, callback) {};
100
101 /** @const */
102 FB.Data = {};
103
104 /**
105 * This object is not constructed directly. It is returned by calls to
106 * FB.Data.Query.
107 * @constructor
108 * @private
109 */
110 FB.Data.queryObject = function() {};
111
112 /**
113 * @see http://developers.facebook.com/docs/reference/javascript/fb.data.query/
114 * @param {string} template
115 * @param {...(string|number|FB.Data.queryObject)} var_data
116 * @return {FB.Data.queryObject}
117 */
118 FB.Data.query = function(template, var_data) {};
119
120 /**
121 * @see http://developers.facebook.com/docs/reference/javascript/fb.data.waiton/
122 * @param {Array.<*>} dependencies
123 * @param {function(Object.<*,*>)} callback
124 * @return {Object.<*,*>}
125 */
126 FB.Data.waitOn = function(dependencies, callback) {};
127
128 /** @const */
129 FB.Canvas = {};
130
131 /**
132 * @see http://developers.facebook.com/docs/reference/javascript/fb.Canvas.setAutoResize/
133 * @param {(boolean|number)=} onOrOff
134 * @param {number=} interval
135 */
136 FB.Canvas.setAutoResize = function(onOrOff, interval) {};
137
138 /**
139 * @see http://developers.facebook.com/docs/reference/javascript/fb.Canvas.setSize/
140 * @param {Object.<*, number>} params
141 */
142 FB.Canvas.setSize = function(params) {};
143
144 /**
145 * @see https://developers.facebook.com/docs/reference/javascript/FB.Canvas.getPageInfo/
146 * @param {function(Object.<*,*>)} callback
147 */
148 FB.Canvas.getPageInfo = function(callback) {};