PageRenderTime 74ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 1ms

/dist/federated-dashboard-flickr-widget.js

https://github.com/bwvoss/federated-dashboard-flickr-widget
JavaScript | 7651 lines | 7561 code | 79 blank | 11 comment | 35 complexity | 6d1555672663d85b092058e59540cdd8 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. (function(underscore) {
  2. 'use strict';
  3. window.namespace = function(string, obj) {
  4. var current = window,
  5. names = string.split('.'),
  6. name;
  7. while((name = names.shift())) {
  8. current[name] = current[name] || {};
  9. current = current[name];
  10. }
  11. underscore.extend(current, obj);
  12. };
  13. }(window._));
  14. (function() {
  15. var Utils = {};
  16. Utils.formQueryString = function (queryArguments) {
  17. var args = [],
  18. append = function(key) {
  19. args.push(key + "=" + queryArguments[key]);
  20. };
  21. Object.keys(queryArguments).sort().forEach(append);
  22. return args.join("&");
  23. };
  24. Utils.checkRequirements = function (method_name, required, callOptions, callback) {
  25. required = required || [];
  26. for(var r=0, last=required.length, arg; r<last; r++) {
  27. arg = required[r];
  28. if(arg.name === "api_key") continue;
  29. if(!callOptions.hasOwnProperty(arg.name)) {
  30. return callback(new Error("missing required argument '"+arg.name+"' in call to "+method_name));
  31. }
  32. }
  33. };
  34. Utils.generateAPIFunction = function (method) {
  35. return function(callOptions, callback) {
  36. if(callOptions && !callback) { callback = callOptions; callOptions = {}; }
  37. var queryArguments = Utils.generateQueryArguments(method.name, this.flickrOptions, callOptions);
  38. Utils.queryFlickr(queryArguments, this.flickrOptions, method.security, callback);
  39. };
  40. };
  41. Utils.generateAPIDevFunction = function (method) {
  42. return function(callOptions, callback) {
  43. if(callOptions && !callback) { callback = callOptions; callOptions = {}; }
  44. Utils.checkRequirements(method.name, method.required, callOptions, callback);
  45. var queryArguments = Utils.generateQueryArguments(method.name, this.flickrOptions, callOptions);
  46. Utils.queryFlickr(queryArguments, this.flickrOptions, method.security, callback, method.errors);
  47. };
  48. };
  49. Utils.generateQueryArguments = function (method_name, flickrOptions, callOptions) {
  50. // set up authorized method access
  51. var queryArguments = {
  52. method: method_name,
  53. format: "json",
  54. };
  55. if(flickrOptions.api_key) {
  56. queryArguments.api_key = flickrOptions.api_key;
  57. }
  58. // set up bindings for method-specific args
  59. Object.keys(callOptions).forEach(function(key) {
  60. queryArguments[key] = callOptions[key];
  61. });
  62. return queryArguments;
  63. };
  64. Utils.queryFlickr = function (queryArguments, flickrOptions, security, processResult) {
  65. if(flickrOptions.endpoint) {
  66. return this.queryProxyEndpoint(queryArguments, flickrOptions, processResult);
  67. }
  68. return this.queryFlickrAPI(queryArguments, flickrOptions, security, processResult);
  69. };
  70. Utils.queryFlickrAPI = function (queryArguments, flickrOptions, security, processResult) {
  71. var url = "https://api.flickr.com/services/rest/",
  72. queryString = this.formQueryString(queryArguments),
  73. flickrURL = url + "?" + queryString;
  74. // Do we need special permissions? (read private, 1, write, 2, or delete, 3)?
  75. // if so, those are currently not supported. Send an error-notification.
  76. if(security.requiredperms > 0) {
  77. return processResult(new Error("signed calls (write/delete) currently not supported"));
  78. }
  79. this.handleURLRequest("GET", flickrURL, processResult);
  80. };
  81. Utils.queryProxyEndpoint = function (queryArguments, flickrOptions, processResult) {
  82. var queryString = this.formQueryString(queryArguments),
  83. url = flickrOptions.endpoint + "?" + queryString;
  84. this.handleURLRequest("POST", url, processResult, queryArguments);
  85. };
  86. Utils.handleURLRequest = function (verb, url, processResult, postdata) {
  87. var xhr = new XMLHttpRequest();
  88. xhr.open(verb, url, true);
  89. if(postdata) {
  90. xhr.setRequestHeader("Content-Type", "application/json");
  91. }
  92. xhr.onreadystatechange = function() {
  93. if(xhr.readyState === 4) {
  94. if(xhr.status == 200) {
  95. var error = false,
  96. body = xhr.responseText;
  97. // we get a response, but there's no response body. That's a problem.
  98. if(!body) {
  99. error = "HTTP Error " + response.statusCode + " (" + statusCodes[response.statusCode] + ")";
  100. return processResult(error);
  101. }
  102. // we get a response, and there were no errors
  103. if(!error) {
  104. try {
  105. body = body.replace(/^jsonFlickrApi\(/,'').replace(/\}\)$/,'}');
  106. body = JSON.parse(body);
  107. if(body.stat !== "ok") {
  108. // There was a request error, and the JSON .stat property
  109. // will tell us what that error was.
  110. return processResult(body.message);
  111. }
  112. } catch (e) {
  113. // general JSON error
  114. return processResult("could not parse body as JSON");
  115. }
  116. }
  117. // Some kind of other error occurred. Simply call the process
  118. // handler blindly with both the error and error body.
  119. processResult(error, body);
  120. }
  121. else { processResult("HTTP status not 200 (received "+xhr.status+")"); }
  122. }
  123. };
  124. xhr.send(postdata ? JSON.stringify(postdata) : null);
  125. };
  126. Utils.errors = {
  127. "96": {
  128. "code": 96,
  129. "message": "Invalid signature",
  130. "_content": "The passed signature was invalid."
  131. },
  132. "97": {
  133. "code": 97,
  134. "message": "Missing signature",
  135. "_content": "The call required signing but no signature was sent."
  136. },
  137. "98": {
  138. "code": 98,
  139. "message": "Login failed / Invalid auth token",
  140. "_content": "The login details or auth token passed were invalid."
  141. },
  142. "99": {
  143. "code": 99,
  144. "message": "User not logged in / Insufficient permissions",
  145. "_content": "The method requires user authentication but the user was not logged in, or the authenticated method call did not have the required permissions."
  146. },
  147. "100": {
  148. "code": 100,
  149. "message": "Invalid API Key",
  150. "_content": "The API key passed was not valid or has expired."
  151. },
  152. "105": {
  153. "code": 105,
  154. "message": "Service currently unavailable",
  155. "_content": "The requested service is temporarily unavailable."
  156. },
  157. "106": {
  158. "code": 106,
  159. "message": "Write operation failed",
  160. "_content": "The requested operation failed due to a temporary issue."
  161. },
  162. "108": {
  163. "code": "108",
  164. "message": "Invalid frob",
  165. "_content": "The specified frob does not exist or has already been used."
  166. },
  167. "111": {
  168. "code": 111,
  169. "message": "Format \"xxx\" not found",
  170. "_content": "The requested response format was not found."
  171. },
  172. "112": {
  173. "code": 112,
  174. "message": "Method \"xxx\" not found",
  175. "_content": "The requested method was not found."
  176. },
  177. "114": {
  178. "code": 114,
  179. "message": "Invalid SOAP envelope",
  180. "_content": "The SOAP envelope send in the request could not be parsed."
  181. },
  182. "115": {
  183. "code": 115,
  184. "message": "Invalid XML-RPC Method Call",
  185. "_content": "The XML-RPC request document could not be parsed."
  186. },
  187. "116": {
  188. "code": 116,
  189. "message": "Bad URL found",
  190. "_content": "One or more arguments contained a URL that has been used for abuse on Flickr."
  191. }
  192. };
  193. var Flickr = function (flickrOptions) {
  194. this.bindOptions(flickrOptions);
  195. };
  196. Flickr.prototype = {};
  197. Flickr.methods = {
  198. "flickr.activity.userComments": {
  199. "optional": [
  200. {
  201. "name": "per_page",
  202. "_content": "Number of items to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 50."
  203. },
  204. {
  205. "name": "page",
  206. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  207. }
  208. ],
  209. "security": {
  210. "needslogin": 1,
  211. "needssigning": 1,
  212. "requiredperms": 1
  213. },
  214. "name": "flickr.activity.userComments",
  215. "url": "https://www.flickr.com/services/api/flickr.activity.userComments.html"
  216. },
  217. "flickr.activity.userPhotos": {
  218. "optional": [
  219. {
  220. "name": "timeframe",
  221. "_content": "The timeframe in which to return updates for. This can be specified in days (<code>'2d'</code>) or hours (<code>'4h'</code>). The default behavoir is to return changes since the beginning of the previous user session."
  222. },
  223. {
  224. "name": "per_page",
  225. "_content": "Number of items to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 50."
  226. },
  227. {
  228. "name": "page",
  229. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  230. }
  231. ],
  232. "security": {
  233. "needslogin": 1,
  234. "needssigning": 1,
  235. "requiredperms": 1
  236. },
  237. "name": "flickr.activity.userPhotos",
  238. "url": "https://www.flickr.com/services/api/flickr.activity.userPhotos.html"
  239. },
  240. "flickr.auth.checkToken": {
  241. "required": [
  242. {
  243. "name": "auth_token",
  244. "_content": "The authentication token to check."
  245. }
  246. ],
  247. "security": {
  248. "needslogin": 0,
  249. "needssigning": 0,
  250. "requiredperms": 0
  251. },
  252. "name": "flickr.auth.checkToken",
  253. "url": "https://www.flickr.com/services/api/flickr.auth.checkToken.html"
  254. },
  255. "flickr.auth.getFrob": {
  256. "security": {
  257. "needslogin": 0,
  258. "needssigning": 0,
  259. "requiredperms": 0
  260. },
  261. "name": "flickr.auth.getFrob",
  262. "url": "https://www.flickr.com/services/api/flickr.auth.getFrob.html"
  263. },
  264. "flickr.auth.getFullToken": {
  265. "required": [
  266. {
  267. "name": "mini_token",
  268. "_content": "The mini-token typed in by a user. It should be 9 digits long. It may optionally contain dashes."
  269. }
  270. ],
  271. "errors": [
  272. {
  273. "code": "1",
  274. "message": "Mini-token not found",
  275. "_content": "The passed mini-token was not valid."
  276. }
  277. ],
  278. "security": {
  279. "needslogin": 0,
  280. "needssigning": 0,
  281. "requiredperms": 0
  282. },
  283. "name": "flickr.auth.getFullToken",
  284. "url": "https://www.flickr.com/services/api/flickr.auth.getFullToken.html"
  285. },
  286. "flickr.auth.getToken": {
  287. "required": [
  288. {
  289. "name": "frob",
  290. "_content": "The frob to check."
  291. }
  292. ],
  293. "security": {
  294. "needslogin": 0,
  295. "needssigning": 0,
  296. "requiredperms": 0
  297. },
  298. "name": "flickr.auth.getToken",
  299. "url": "https://www.flickr.com/services/api/flickr.auth.getToken.html"
  300. },
  301. "flickr.auth.oauth.checkToken": {
  302. "required": [
  303. {
  304. "name": "oauth_token",
  305. "_content": "The OAuth authentication token to check."
  306. }
  307. ],
  308. "security": {
  309. "needslogin": 0,
  310. "needssigning": 1,
  311. "requiredperms": 0
  312. },
  313. "name": "flickr.auth.oauth.checkToken",
  314. "url": "https://www.flickr.com/services/api/flickr.auth.oauth.checkToken.html"
  315. },
  316. "flickr.auth.oauth.getAccessToken": {
  317. "security": {
  318. "needslogin": 0,
  319. "needssigning": 1,
  320. "requiredperms": 0
  321. },
  322. "name": "flickr.auth.oauth.getAccessToken",
  323. "url": "https://www.flickr.com/services/api/flickr.auth.oauth.getAccessToken.html"
  324. },
  325. "flickr.blogs.getList": {
  326. "optional": [
  327. {
  328. "name": "service",
  329. "_content": "Optionally only return blogs for a given service id. You can get a list of from <a href=\"/services/api/flickr.blogs.getServices.html\">flickr.blogs.getServices()</a>."
  330. }
  331. ],
  332. "security": {
  333. "needslogin": 1,
  334. "needssigning": 1,
  335. "requiredperms": 1
  336. },
  337. "name": "flickr.blogs.getList",
  338. "url": "https://www.flickr.com/services/api/flickr.blogs.getList.html"
  339. },
  340. "flickr.blogs.getServices": {
  341. "security": {
  342. "needslogin": 0,
  343. "needssigning": 0,
  344. "requiredperms": 0
  345. },
  346. "name": "flickr.blogs.getServices",
  347. "url": "https://www.flickr.com/services/api/flickr.blogs.getServices.html"
  348. },
  349. "flickr.blogs.postPhoto": {
  350. "required": [
  351. {
  352. "name": "photo_id",
  353. "_content": "The id of the photo to blog"
  354. },
  355. {
  356. "name": "title",
  357. "_content": "The blog post title"
  358. },
  359. {
  360. "name": "description",
  361. "_content": "The blog post body"
  362. }
  363. ],
  364. "optional": [
  365. {
  366. "name": "blog_id",
  367. "_content": "The id of the blog to post to."
  368. },
  369. {
  370. "name": "blog_password",
  371. "_content": "The password for the blog (used when the blog does not have a stored password)."
  372. },
  373. {
  374. "name": "service",
  375. "_content": "A Flickr supported blogging service. Instead of passing a blog id you can pass a service id and we'll post to the first blog of that service we find."
  376. }
  377. ],
  378. "errors": [
  379. {
  380. "code": "1",
  381. "message": "Blog not found",
  382. "_content": "The blog id was not the id of a blog belonging to the calling user"
  383. },
  384. {
  385. "code": "2",
  386. "message": "Photo not found",
  387. "_content": "The photo id was not the id of a public photo"
  388. },
  389. {
  390. "code": "3",
  391. "message": "Password needed",
  392. "_content": "A password is not stored for the blog and one was not passed with the request"
  393. },
  394. {
  395. "code": "4",
  396. "message": "Blog post failed",
  397. "_content": "The blog posting failed (a blogging API failure of some sort)"
  398. }
  399. ],
  400. "security": {
  401. "needslogin": 1,
  402. "needssigning": 1,
  403. "requiredperms": 2
  404. },
  405. "name": "flickr.blogs.postPhoto",
  406. "url": "https://www.flickr.com/services/api/flickr.blogs.postPhoto.html"
  407. },
  408. "flickr.cameras.getBrandModels": {
  409. "required": [
  410. {
  411. "name": "brand",
  412. "_content": "The ID of the requested brand (as returned from flickr.cameras.getBrands)."
  413. }
  414. ],
  415. "errors": [
  416. {
  417. "code": "1",
  418. "message": "Brand not found",
  419. "_content": "Unable to find the given brand ID."
  420. }
  421. ],
  422. "security": {
  423. "needslogin": 0,
  424. "needssigning": 0,
  425. "requiredperms": 0
  426. },
  427. "name": "flickr.cameras.getBrandModels",
  428. "url": "https://www.flickr.com/services/api/flickr.cameras.getBrandModels.html"
  429. },
  430. "flickr.cameras.getBrands": {
  431. "security": {
  432. "needslogin": 0,
  433. "needssigning": 0,
  434. "requiredperms": 0
  435. },
  436. "name": "flickr.cameras.getBrands",
  437. "url": "https://www.flickr.com/services/api/flickr.cameras.getBrands.html"
  438. },
  439. "flickr.collections.getInfo": {
  440. "required": [
  441. {
  442. "name": "collection_id",
  443. "_content": "The ID of the collection to fetch information for."
  444. }
  445. ],
  446. "optional": [
  447. {
  448. "name": "secure_image_embeds",
  449. "_content": "This argument will secure the external image embeds in all the markup and return a secure<Field> back in addition to the <Field>"
  450. }
  451. ],
  452. "errors": [
  453. {
  454. "code": "1",
  455. "message": "Collection not found",
  456. "_content": "The requested collection could not be found or is not visible to the calling user."
  457. }
  458. ],
  459. "security": {
  460. "needslogin": 1,
  461. "needssigning": 1,
  462. "requiredperms": 1
  463. },
  464. "name": "flickr.collections.getInfo",
  465. "url": "https://www.flickr.com/services/api/flickr.collections.getInfo.html"
  466. },
  467. "flickr.collections.getTree": {
  468. "optional": [
  469. {
  470. "name": "collection_id",
  471. "_content": "The ID of the collection to fetch a tree for, or zero to fetch the root collection. Defaults to zero."
  472. },
  473. {
  474. "name": "user_id",
  475. "_content": "The ID of the account to fetch the collection tree for. Deafults to the calling user."
  476. }
  477. ],
  478. "errors": [
  479. {
  480. "code": "1",
  481. "message": "User not found",
  482. "_content": "The specified user could not be found."
  483. },
  484. {
  485. "code": "2",
  486. "message": "Collection not found",
  487. "_content": "The specified collection does not exist."
  488. }
  489. ],
  490. "security": {
  491. "needslogin": 0,
  492. "needssigning": 0,
  493. "requiredperms": 0
  494. },
  495. "name": "flickr.collections.getTree",
  496. "url": "https://www.flickr.com/services/api/flickr.collections.getTree.html"
  497. },
  498. "flickr.commons.getInstitutions": {
  499. "security": {
  500. "needslogin": 0,
  501. "needssigning": 0,
  502. "requiredperms": 0
  503. },
  504. "name": "flickr.commons.getInstitutions",
  505. "url": "https://www.flickr.com/services/api/flickr.commons.getInstitutions.html"
  506. },
  507. "flickr.contacts.getList": {
  508. "optional": [
  509. {
  510. "name": "filter",
  511. "_content": "An optional filter of the results. The following values are valid:<br />\r\n&nbsp;\r\n<dl>\r\n\t<dt><b><code>friends</code></b></dt>\r\n\t<dl>Only contacts who are friends (and not family)</dl>\r\n\r\n\t<dt><b><code>family</code></b></dt>\r\n\t<dl>Only contacts who are family (and not friends)</dl>\r\n\r\n\t<dt><b><code>both</code></b></dt>\r\n\t<dl>Only contacts who are both friends and family</dl>\r\n\r\n\t<dt><b><code>neither</code></b></dt>\r\n\t<dl>Only contacts who are neither friends nor family</dl>\r\n</dl>"
  512. },
  513. {
  514. "name": "page",
  515. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  516. },
  517. {
  518. "name": "per_page",
  519. "_content": "Number of photos to return per page. If this argument is omitted, it defaults to 1000. The maximum allowed value is 1000."
  520. },
  521. {
  522. "name": "sort",
  523. "_content": "The order in which to sort the returned contacts. Defaults to name. The possible values are: name and time."
  524. },
  525. {
  526. "name": "fields",
  527. "_content": "The fields can have the following args:\r\nrealname, friend, family,path_alias,location,public_photos_count,can_tag"
  528. }
  529. ],
  530. "errors": [
  531. {
  532. "code": "1",
  533. "message": "Invalid sort parameter.",
  534. "_content": "The possible values are: name and time."
  535. }
  536. ],
  537. "security": {
  538. "needslogin": 1,
  539. "needssigning": 1,
  540. "requiredperms": 1
  541. },
  542. "name": "flickr.contacts.getList",
  543. "url": "https://www.flickr.com/services/api/flickr.contacts.getList.html"
  544. },
  545. "flickr.contacts.getListRecentlyUploaded": {
  546. "optional": [
  547. {
  548. "name": "date_lastupload",
  549. "_content": "Limits the resultset to contacts that have uploaded photos since this date. The date should be in the form of a Unix timestamp.\r\n\r\nThe default offset is (1) hour and the maximum (24) hours. "
  550. },
  551. {
  552. "name": "filter",
  553. "_content": "Limit the result set to all contacts or only those who are friends or family. Valid options are:\r\n\r\n<ul>\r\n<li><strong>ff</strong> friends and family</li>\r\n<li><strong>all</strong> all your contacts</li>\r\n</ul>\r\nDefault value is \"all\"."
  554. }
  555. ],
  556. "security": {
  557. "needslogin": 1,
  558. "needssigning": 1,
  559. "requiredperms": 1
  560. },
  561. "name": "flickr.contacts.getListRecentlyUploaded",
  562. "url": "https://www.flickr.com/services/api/flickr.contacts.getListRecentlyUploaded.html"
  563. },
  564. "flickr.contacts.getPublicList": {
  565. "required": [
  566. {
  567. "name": "user_id",
  568. "_content": "The NSID of the user to fetch the contact list for."
  569. }
  570. ],
  571. "optional": [
  572. {
  573. "name": "page",
  574. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  575. },
  576. {
  577. "name": "per_page",
  578. "_content": "Number of photos to return per page. If this argument is omitted, it defaults to 1000. The maximum allowed value is 1000."
  579. },
  580. {
  581. "name": "show_more",
  582. "_content": "Include additional information for each contact, such as realname, is_friend, is_family, path_alias and location."
  583. }
  584. ],
  585. "errors": [
  586. {
  587. "code": "1",
  588. "message": "User not found",
  589. "_content": "The specified user NSID was not a valid user."
  590. }
  591. ],
  592. "security": {
  593. "needslogin": 0,
  594. "needssigning": 0,
  595. "requiredperms": 0
  596. },
  597. "name": "flickr.contacts.getPublicList",
  598. "url": "https://www.flickr.com/services/api/flickr.contacts.getPublicList.html"
  599. },
  600. "flickr.contacts.getTaggingSuggestions": {
  601. "optional": [
  602. {
  603. "name": "include_self",
  604. "_content": "Return calling user in the list of suggestions. Default: true."
  605. },
  606. {
  607. "name": "include_address_book",
  608. "_content": "Include suggestions from the user's address book. Default: false"
  609. },
  610. {
  611. "name": "per_page",
  612. "_content": "Number of contacts to return per page. If this argument is omitted, all contacts will be returned."
  613. },
  614. {
  615. "name": "page",
  616. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  617. }
  618. ],
  619. "security": {
  620. "needslogin": 1,
  621. "needssigning": 1,
  622. "requiredperms": 1
  623. },
  624. "name": "flickr.contacts.getTaggingSuggestions",
  625. "url": "https://www.flickr.com/services/api/flickr.contacts.getTaggingSuggestions.html"
  626. },
  627. "flickr.favorites.add": {
  628. "required": [
  629. {
  630. "name": "photo_id",
  631. "_content": "The id of the photo to add to the user's favorites."
  632. }
  633. ],
  634. "errors": [
  635. {
  636. "code": "1",
  637. "message": "Photo not found",
  638. "_content": "The photo id passed was not a valid photo id."
  639. },
  640. {
  641. "code": "2",
  642. "message": "Photo is owned by you",
  643. "_content": "The photo belongs to the user and so cannot be added to their favorites."
  644. },
  645. {
  646. "code": "3",
  647. "message": "Photo is already in favorites",
  648. "_content": "The photo is already in the user's list of favorites."
  649. },
  650. {
  651. "code": "4",
  652. "message": "User cannot see photo",
  653. "_content": "The user does not have permission to add the photo to their favorites."
  654. }
  655. ],
  656. "security": {
  657. "needslogin": 1,
  658. "needssigning": 1,
  659. "requiredperms": 2
  660. },
  661. "name": "flickr.favorites.add",
  662. "url": "https://www.flickr.com/services/api/flickr.favorites.add.html"
  663. },
  664. "flickr.favorites.getContext": {
  665. "required": [
  666. {
  667. "name": "photo_id",
  668. "_content": "The id of the photo to fetch the context for."
  669. },
  670. {
  671. "name": "user_id",
  672. "_content": "The user who counts the photo as a favorite."
  673. }
  674. ],
  675. "optional": [
  676. {
  677. "name": "num_prev",
  678. "_content": ""
  679. },
  680. {
  681. "name": "num_next",
  682. "_content": ""
  683. },
  684. {
  685. "name": "extras",
  686. "_content": "A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: description, license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo, tags, machine_tags, o_dims, views, media, path_alias, url_sq, url_t, url_s, url_m, url_z, url_l, url_o"
  687. }
  688. ],
  689. "errors": [
  690. {
  691. "code": "1",
  692. "message": "Photo not found",
  693. "_content": "The photo id passed was not a valid photo id, or was the id of a photo that the calling user does not have permission to view."
  694. },
  695. {
  696. "code": "2",
  697. "message": "User not found",
  698. "_content": "The specified user was not found."
  699. },
  700. {
  701. "code": "3",
  702. "message": "Photo not a favorite",
  703. "_content": "The specified photo is not a favorite of the specified user."
  704. }
  705. ],
  706. "security": {
  707. "needslogin": 0,
  708. "needssigning": 0,
  709. "requiredperms": 0
  710. },
  711. "name": "flickr.favorites.getContext",
  712. "url": "https://www.flickr.com/services/api/flickr.favorites.getContext.html"
  713. },
  714. "flickr.favorites.getList": {
  715. "optional": [
  716. {
  717. "name": "user_id",
  718. "_content": "The NSID of the user to fetch the favorites list for. If this argument is omitted, the favorites list for the calling user is returned."
  719. },
  720. {
  721. "name": "jump_to",
  722. "_content": ""
  723. },
  724. {
  725. "name": "min_fave_date",
  726. "_content": "Minimum date that a photo was favorited on. The date should be in the form of a unix timestamp."
  727. },
  728. {
  729. "name": "max_fave_date",
  730. "_content": "Maximum date that a photo was favorited on. The date should be in the form of a unix timestamp."
  731. },
  732. {
  733. "name": "get_user_info",
  734. "_content": "Include info for the user who's favorites are being returned."
  735. }
  736. ],
  737. "errors": [
  738. {
  739. "code": "1",
  740. "message": "User not found",
  741. "_content": "The specified user NSID was not a valid flickr user."
  742. }
  743. ],
  744. "security": {
  745. "needslogin": 1,
  746. "needssigning": 1,
  747. "requiredperms": 1
  748. },
  749. "name": "flickr.favorites.getList",
  750. "url": "https://www.flickr.com/services/api/flickr.favorites.getList.html"
  751. },
  752. "flickr.favorites.getPublicList": {
  753. "required": [
  754. {
  755. "name": "user_id",
  756. "_content": "The user to fetch the favorites list for."
  757. }
  758. ],
  759. "optional": [
  760. {
  761. "name": "jump_to",
  762. "_content": ""
  763. },
  764. {
  765. "name": "min_fave_date",
  766. "_content": "Minimum date that a photo was favorited on. The date should be in the form of a unix timestamp."
  767. },
  768. {
  769. "name": "max_fave_date",
  770. "_content": "Maximum date that a photo was favorited on. The date should be in the form of a unix timestamp."
  771. }
  772. ],
  773. "errors": [
  774. {
  775. "code": "1",
  776. "message": "User not found",
  777. "_content": "The specified user NSID was not a valid flickr user."
  778. }
  779. ],
  780. "security": {
  781. "needslogin": 0,
  782. "needssigning": 0,
  783. "requiredperms": 0
  784. },
  785. "name": "flickr.favorites.getPublicList",
  786. "url": "https://www.flickr.com/services/api/flickr.favorites.getPublicList.html"
  787. },
  788. "flickr.favorites.remove": {
  789. "required": [
  790. {
  791. "name": "photo_id",
  792. "_content": "The id of the photo to remove from the user's favorites."
  793. }
  794. ],
  795. "optional": [
  796. {
  797. "name": "user_id",
  798. "_content": "NSID of the user whose favorites the photo should be removed from. This only works if the calling user owns the photo."
  799. }
  800. ],
  801. "errors": [
  802. {
  803. "code": "1",
  804. "message": "Photo not in favorites",
  805. "_content": "The photo id passed was not in the user's favorites."
  806. },
  807. {
  808. "code": "2",
  809. "message": "Cannot remove photo from that user's favorites",
  810. "_content": "user_id was passed as an argument, but photo_id is not owned by the authenticated user."
  811. },
  812. {
  813. "code": "3",
  814. "message": "User not found",
  815. "_content": "Invalid user_id argument."
  816. }
  817. ],
  818. "security": {
  819. "needslogin": 1,
  820. "needssigning": 1,
  821. "requiredperms": 2
  822. },
  823. "name": "flickr.favorites.remove",
  824. "url": "https://www.flickr.com/services/api/flickr.favorites.remove.html"
  825. },
  826. "flickr.galleries.addPhoto": {
  827. "required": [
  828. {
  829. "name": "gallery_id",
  830. "_content": "The ID of the gallery to add a photo to. Note: this is the compound ID returned in methods like <a href=\"/services/api/flickr.galleries.getList.html\">flickr.galleries.getList</a>, and <a href=\"/services/api/flickr.galleries.getListForPhoto.html\">flickr.galleries.getListForPhoto</a>."
  831. },
  832. {
  833. "name": "photo_id",
  834. "_content": "The photo ID to add to the gallery"
  835. }
  836. ],
  837. "optional": [
  838. {
  839. "name": "comment",
  840. "_content": "A short comment or story to accompany the photo."
  841. }
  842. ],
  843. "errors": [
  844. {
  845. "code": "1",
  846. "message": "Required parameter missing",
  847. "_content": "One or more required parameters was not included with your API call."
  848. },
  849. {
  850. "code": "2",
  851. "message": "Invalid gallery ID",
  852. "_content": "That gallery could not be found."
  853. },
  854. {
  855. "code": "3",
  856. "message": "Invalid photo ID",
  857. "_content": "The requested photo could not be found."
  858. },
  859. {
  860. "code": "4",
  861. "message": "Invalid comment",
  862. "_content": "The comment body could not be validated."
  863. },
  864. {
  865. "code": "5",
  866. "message": "Failed to add photo",
  867. "_content": "Unable to add the photo to the gallery."
  868. }
  869. ],
  870. "security": {
  871. "needslogin": 1,
  872. "needssigning": 1,
  873. "requiredperms": 2
  874. },
  875. "name": "flickr.galleries.addPhoto",
  876. "url": "https://www.flickr.com/services/api/flickr.galleries.addPhoto.html"
  877. },
  878. "flickr.galleries.create": {
  879. "required": [
  880. {
  881. "name": "title",
  882. "_content": "The name of the gallery"
  883. },
  884. {
  885. "name": "description",
  886. "_content": "A short description for the gallery"
  887. }
  888. ],
  889. "optional": [
  890. {
  891. "name": "primary_photo_id",
  892. "_content": "The first photo to add to your gallery"
  893. },
  894. {
  895. "name": "full_result",
  896. "_content": "Get the result in the same format as galleries.getList"
  897. }
  898. ],
  899. "errors": [
  900. {
  901. "code": "1",
  902. "message": "Required parameter missing",
  903. "_content": "One or more of the required parameters was missing from your API call."
  904. },
  905. {
  906. "code": "2",
  907. "message": "Invalid title or description",
  908. "_content": "The title or the description could not be validated."
  909. },
  910. {
  911. "code": "3",
  912. "message": "Failed to add gallery",
  913. "_content": "There was a problem creating the gallery."
  914. }
  915. ],
  916. "security": {
  917. "needslogin": 1,
  918. "needssigning": 1,
  919. "requiredperms": 2
  920. },
  921. "name": "flickr.galleries.create",
  922. "url": "https://www.flickr.com/services/api/flickr.galleries.create.html"
  923. },
  924. "flickr.galleries.editMeta": {
  925. "required": [
  926. {
  927. "name": "gallery_id",
  928. "_content": "The gallery ID to update."
  929. },
  930. {
  931. "name": "title",
  932. "_content": "The new title for the gallery."
  933. }
  934. ],
  935. "optional": [
  936. {
  937. "name": "description",
  938. "_content": "The new description for the gallery."
  939. }
  940. ],
  941. "errors": [
  942. {
  943. "code": "1",
  944. "message": "Required parameter missing",
  945. "_content": "One or more required parameters was missing from your request."
  946. },
  947. {
  948. "code": "2",
  949. "message": "Invalid title or description",
  950. "_content": "The title or description arguments could not be validated."
  951. }
  952. ],
  953. "security": {
  954. "needslogin": 1,
  955. "needssigning": 1,
  956. "requiredperms": 2
  957. },
  958. "name": "flickr.galleries.editMeta",
  959. "url": "https://www.flickr.com/services/api/flickr.galleries.editMeta.html"
  960. },
  961. "flickr.galleries.editPhoto": {
  962. "required": [
  963. {
  964. "name": "gallery_id",
  965. "_content": "The ID of the gallery to add a photo to. Note: this is the compound ID returned in methods like flickr.galleries.getList, and flickr.galleries.getListForPhoto."
  966. },
  967. {
  968. "name": "photo_id",
  969. "_content": "The photo ID to add to the gallery."
  970. },
  971. {
  972. "name": "comment",
  973. "_content": "The updated comment the photo."
  974. }
  975. ],
  976. "errors": [
  977. {
  978. "code": "1",
  979. "message": "Invalid gallery ID",
  980. "_content": "That gallery could not be found."
  981. }
  982. ],
  983. "security": {
  984. "needslogin": 1,
  985. "needssigning": 1,
  986. "requiredperms": 2
  987. },
  988. "name": "flickr.galleries.editPhoto",
  989. "url": "https://www.flickr.com/services/api/flickr.galleries.editPhoto.html"
  990. },
  991. "flickr.galleries.editPhotos": {
  992. "required": [
  993. {
  994. "name": "gallery_id",
  995. "_content": "The id of the gallery to modify. The gallery must belong to the calling user."
  996. },
  997. {
  998. "name": "primary_photo_id",
  999. "_content": "The id of the photo to use as the 'primary' photo for the gallery. This id must also be passed along in photo_ids list argument."
  1000. },
  1001. {
  1002. "name": "photo_ids",
  1003. "_content": "A comma-delimited list of photo ids to include in the gallery. They will appear in the set in the order sent. This list must contain the primary photo id. This list of photos replaces the existing list."
  1004. }
  1005. ],
  1006. "security": {
  1007. "needslogin": 1,
  1008. "needssigning": 1,
  1009. "requiredperms": 2
  1010. },
  1011. "name": "flickr.galleries.editPhotos",
  1012. "url": "https://www.flickr.com/services/api/flickr.galleries.editPhotos.html"
  1013. },
  1014. "flickr.galleries.getInfo": {
  1015. "required": [
  1016. {
  1017. "name": "gallery_id",
  1018. "_content": "The gallery ID you are requesting information for."
  1019. }
  1020. ],
  1021. "security": {
  1022. "needslogin": 0,
  1023. "needssigning": 0,
  1024. "requiredperms": 0
  1025. },
  1026. "name": "flickr.galleries.getInfo",
  1027. "url": "https://www.flickr.com/services/api/flickr.galleries.getInfo.html"
  1028. },
  1029. "flickr.galleries.getList": {
  1030. "required": [
  1031. {
  1032. "name": "user_id",
  1033. "_content": "The NSID of the user to get a galleries list for. If none is specified, the calling user is assumed."
  1034. }
  1035. ],
  1036. "optional": [
  1037. {
  1038. "name": "per_page",
  1039. "_content": "Number of galleries to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500."
  1040. },
  1041. {
  1042. "name": "page",
  1043. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  1044. },
  1045. {
  1046. "name": "primary_photo_extras",
  1047. "_content": "A comma-delimited list of extra information to fetch for the primary photo. Currently supported fields are: license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo, tags, machine_tags, o_dims, views, media, path_alias, url_sq, url_t, url_s, url_m, url_o"
  1048. }
  1049. ],
  1050. "security": {
  1051. "needslogin": 0,
  1052. "needssigning": 0,
  1053. "requiredperms": 0
  1054. },
  1055. "name": "flickr.galleries.getList",
  1056. "url": "https://www.flickr.com/services/api/flickr.galleries.getList.html"
  1057. },
  1058. "flickr.galleries.getListForPhoto": {
  1059. "required": [
  1060. {
  1061. "name": "photo_id",
  1062. "_content": "The ID of the photo to fetch a list of galleries for."
  1063. }
  1064. ],
  1065. "optional": [
  1066. {
  1067. "name": "per_page",
  1068. "_content": "Number of galleries to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500."
  1069. },
  1070. {
  1071. "name": "page",
  1072. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  1073. }
  1074. ],
  1075. "security": {
  1076. "needslogin": 0,
  1077. "needssigning": 0,
  1078. "requiredperms": 0
  1079. },
  1080. "name": "flickr.galleries.getListForPhoto",
  1081. "url": "https://www.flickr.com/services/api/flickr.galleries.getListForPhoto.html"
  1082. },
  1083. "flickr.galleries.getPhotos": {
  1084. "required": [
  1085. {
  1086. "name": "gallery_id",
  1087. "_content": "The ID of the gallery of photos to return"
  1088. }
  1089. ],
  1090. "security": {
  1091. "needslogin": 0,
  1092. "needssigning": 0,
  1093. "requiredperms": 0
  1094. },
  1095. "name": "flickr.galleries.getPhotos",
  1096. "url": "https://www.flickr.com/services/api/flickr.galleries.getPhotos.html"
  1097. },
  1098. "flickr.groups.browse": {
  1099. "optional": [
  1100. {
  1101. "name": "cat_id",
  1102. "_content": "The category id to fetch a list of groups and sub-categories for. If not specified, it defaults to zero, the root of the category tree."
  1103. }
  1104. ],
  1105. "errors": [
  1106. {
  1107. "code": "1",
  1108. "message": "Category not found",
  1109. "_content": "The value passed for cat_id was not a valid category id."
  1110. }
  1111. ],
  1112. "security": {
  1113. "needslogin": 1,
  1114. "needssigning": 1,
  1115. "requiredperms": 1
  1116. },
  1117. "name": "flickr.groups.browse",
  1118. "url": "https://www.flickr.com/services/api/flickr.groups.browse.html"
  1119. },
  1120. "flickr.groups.discuss.replies.add": {
  1121. "required": [
  1122. {
  1123. "name": "topic_id",
  1124. "_content": "The ID of the topic to post a comment to."
  1125. },
  1126. {
  1127. "name": "message",
  1128. "_content": "The message to post to the topic."
  1129. }
  1130. ],
  1131. "errors": [
  1132. {
  1133. "code": "1",
  1134. "message": "Topic not found",
  1135. "_content": "The topic_id is invalid."
  1136. },
  1137. {
  1138. "code": "2",
  1139. "message": "Cannot post to group",
  1140. "_content": "Either this account is not a member of the group, or discussion in this group is disabled.\r\n"
  1141. },
  1142. {
  1143. "code": "3",
  1144. "message": "Missing required arguments",
  1145. "_content": "The topic_id and message are required."
  1146. }
  1147. ],
  1148. "security": {
  1149. "needslogin": 1,
  1150. "needssigning": 1,
  1151. "requiredperms": 2
  1152. },
  1153. "name": "flickr.groups.discuss.replies.add",
  1154. "url": "https://www.flickr.com/services/api/flickr.groups.discuss.replies.add.html"
  1155. },
  1156. "flickr.groups.discuss.replies.delete": {
  1157. "required": [
  1158. {
  1159. "name": "topic_id",
  1160. "_content": "The ID of the topic the post is in."
  1161. },
  1162. {
  1163. "name": "reply_id",
  1164. "_content": "The ID of the reply to delete."
  1165. }
  1166. ],
  1167. "errors": [
  1168. {
  1169. "code": "1",
  1170. "message": "Topic not found",
  1171. "_content": "The topic_id is invalid."
  1172. },
  1173. {
  1174. "code": "2",
  1175. "message": "Reply not found",
  1176. "_content": "The reply_id is invalid."
  1177. },
  1178. {
  1179. "code": "3",
  1180. "message": "Cannot delete reply",
  1181. "_content": "Replies can only be edited by their owner."
  1182. }
  1183. ],
  1184. "security": {
  1185. "needslogin": 1,
  1186. "needssigning": 1,
  1187. "requiredperms": 3
  1188. },
  1189. "name": "flickr.groups.discuss.replies.delete",
  1190. "url": "https://www.flickr.com/services/api/flickr.groups.discuss.replies.delete.html"
  1191. },
  1192. "flickr.groups.discuss.replies.edit": {
  1193. "required": [
  1194. {
  1195. "name": "topic_id",
  1196. "_content": "The ID of the topic the post is in."
  1197. },
  1198. {
  1199. "name": "reply_id",
  1200. "_content": "The ID of the reply post to edit."
  1201. },
  1202. {
  1203. "name": "message",
  1204. "_content": "The message to edit the post with."
  1205. }
  1206. ],
  1207. "errors": [
  1208. {
  1209. "code": "1",
  1210. "message": "Topic not found",
  1211. "_content": "The topic_id is invalid"
  1212. },
  1213. {
  1214. "code": "2",
  1215. "message": "Reply not found",
  1216. "_content": "The reply_id is invalid."
  1217. },
  1218. {
  1219. "code": "3",
  1220. "message": "Missing required arguments",
  1221. "_content": "The topic_id and reply_id are required."
  1222. },
  1223. {
  1224. "code": "4",
  1225. "message": "Cannot edit reply",
  1226. "_content": "Replies can only be edited by their owner."
  1227. },
  1228. {
  1229. "code": "5",
  1230. "message": "Cannot post to group",
  1231. "_content": "Either this account is not a member of the group, or discussion in this group is disabled."
  1232. }
  1233. ],
  1234. "security": {
  1235. "needslogin": 1,
  1236. "needssigning": 1,
  1237. "requiredperms": 2
  1238. },
  1239. "name": "flickr.groups.discuss.replies.edit",
  1240. "url": "https://www.flickr.com/services/api/flickr.groups.discuss.replies.edit.html"
  1241. },
  1242. "flickr.groups.discuss.replies.getInfo": {
  1243. "required": [
  1244. {
  1245. "name": "topic_id",
  1246. "_content": "The ID of the topic the post is in."
  1247. },
  1248. {
  1249. "name": "reply_id",
  1250. "_content": "The ID of the reply to fetch."
  1251. }
  1252. ],
  1253. "errors": [
  1254. {
  1255. "code": "1",
  1256. "message": "Topic not found",
  1257. "_content": "The topic_id is invalid"
  1258. },
  1259. {
  1260. "code": "2",
  1261. "message": "Reply not found",
  1262. "_content": "The reply_id is invalid"
  1263. }
  1264. ],
  1265. "security": {
  1266. "needslogin": 0,
  1267. "needssigning": 0,
  1268. "requiredperms": 0
  1269. },
  1270. "name": "flickr.groups.discuss.replies.getInfo",
  1271. "url": "https://www.flickr.com/services/api/flickr.groups.discuss.replies.getInfo.html"
  1272. },
  1273. "flickr.groups.discuss.replies.getList": {
  1274. "required": [
  1275. {
  1276. "name": "topic_id",
  1277. "_content": "The ID of the topic to fetch replies for."
  1278. },
  1279. {
  1280. "name": "per_page",
  1281. "_content": "Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500."
  1282. }
  1283. ],
  1284. "optional": [
  1285. {
  1286. "name": "page",
  1287. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  1288. }
  1289. ],
  1290. "errors": [
  1291. {
  1292. "code": "1",
  1293. "message": "Topic not found",
  1294. "_content": "The topic_id is invalid."
  1295. }
  1296. ],
  1297. "security": {
  1298. "needslogin": 0,
  1299. "needssigning": 0,
  1300. "requiredperms": 0
  1301. },
  1302. "name": "flickr.groups.discuss.replies.getList",
  1303. "url": "https://www.flickr.com/services/api/flickr.groups.discuss.replies.getList.html"
  1304. },
  1305. "flickr.groups.discuss.topics.add": {
  1306. "required": [
  1307. {
  1308. "name": "group_id",
  1309. "_content": "The NSID of the group to add a topic to.\r\n"
  1310. },
  1311. {
  1312. "name": "subject",
  1313. "_content": "The topic subject."
  1314. },
  1315. {
  1316. "name": "message",
  1317. "_content": "The topic message."
  1318. }
  1319. ],
  1320. "errors": [
  1321. {
  1322. "code": "1",
  1323. "message": "Group not found",
  1324. "_content": "The group by that ID does not exist\r\n"
  1325. },
  1326. {
  1327. "code": "2",
  1328. "message": "Cannot post to group",
  1329. "_content": "Either this account is not a member of the group, or discussion in this group is disabled."
  1330. },
  1331. {
  1332. "code": "3",
  1333. "message": "Message is too long",
  1334. "_content": "The post message is too long."
  1335. },
  1336. {
  1337. "code": "4",
  1338. "message": "Missing required arguments",
  1339. "_content": "Subject and message are required."
  1340. }
  1341. ],
  1342. "security": {
  1343. "needslogin": 1,
  1344. "needssigning": 1,
  1345. "requiredperms": 2
  1346. },
  1347. "name": "flickr.groups.discuss.topics.add",
  1348. "url": "https://www.flickr.com/services/api/flickr.groups.discuss.topics.add.html"
  1349. },
  1350. "flickr.groups.discuss.topics.getInfo": {
  1351. "required": [
  1352. {
  1353. "name": "topic_id",
  1354. "_content": "The ID for the topic to edit."
  1355. }
  1356. ],
  1357. "errors": [
  1358. {
  1359. "code": "1",
  1360. "message": "Topic not found",
  1361. "_content": "The topic_id is invalid"
  1362. }
  1363. ],
  1364. "security": {
  1365. "needslogin": 0,
  1366. "needssigning": 0,
  1367. "requiredperms": 0
  1368. },
  1369. "name": "flickr.groups.discuss.topics.getInfo",
  1370. "url": "https://www.flickr.com/services/api/flickr.groups.discuss.topics.getInfo.html"
  1371. },
  1372. "flickr.groups.discuss.topics.getList": {
  1373. "required": [
  1374. {
  1375. "name": "group_id",
  1376. "_content": "The NSID of the group to fetch information for."
  1377. }
  1378. ],
  1379. "optional": [
  1380. {
  1381. "name": "per_page",
  1382. "_content": "Number of photos to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500."
  1383. },
  1384. {
  1385. "name": "page",
  1386. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  1387. }
  1388. ],
  1389. "errors": [
  1390. {
  1391. "code": "1",
  1392. "message": "Group not found",
  1393. "_content": "The group_id is invalid"
  1394. }
  1395. ],
  1396. "security": {
  1397. "needslogin": 0,
  1398. "needssigning": 0,
  1399. "requiredperms": 0
  1400. },
  1401. "name": "flickr.groups.discuss.topics.getList",
  1402. "url": "https://www.flickr.com/services/api/flickr.groups.discuss.topics.getList.html"
  1403. },
  1404. "flickr.groups.getInfo": {
  1405. "required": [
  1406. {
  1407. "name": "group_id",
  1408. "_content": "The NSID of the group to fetch information for."
  1409. }
  1410. ],
  1411. "optional": [
  1412. {
  1413. "name": "lang",
  1414. "_content": "The language of the group name and description to fetch. If the language is not found, the primary language of the group will be returned.\r\n\r\nValid values are the same as <a href=\"/services/feeds/\">in feeds</a>."
  1415. },
  1416. {
  1417. "name": "secure_image_embeds",
  1418. "_content": "This argument will secure the external image embeds in all the markup and return a secure<Field> back in addition to the <Field>"
  1419. }
  1420. ],
  1421. "errors": [
  1422. {
  1423. "code": "1",
  1424. "message": "Group not found",
  1425. "_content": "The group NSID passed did not refer to a group that the calling user can see - either an invalid group is or a group that can't be seen by the calling user."
  1426. }
  1427. ],
  1428. "security": {
  1429. "needslogin": 0,
  1430. "needssigning": 0,
  1431. "requiredperms": 0
  1432. },
  1433. "name": "flickr.groups.getInfo",
  1434. "url": "https://www.flickr.com/services/api/flickr.groups.getInfo.html"
  1435. },
  1436. "flickr.groups.join": {
  1437. "required": [
  1438. {
  1439. "name": "group_id",
  1440. "_content": "The NSID of the Group in question"
  1441. }
  1442. ],
  1443. "optional": [
  1444. {
  1445. "name": "accept_rules",
  1446. "_content": "If the group has rules, they must be displayed to the user prior to joining. Passing a true value for this argument specifies that the application has displayed the group rules to the user, and that the user has agreed to them. (See flickr.groups.getInfo)."
  1447. }
  1448. ],
  1449. "errors": [
  1450. {
  1451. "code": "1",
  1452. "message": "Required arguments missing",
  1453. "_content": "The group_id doesn't exist"
  1454. },
  1455. {
  1456. "code": "2",
  1457. "message": "Group does not exist",
  1458. "_content": "The Group does not exist"
  1459. },
  1460. {
  1461. "code": "3",
  1462. "message": "Group not availabie to the account",
  1463. "_content": "The authed account does not have permission to view/join the group."
  1464. },
  1465. {
  1466. "code": "4",
  1467. "message": "Account is already in that group",
  1468. "_content": "The authed account has previously joined this group"
  1469. },
  1470. {
  1471. "code": "5",
  1472. "message": "Membership in group is by invitation only.",
  1473. "_content": "Use flickr.groups.joinRequest to contact the administrations for an invitation."
  1474. },
  1475. {
  1476. "code": "6",
  1477. "message": "User must accept the group rules before joining",
  1478. "_content": "The user must read and accept the rules before joining. Please see the accept_rules argument for this method."
  1479. },
  1480. {
  1481. "code": "10",
  1482. "message": "Account in maximum number of groups",
  1483. "_content": "The account is a member of the maximum number of groups."
  1484. }
  1485. ],
  1486. "security": {
  1487. "needslogin": 1,
  1488. "needssigning": 1,
  1489. "requiredperms": 2
  1490. },
  1491. "name": "flickr.groups.join",
  1492. "url": "https://www.flickr.com/services/api/flickr.groups.join.html"
  1493. },
  1494. "flickr.groups.joinRequest": {
  1495. "required": [
  1496. {
  1497. "name": "group_id",
  1498. "_content": "The NSID of the group to request joining."
  1499. },
  1500. {
  1501. "name": "message",
  1502. "_content": "Message to the administrators."
  1503. },
  1504. {
  1505. "name": "accept_rules",
  1506. "_content": "If the group has rules, they must be displayed to the user prior to joining. Passing a true value for this argument specifies that the application has displayed the group rules to the user, and that the user has agreed to them. (See flickr.groups.getInfo)."
  1507. }
  1508. ],
  1509. "errors": [
  1510. {
  1511. "code": "1",
  1512. "message": "Required arguments missing",
  1513. "_content": "The group_id or message argument are missing."
  1514. },
  1515. {
  1516. "code": "2",
  1517. "message": "Group does not exist",
  1518. "_content": "The Group does not exist"
  1519. },
  1520. {
  1521. "code": "3",
  1522. "message": "Group not available to the account",
  1523. "_content": "The authed account does not have permission to view/join the group."
  1524. },
  1525. {
  1526. "code": "4",
  1527. "message": "Account is already in that group",
  1528. "_content": "The authed account has previously joined this group"
  1529. },
  1530. {
  1531. "code": "5",
  1532. "message": "Group is public and open",
  1533. "_content": "The group does not require an invitation to join, please use flickr.groups.join."
  1534. },
  1535. {
  1536. "code": "6",
  1537. "message": "User must accept the group rules before joining",
  1538. "_content": "The user must read and accept the rules before joining. Please see the accept_rules argument for this method."
  1539. },
  1540. {
  1541. "code": "7",
  1542. "message": "User has already requested to join that group",
  1543. "_content": "A request has already been sent and is pending approval."
  1544. }
  1545. ],
  1546. "security": {
  1547. "needslogin": 1,
  1548. "needssigning": 1,
  1549. "requiredperms": 2
  1550. },
  1551. "name": "flickr.groups.joinRequest",
  1552. "url": "https://www.flickr.com/services/api/flickr.groups.joinRequest.html"
  1553. },
  1554. "flickr.groups.leave": {
  1555. "required": [
  1556. {
  1557. "name": "group_id",
  1558. "_content": "The NSID of the Group to leave"
  1559. }
  1560. ],
  1561. "optional": [
  1562. {
  1563. "name": "delete_photos",
  1564. "_content": "Delete all photos by this user from the group"
  1565. }
  1566. ],
  1567. "errors": [
  1568. {
  1569. "code": "1",
  1570. "message": "Required arguments missing",
  1571. "_content": "The group_id doesn't exist"
  1572. },
  1573. {
  1574. "code": "2",
  1575. "message": "Group does not exist",
  1576. "_content": "The group by that ID does not exist"
  1577. },
  1578. {
  1579. "code": "3",
  1580. "message": "Account is not in that group",
  1581. "_content": "The user is not a member of the group that was specified"
  1582. }
  1583. ],
  1584. "security": {
  1585. "needslogin": 1,
  1586. "needssigning": 1,
  1587. "requiredperms": 3
  1588. },
  1589. "name": "flickr.groups.leave",
  1590. "url": "https://www.flickr.com/services/api/flickr.groups.leave.html"
  1591. },
  1592. "flickr.groups.members.getList": {
  1593. "required": [
  1594. {
  1595. "name": "group_id",
  1596. "_content": "Return a list of members for this group. The group must be viewable by the Flickr member on whose behalf the API call is made."
  1597. }
  1598. ],
  1599. "optional": [
  1600. {
  1601. "name": "membertypes",
  1602. "_content": "Comma separated list of member types\r\n<ul>\r\n<li>2: member</li>\r\n<li>3: moderator</li>\r\n<li>4: admin</li>\r\n</ul>\r\nBy default returns all types. (Returning super rare member type \"1: narwhal\" isn't supported by this API method)"
  1603. },
  1604. {
  1605. "name": "per_page",
  1606. "_content": "Number of members to return per page. If this argument is omitted, it defaults to 100. The maximum allowed value is 500."
  1607. },
  1608. {
  1609. "name": "page",
  1610. "_content": "The page of results to return. If this argument is omitted, it defaults to 1."
  1611. }
  1612. ],
  1613. "errors": [
  1614. {
  1615. "code": "1",
  1616. "message": "Group not found",
  1617. "_content": ""
  1618. }
  1619. ],
  1620. "security": {
  1621. "needslogin": 1,
  1622. "needssigning": 1,
  1623. "requiredperms": 1
  1624. },
  1625. "name": "flickr.groups.members.getList",
  1626. "url": "https://www.flickr.com/services/api/flickr.groups.members.getList.html"
  1627. },
  1628. "flickr.groups.pools.add": {
  1629. "required": [
  1630. {
  1631. "name": "photo_id",
  1632. "_content": "The id of the photo to add to the group pool. The photo must belong to the calling user."
  1633. },
  1634. {
  1635. "name": "group_id",
  1636. "_content": "The NSID of the group who's pool the photo is to be added to."
  1637. }
  1638. ],
  1639. "errors": [
  1640. {
  1641. "code": "1",
  1642. "message": "Photo not found",
  1643. "_content": "The photo id passed was not the id of a photo owned by the caling user."
  1644. },
  1645. {
  1646. "code": "2",
  1647. "message": "Group not found",
  1648. "_content": "The group id passed was not a valid id for a group the user is a member of."
  1649. },
  1650. {
  1651. "code": "3",
  1652. "message": "Photo already in pool",
  1653. "_content": "The specified photo is already in the pool for the specified group."
  1654. },
  1655. {
  1656. "code": "4",
  1657. "message": "Photo in maximum number of pools",
  1658. "_content": "The photo has already been added to the maximum allowed number of pools."
  1659. },
  1660. {
  1661. "code": "5",
  1662. "message": "Photo limit reached",
  1663. "_content": "The user has already added the maximum amount of allowed photos to the pool."
  1664. },
  1665. {
  1666. "code": "6",
  1667. "message": "Your Photo has been added to the Pending Queue for this Pool",
  1668. "_content": "The pool is moderated, and the photo has been added to the Pending Queue. If it is approved by a group administrator, it will be added to the pool."
  1669. },
  1670. {
  1671. "code": "7",
  1672. "message": "Your Photo has already been added to the Pending Queue for this Pool",
  1673. "_content": "The pool is moderated, and the photo has already been added to the Pending Queue."
  1674. },
  1675. {
  1676. "code": "8",
  1677. "message": "Content not allowed",
  1678. "_content": "The content has been disallowed from the pool by the group admin(s)."
  1679. },
  1680. {
  1681. "code": "10",
  1682. "message": "Maximum number of photos in Group Pool",
  1683. "_content": "A group pool has reached the upper limit for the number of photos allowed."
  1684. }
  1685. ],
  1686. "security": {
  1687. "needslogin": 1,
  1688. "needssigning": 1,
  1689. "requiredperms": 2
  1690. },
  1691. "name": "flickr.groups.pools.add",
  1692. "url": "https://www.flickr.com/services/api/flickr.groups.pools.add.html"
  1693. },
  1694. "flickr.groups.pools.getContext": {
  1695. "required": [
  1696. {
  1697. "name": "photo_id",
  1698. "_content": "The id of the photo to fetch the context for."
  1699. },
  1700. {
  1701. "name": "group_id",
  1702. "_content": "The nsid of the group who's pool to fetch the photo's context for."
  1703. }
  1704. ],
  1705. "optional": [
  1706. {
  1707. "name": "num_prev",
  1708. "_content": ""
  1709. },
  1710. {
  1711. "name": "num_next",
  1712. "_content": ""
  1713. },
  1714. {
  1715. "name": "extras",
  1716. "_content": "A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: description, license, date_upload, date_taken, owner_name, icon_server, original_for…

Large files files are truncated, but you can click here to view the full file