{"_id":"56c41b892e75e01700986055","parentDoc":null,"user":"56b98db7bb36440d0001f492","project":"56bc8e679afb8b0d00d62dcf","category":{"_id":"56c4182370187b17005f43b5","project":"56bc8e679afb8b0d00d62dcf","pages":["56c41b0dd1f6d91700d36972","56c41b4dc0c4630d004e86bc","56c41b57bb64720d00552b8f","56c41b892e75e01700986055","56c41b9548213b1700af6e2c","56c41ba72d97560d00e23cfb","56c41bb870187b17005f43bb","56c41bc6e1e4190d003429d5","56c41bd4c0c4630d004e86be","56c41be728bd680d005e7ac8","56c41c03c4796b0d007ef040","56c41c0d106c12170020dba0","56c41c1ac4796b0d007ef042","56c41c362e75e01700986057","56c41c413d30210d00ea851b","56c41c50bb64720d00552b91","56c41c5c34df460d00c2bed3","56c41c66c0c4630d004e86c0"],"version":"56bc8e689afb8b0d00d62dd2","__v":18,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-02-17T06:50:11.715Z","from_sync":false,"order":7,"slug":"media-and-files","title":"Media and Files"},"__v":7,"version":{"_id":"56bc8e689afb8b0d00d62dd2","project":"56bc8e679afb8b0d00d62dcf","__v":18,"createdAt":"2016-02-11T13:36:40.146Z","releaseDate":"2016-02-11T13:36:40.146Z","categories":["56bc8e689afb8b0d00d62dd3","56c3c837bc41330d009f25ed","56c3c83e521f350d00d348eb","56c3c8452d97560d00e23cd8","56c3c85234df460d00c2beb8","56c4180d70187b17005f43b4","56c418162d97560d00e23cf6","56c4181cc4796b0d007ef039","56c4182370187b17005f43b5","56c418292e75e01700986052","56c4183328bd680d005e7ac6","56c4183bbb64720d00552b88","56c418414040602b0064cea0","56c4184754b6030d00ec29a1","56c4184c28bd680d005e7ac7","56c4185370187b17005f43b6","56c4185b6063071700500cfc","582a98b6f8c0a0190053d7a5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-17T07:04:41.785Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/pictures\"\n}\n[/block]\nReturns a set of pictures matching the given criteria.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var options = {\\n\\townerID: \\\"bvc.nqgbvzkcrDlr\\\",\\n\\tcontentType: \\\"images/png\\\",\\n\\tcaption: \\\"This is an awesome picture caption!\\\",\\n\\tlocationRange: \\\"47.1, -122.3, 10000\\\",\\n\\tcreated: \\\"2014/6/01-2014/12/31\\\",\\n\\tlastModified: \\\"2014/6/01-2014/12/31\\\",\\n\\tsortOrder: \\\"-{sortingParameter}\\\",\\n\\tpagingToken: \\\"10;20\\\",\\n\\ttitle: \\\"Some Title\\\"\\n};\\n\\nBuddy.get('/pictures',\\n\\t\\toptions,\\n\\t\\tfunction(err, result) {\\n\\t\\t\\t \\n\\t\\t\\tif (result.success) {\\n\\t\\t\\t\\t// Do something with the result!\\n\\t\\t\\t} else { \\n\\t\\t\\t\\t// Otherwise log the error\\n\\t\\t\\t\\tconsole.log(err); \\n\\t\\t\\t} \\n\\t\\t}\\n\\t);\",\n      \"language\": \"javascript\"\n    },\n    {\n      \"code\": \"NSDictionary *params = :::at:::{\\n\\t\\t\\[email protected]\\\"ownerID\\\": @\\\"bvc.nqgbvzkcrDlr\\\",\\n\\t\\t\\[email protected]\\\"contentType\\\": @\\\"images/png\\\",\\n\\t\\t\\[email protected]\\\"caption\\\": @\\\"This is an awesome picture caption!\\\",\\n\\t\\t\\[email protected]\\\"locationRange\\\": BPCoordinateRangeMake(47.1, -121.292, 2500),\\n\\t\\t\\[email protected]\\\"created\\\": @\\\"2014/6/01-2014/12/31\\\",\\n\\t\\t\\[email protected]\\\"lastModified\\\": @\\\"2014/6/01-2014/12/31\\\",\\n\\t\\t\\[email protected]\\\"sortOrder\\\": @\\\"-{sortingParameter}\\\",\\n\\t\\t\\[email protected]\\\"pagingToken\\\": @\\\"10;20\\\",\\n\\t\\t\\[email protected]\\\"title\\\": @\\\"Some Title\\\"\\n\\t\\t};\\n\\n[Buddy GET:@\\\"/pictures\\\" parameters:params class:[BPPagedResult class] callback:^(id obj, NSError *error) {\\n\\t// Your callback code here\\n}];\",\n      \"language\": \"objectivec\",\n      \"name\": \"iOS\"\n    },\n    {\n      \"code\": \"Map<String, Object> parameters = new HashMap<String, Object>();\\nparameters.put(\\\"ownerID\\\", \\\"bvc.nqgbvzkcrDlr\\\");\\nparameters.put(\\\"contentType\\\", \\\"images/png\\\");\\nparameters.put(\\\"caption\\\", \\\"This is an awesome picture caption!\\\");\\nparameters.put(\\\"locationRange\\\", myLocationRange);\\nparameters.put(\\\"created\\\", \\\"2014/6/01-2014/12/31\\\");\\nparameters.put(\\\"lastModified\\\", \\\"2014/6/01-2014/12/31\\\");\\nparameters.put(\\\"sortOrder\\\", \\\"-{sortingParameter}\\\");\\nparameters.put(\\\"pagingToken\\\", \\\"10;20\\\");\\nparameters.put(\\\"title\\\", \\\"Some Title\\\");\\n\\nBuddy.get(\\\"/pictures\\\", parameters, new BuddyCallback<PagedResult>(PagedResult.class) {\\n\\[email protected]\\n\\tpublic void completed(BuddyResult<PagedResult> result) {\\n\\t\\tList<Picture> resultList = result.getResult().convertPageResults(Picture.class);\\n\\t\\t// Your callback code here\\n\\t}\\n});\",\n      \"language\": \"java\",\n      \"name\": \"Android\"\n    },\n    {\n      \"code\": \"var options = new {\\n\\t\\t\\townerID = \\\"bvc.nqgbvzkcrDlr\\\",\\n\\t\\t\\tcontentType = \\\"images/png\\\",\\n\\t\\t\\tcaption = \\\"This is an awesome picture caption!\\\",\\n\\t\\t\\tlocationRange = new BuddyGeoLocationRange(47.1, -122.3, 5000),\\n\\t\\t\\tcreated = \\\"2014/6/01-2014/12/31\\\",\\n\\t\\t\\tlastModified = \\\"2014/6/01-2014/12/31\\\",\\n\\t\\t\\tsortOrder = \\\"-{sortingParameter}\\\",\\n\\t\\t\\tpagingToken = \\\"10;20\\\",\\n\\t\\t\\ttitle = \\\"Some Title\\\"\\n\\t\\t};\\n\\nvar result = await Buddy.GetAsync<PagedResult<Picture>>(\\\"/pictures\\\", options);\",\n      \"language\": \"csharp\",\n      \"name\": \".NET\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n###Body Parameters\n\nThese parameters should be specified as part of the request body.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"ownerID\",\n    \"1-0\": \"contentType\",\n    \"2-0\": \"caption\",\n    \"3-0\": \"locationRange\",\n    \"4-0\": \"created\",\n    \"5-0\": \"lastModified\",\n    \"6-0\": \"sortOrder\",\n    \"7-0\": \"pagingToken\",\n    \"8-0\": \"title\",\n    \"0-1\": \"The ID of the user to return pictures for.\",\n    \"1-1\": \"Returns only those pictures which have the specified content type (e.g. images/png).\",\n    \"2-1\": \"Searches for pictures with the given caption.\",\n    \"3-1\": \"Specifies the location and range to search within specified as {latitude}, {longitude}, {range in meters}, for example 47.1,-122.3,10000. Note: there is a maximum searchable radius of 20,000 meters.\",\n    \"4-1\": \"Searches for the created value of an object by date range. Valid date formats include UTC timestamps specified as Unix ticks (milliseconds since Jan 1, 1970) such as \\\"136512000000-1398816000000\\\" and common date formats such as \\\"2012/1/27-2014/5/6\\\".\",\n    \"5-1\": \"Searches for the lastModified value of an object by date range. Valid date formats include UTC timestamps specified as Unix ticks (milliseconds since Jan 1, 1970) such as \\\"136512000000-1398816000000\\\" and common date formats such as \\\"2012/1/27-2014/5/6\\\".\",\n    \"6-1\": \"Specifies the order in which a collection of results should be returned. To use this parameter, identify the parameter to sort on and prepend it with \\\"+\\\" to sort the results on field in ascending order or \\\"-\\\" for descending order (e.g. specifying \\\"+firstName\\\" will sort the results on the first name of each record, in ascending order).\",\n    \"7-1\": \"Specifies the current page of results to obtain in a multi-page result set. The token can be obtained from a search result set by looking at the currentToken, nextToken, and previousToken result values which, when used in a subsequent search, will return the current, next, and previous page of results. Paging can be specified manually in the format \\\"{limit};{skip}\\\", where \\\"10;20\\\" would dictate a \\\"page limit of 10, skipping the first 20 results.\\\"\",\n    \"8-1\": \"The title of the picture.\",\n    \"0-2\": \"buddyId\",\n    \"1-2\": \"string\",\n    \"2-2\": \"string\",\n    \"3-2\": \"string\",\n    \"4-2\": \"string\",\n    \"5-2\": \"string\",\n    \"6-2\": \"string\",\n    \"7-2\": \"string\",\n    \"8-2\": \"string\",\n    \"0-3\": \"Optional\",\n    \"1-3\": \"Optional\",\n    \"2-3\": \"Optional\",\n    \"3-3\": \"Optional\",\n    \"4-3\": \"Optional\",\n    \"5-3\": \"Optional\",\n    \"6-3\": \"Optional\",\n    \"7-3\": \"Optional\",\n    \"8-3\": \"Optional\"\n  },\n  \"cols\": 4,\n  \"rows\": 9\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"status\\\": 200,\\n    \\\"result\\\": {\\n        \\\"currentToken\\\": \\\"]}$CrrKF$<$ddddde0xEhdddlDixMi$.$QdlgevV{rgPcog$<$Rkevwtg$.$RctgpvQdlgevKF$pwnn.$TgswguvkpiWugtKF$$dx0erjdxieJuRej$.$QypgtWugtKF$pwnn.$Nqecvkqp$pwnn.$UgctejFkuvcpegKpOgvgtu$2.$UvctvFcvg$pwnn.$GpfFcvg$pwnn.$FcvgTcpigOqfg$<2.$UgctejRtqrgtvkgu$<]_.$Rtqrgtv{Uqtv$<]_.$OczTguwnvu$<722.$Umkr$<2.$722=2$.$dd0dddddOoJMnsj$_\\\",\\n        \\\"pageResults\\\": [\\n            {\\n                \\\"size\\\": {\\n                    \\\"w\\\": 100,\\n                    \\\"h\\\": 69\\n                },\\n                \\\"rootPath\\\": \\\"pictures\\\",\\n                \\\"contentType\\\": \\\"image/png\\\",\\n                \\\"contentLength\\\": 0,\\n                \\\"signedUrl\\\": \\\"http://api-us.buddyplatform.com/pictures/bvc.BfkbyyfcFlqh/file?sig=iL3J%2BVrd2E6dZD53CgvIRRws%2BZeaCLERaOg1agmYTg86HJGNNGLpZSv0W2ZyN0G8hqynAL4HjZkMgipTfDMLtZcn3KGqui3NhRFW2oLy3U9bk2ppOvdmSwis%2BqAWHwUL%2FlERZmqbGPJ9JdUV%2BblUGVzIJA7p%2FSw1kdz%2F38SivoyxTTFs4QXusAjIu5sjc891\\\",\\n                \\\"id\\\": \\\"bvc.BfkbvNttlqh\\\",\\n                \\\"location\\\": \\\"49.2124,-122.9696\\\",\\n                \\\"created\\\": \\\"/Date(1392146611447)/\\\",\\n                \\\"lastModified\\\": \\\"/Date(1392146611760)/\\\"\\n            },\\n            {\\n                \\\"size\\\": {\\n                    \\\"w\\\": 10,\\n                    \\\"h\\\": 7\\n                },\\n                \\\"rootPath\\\": \\\"pictures\\\",\\n                \\\"contentType\\\": \\\"image/png\\\",\\n                \\\"contentLength\\\": 0,\\n                \\\"signedUrl\\\": \\\"http://api-us.buddyplatform.com/pictures/bvc.zfkrrwNMvlqh/file?sig=DSR1nOFF5qDPwN46splKvZG0lCmLn9%2BFW4ju4M60PeX0mEy9E84kwa9bQWnY4wvIfrRSbe%2BXdInfYF%2FMDlOXa9zvZf8h%2B4%2Fb%2BHXJLsKZ5aBH2f8Wvp4WSeY0wOM4w8p4%2BFCpt%2BOmFiZxIHvK0dnIlXaw9w9m20qsR1nv9ZWaefUCC0Y0GHrcNYWTUpsd2mPR\\\",\\n                \\\"id\\\": \\\"bvc.zfkbrrNMvlqh\\\",\\n                \\\"location\\\": \\\"49.2124,-122.9696\\\",\\n                \\\"created\\\": \\\"/Date(1392146211740)/\\\",\\n                \\\"lastModified\\\": \\\"/Date(1392146212090)/\\\"\\n            }\\n        ]\\n    },\\n    \\\"request_id\\\": \\\"99859ca8-32a5-4cff-88a6-ebf32afb0093\\\",\\n    \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"search-pictures","type":"basic","title":"Search Pictures"}
[block:api-header] { "type": "get", "title": "/pictures" } [/block] Returns a set of pictures matching the given criteria. [block:code] { "codes": [ { "code": "var options = {\n\townerID: \"bvc.nqgbvzkcrDlr\",\n\tcontentType: \"images/png\",\n\tcaption: \"This is an awesome picture caption!\",\n\tlocationRange: \"47.1, -122.3, 10000\",\n\tcreated: \"2014/6/01-2014/12/31\",\n\tlastModified: \"2014/6/01-2014/12/31\",\n\tsortOrder: \"-{sortingParameter}\",\n\tpagingToken: \"10;20\",\n\ttitle: \"Some Title\"\n};\n\nBuddy.get('/pictures',\n\t\toptions,\n\t\tfunction(err, result) {\n\t\t\t \n\t\t\tif (result.success) {\n\t\t\t\t// Do something with the result!\n\t\t\t} else { \n\t\t\t\t// Otherwise log the error\n\t\t\t\tconsole.log(err); \n\t\t\t} \n\t\t}\n\t);", "language": "javascript" }, { "code": "NSDictionary *params = @{\n\t\t\[email protected]\"ownerID\": @\"bvc.nqgbvzkcrDlr\",\n\t\t\[email protected]\"contentType\": @\"images/png\",\n\t\t\[email protected]\"caption\": @\"This is an awesome picture caption!\",\n\t\t\[email protected]\"locationRange\": BPCoordinateRangeMake(47.1, -121.292, 2500),\n\t\t\[email protected]\"created\": @\"2014/6/01-2014/12/31\",\n\t\t\[email protected]\"lastModified\": @\"2014/6/01-2014/12/31\",\n\t\t\[email protected]\"sortOrder\": @\"-{sortingParameter}\",\n\t\t\[email protected]\"pagingToken\": @\"10;20\",\n\t\t\[email protected]\"title\": @\"Some Title\"\n\t\t};\n\n[Buddy GET:@\"/pictures\" parameters:params class:[BPPagedResult class] callback:^(id obj, NSError *error) {\n\t// Your callback code here\n}];", "language": "objectivec", "name": "iOS" }, { "code": "Map<String, Object> parameters = new HashMap<String, Object>();\nparameters.put(\"ownerID\", \"bvc.nqgbvzkcrDlr\");\nparameters.put(\"contentType\", \"images/png\");\nparameters.put(\"caption\", \"This is an awesome picture caption!\");\nparameters.put(\"locationRange\", myLocationRange);\nparameters.put(\"created\", \"2014/6/01-2014/12/31\");\nparameters.put(\"lastModified\", \"2014/6/01-2014/12/31\");\nparameters.put(\"sortOrder\", \"-{sortingParameter}\");\nparameters.put(\"pagingToken\", \"10;20\");\nparameters.put(\"title\", \"Some Title\");\n\nBuddy.get(\"/pictures\", parameters, new BuddyCallback<PagedResult>(PagedResult.class) {\n\[email protected]\n\tpublic void completed(BuddyResult<PagedResult> result) {\n\t\tList<Picture> resultList = result.getResult().convertPageResults(Picture.class);\n\t\t// Your callback code here\n\t}\n});", "language": "java", "name": "Android" }, { "code": "var options = new {\n\t\t\townerID = \"bvc.nqgbvzkcrDlr\",\n\t\t\tcontentType = \"images/png\",\n\t\t\tcaption = \"This is an awesome picture caption!\",\n\t\t\tlocationRange = new BuddyGeoLocationRange(47.1, -122.3, 5000),\n\t\t\tcreated = \"2014/6/01-2014/12/31\",\n\t\t\tlastModified = \"2014/6/01-2014/12/31\",\n\t\t\tsortOrder = \"-{sortingParameter}\",\n\t\t\tpagingToken = \"10;20\",\n\t\t\ttitle = \"Some Title\"\n\t\t};\n\nvar result = await Buddy.GetAsync<PagedResult<Picture>>(\"/pictures\", options);", "language": "csharp", "name": ".NET" } ], "sidebar": true } [/block] ###Body Parameters These parameters should be specified as part of the request body. [block:parameters] { "data": { "0-0": "ownerID", "1-0": "contentType", "2-0": "caption", "3-0": "locationRange", "4-0": "created", "5-0": "lastModified", "6-0": "sortOrder", "7-0": "pagingToken", "8-0": "title", "0-1": "The ID of the user to return pictures for.", "1-1": "Returns only those pictures which have the specified content type (e.g. images/png).", "2-1": "Searches for pictures with the given caption.", "3-1": "Specifies the location and range to search within specified as {latitude}, {longitude}, {range in meters}, for example 47.1,-122.3,10000. Note: there is a maximum searchable radius of 20,000 meters.", "4-1": "Searches for the created value of an object by date range. Valid date formats include UTC timestamps specified as Unix ticks (milliseconds since Jan 1, 1970) such as \"136512000000-1398816000000\" and common date formats such as \"2012/1/27-2014/5/6\".", "5-1": "Searches for the lastModified value of an object by date range. Valid date formats include UTC timestamps specified as Unix ticks (milliseconds since Jan 1, 1970) such as \"136512000000-1398816000000\" and common date formats such as \"2012/1/27-2014/5/6\".", "6-1": "Specifies the order in which a collection of results should be returned. To use this parameter, identify the parameter to sort on and prepend it with \"+\" to sort the results on field in ascending order or \"-\" for descending order (e.g. specifying \"+firstName\" will sort the results on the first name of each record, in ascending order).", "7-1": "Specifies the current page of results to obtain in a multi-page result set. The token can be obtained from a search result set by looking at the currentToken, nextToken, and previousToken result values which, when used in a subsequent search, will return the current, next, and previous page of results. Paging can be specified manually in the format \"{limit};{skip}\", where \"10;20\" would dictate a \"page limit of 10, skipping the first 20 results.\"", "8-1": "The title of the picture.", "0-2": "buddyId", "1-2": "string", "2-2": "string", "3-2": "string", "4-2": "string", "5-2": "string", "6-2": "string", "7-2": "string", "8-2": "string", "0-3": "Optional", "1-3": "Optional", "2-3": "Optional", "3-3": "Optional", "4-3": "Optional", "5-3": "Optional", "6-3": "Optional", "7-3": "Optional", "8-3": "Optional" }, "cols": 4, "rows": 9 } [/block] [block:code] { "codes": [ { "code": "{\n \"status\": 200,\n \"result\": {\n \"currentToken\": \"]}$CrrKF$<$ddddde0xEhdddlDixMi$.$QdlgevV{rgPcog$<$Rkevwtg$.$RctgpvQdlgevKF$pwnn.$TgswguvkpiWugtKF$$dx0erjdxieJuRej$.$QypgtWugtKF$pwnn.$Nqecvkqp$pwnn.$UgctejFkuvcpegKpOgvgtu$2.$UvctvFcvg$pwnn.$GpfFcvg$pwnn.$FcvgTcpigOqfg$<2.$UgctejRtqrgtvkgu$<]_.$Rtqrgtv{Uqtv$<]_.$OczTguwnvu$<722.$Umkr$<2.$722=2$.$dd0dddddOoJMnsj$_\",\n \"pageResults\": [\n {\n \"size\": {\n \"w\": 100,\n \"h\": 69\n },\n \"rootPath\": \"pictures\",\n \"contentType\": \"image/png\",\n \"contentLength\": 0,\n \"signedUrl\": \"http://api-us.buddyplatform.com/pictures/bvc.BfkbyyfcFlqh/file?sig=iL3J%2BVrd2E6dZD53CgvIRRws%2BZeaCLERaOg1agmYTg86HJGNNGLpZSv0W2ZyN0G8hqynAL4HjZkMgipTfDMLtZcn3KGqui3NhRFW2oLy3U9bk2ppOvdmSwis%2BqAWHwUL%2FlERZmqbGPJ9JdUV%2BblUGVzIJA7p%2FSw1kdz%2F38SivoyxTTFs4QXusAjIu5sjc891\",\n \"id\": \"bvc.BfkbvNttlqh\",\n \"location\": \"49.2124,-122.9696\",\n \"created\": \"/Date(1392146611447)/\",\n \"lastModified\": \"/Date(1392146611760)/\"\n },\n {\n \"size\": {\n \"w\": 10,\n \"h\": 7\n },\n \"rootPath\": \"pictures\",\n \"contentType\": \"image/png\",\n \"contentLength\": 0,\n \"signedUrl\": \"http://api-us.buddyplatform.com/pictures/bvc.zfkrrwNMvlqh/file?sig=DSR1nOFF5qDPwN46splKvZG0lCmLn9%2BFW4ju4M60PeX0mEy9E84kwa9bQWnY4wvIfrRSbe%2BXdInfYF%2FMDlOXa9zvZf8h%2B4%2Fb%2BHXJLsKZ5aBH2f8Wvp4WSeY0wOM4w8p4%2BFCpt%2BOmFiZxIHvK0dnIlXaw9w9m20qsR1nv9ZWaefUCC0Y0GHrcNYWTUpsd2mPR\",\n \"id\": \"bvc.zfkbrrNMvlqh\",\n \"location\": \"49.2124,-122.9696\",\n \"created\": \"/Date(1392146211740)/\",\n \"lastModified\": \"/Date(1392146212090)/\"\n }\n ]\n },\n \"request_id\": \"99859ca8-32a5-4cff-88a6-ebf32afb0093\",\n \"success\": true\n}", "language": "json", "name": "Response" } ], "sidebar": true } [/block]