OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "bookmarkManagerPrivate", | 7 "namespace": "bookmarkManagerPrivate", |
8 "description": "none", | 8 "description": "none", |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 "type": "array", | 42 "type": "array", |
43 "items": {"$ref": "BookmarkNodeDataElement"} | 43 "items": {"$ref": "BookmarkNodeDataElement"} |
44 } | 44 } |
45 } | 45 } |
46 }, | 46 }, |
47 { | 47 { |
48 "id": "MetaInfoFields", | 48 "id": "MetaInfoFields", |
49 "type": "object", | 49 "type": "object", |
50 "description": "Collection of meta info fields.", | 50 "description": "Collection of meta info fields.", |
51 "additionalProperties": {"type": "string"} | 51 "additionalProperties": {"type": "string"} |
52 }, | |
53 { | |
54 "id": "MapMetaInfoFields", | |
55 "type": "object", | |
56 "description": "Map Id to MetaInfoFields.", | |
57 "additionalProperties": {"type": "any"} | |
52 } | 58 } |
53 ], | 59 ], |
54 "functions": [ | 60 "functions": [ |
55 { | 61 { |
56 "name": "copy", | 62 "name": "copy", |
57 "type": "function", | 63 "type": "function", |
58 "description": "Copies the given bookmarks into the clipboard", | 64 "description": "Copies the given bookmarks into the clipboard", |
59 "parameters": [ | 65 "parameters": [ |
60 { | 66 { |
61 "name": "idList", | 67 "name": "idList", |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 "$ref": "bookmarks.BookmarkTreeNode" | 268 "$ref": "bookmarks.BookmarkTreeNode" |
263 } | 269 } |
264 ] | 270 ] |
265 } | 271 } |
266 ] | 272 ] |
267 }, | 273 }, |
268 { | 274 { |
269 "name": "getMetaInfo", | 275 "name": "getMetaInfo", |
270 "type": "function", | 276 "type": "function", |
271 "description": "Gets meta info from a bookmark node", | 277 "description": "Gets meta info from a bookmark node", |
278 "allowAmbiguousOptionalArguments": true, | |
272 "parameters": [ | 279 "parameters": [ |
273 { | 280 { |
274 "name": "id", | 281 "name": "id", |
275 "description": "The id of the bookmark to retrieve meta info from", | 282 "description": "The id of the bookmark to retrieve meta info from. I f omitted meta info for all nodes is returned.", |
283 "optional": true, | |
276 "type": "string" | 284 "type": "string" |
277 }, | 285 }, |
278 { | 286 { |
279 "name": "key", | 287 "name": "key", |
280 "description": "The key for the meta info to retrieve. If omitted, a ll fields are returned", | 288 "description": "The key for the meta info to retrieve. If omitted, a ll fields are returned", |
281 "optional": true, | 289 "optional": true, |
282 "type": "string" | 290 "type": "string" |
283 }, | 291 }, |
284 { | 292 { |
285 "type": "function", | 293 "type": "function", |
286 "name": "callback", | 294 "name": "callback", |
287 "parameters": [ | 295 "parameters": [ |
288 { | 296 { |
289 "name": "value", | 297 "name": "value", |
290 "description": "If a key was given, the value of the specified f ield, if present. Otherwise an object containing all meta info fields for the no de.", | 298 "description": "If a key was given, the value of the specified f ield, if present. Otherwise an object containing all meta info fields for the no de. If id is not given then meta info for all nodes as an object with node id to meta info.", |
not at google - send to devlin
2014/06/16 21:49:27
Ah, yeah, this is a pretty confusing API no matter
yefimt
2014/06/16 21:56:20
Originally it was ignoring second parameter if fir
not at google - send to devlin
2014/06/16 21:59:47
undefined... and set error? sounds like it should
yefimt
2014/06/16 22:32:12
extension developers don't want error as they don'
not at google - send to devlin
2014/06/16 22:33:54
they don't get a callback..? then where does the u
| |
291 "optional": true, | 299 "optional": true, |
292 // TODO(rfevang): Convert this to always return MetaInfoFields | 300 // TODO(rfevang): Convert this to always return MetaInfoFields |
293 // if the API is made public. | 301 // if the API is made public. |
294 "choices": [ | 302 "choices": [ |
295 {"type": "string"}, | 303 {"type": "string"}, |
296 {"$ref": "MetaInfoFields"} | 304 {"$ref": "MapMetaInfoFields"} |
not at google - send to devlin
2014/06/16 21:49:27
if you're going to do this, might as well inline t
yefimt
2014/06/16 21:56:20
Do you mean remove "choices", yes it is possible
O
not at google - send to devlin
2014/06/16 21:59:47
No I mean make this
"choices": [
{"type": "stri
yefimt
2014/06/16 22:00:42
I think it will be too confusing. Combining MetaIn
not at google - send to devlin
2014/06/16 22:02:01
I don't understand. this is exactly what you alrea
yefimt
2014/06/16 22:32:12
Done.
| |
297 ] | 305 ] |
298 } | 306 } |
299 ] | 307 ] |
300 } | 308 } |
301 ] | 309 ] |
302 }, | 310 }, |
303 { | 311 { |
304 "name": "setMetaInfo", | 312 "name": "setMetaInfo", |
305 "type": "function", | 313 "type": "function", |
306 "description": "Sets a meta info value for a bookmark node", | 314 "description": "Sets a meta info value for a bookmark node", |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
436 "type": "function", | 444 "type": "function", |
437 "description": "Fired when the meta info of a node changes.", | 445 "description": "Fired when the meta info of a node changes.", |
438 "parameters": [ | 446 "parameters": [ |
439 {"name": "id", "type": "string"}, | 447 {"name": "id", "type": "string"}, |
440 {"name": "metaInfoChanges", "$ref": "MetaInfoFields"} | 448 {"name": "metaInfoChanges", "$ref": "MetaInfoFields"} |
441 ] | 449 ] |
442 } | 450 } |
443 ] | 451 ] |
444 } | 452 } |
445 ] | 453 ] |
OLD | NEW |