{"_id":"55b96120b42b610d00c9b29b","category":{"_id":"55b9611fb42b610d00c9b291","__v":2,"pages":["55b96120b42b610d00c9b29a","55b96120b42b610d00c9b29b","55b96120b42b610d00c9b29c","55b96120b42b610d00c9b29d","55b96120b42b610d00c9b29e","55b96120b42b610d00c9b29f","55b96120b42b610d00c9b2a0","55b96120b42b610d00c9b2a1","55ba5b8c04775a2f0062813d"],"project":"54295508cd35120800fceca2","version":"55b9611eb42b610d00c9b28d","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-29T12:48:08.939Z","from_sync":false,"order":3,"slug":"api-tokens-endpoints","title":"Rpc Endpoints"},"__v":0,"user":"542954f6cd35120800fceca0","version":{"_id":"55b9611eb42b610d00c9b28d","__v":4,"project":"54295508cd35120800fceca2","createdAt":"2015-07-29T23:26:22.532Z","releaseDate":"2015-07-29T23:26:22.532Z","categories":["55b9611fb42b610d00c9b28e","55b9611fb42b610d00c9b28f","55b9611fb42b610d00c9b290","55b9611fb42b610d00c9b291","55b9611fb42b610d00c9b292","55b9611fb42b610d00c9b293","55bc25ee76754617002aa893","56ae7f53be2c040d00d5a09b","56ae7f7b0c1cab0d009f65d1"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"editedParams":true,"editedParams2":true,"project":"54295508cd35120800fceca2","updates":["5493338a777ff221004a7ec7","5493342185bcfc1600ef46c2","54a8350d2d63c70b00220b1c"],"next":{"pages":[],"description":""},"createdAt":"2014-09-29T13:36:19.441Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"post","results":{"codes":[]},"auth":"never","params":[{"_id":"542960538d596e080056e9de","ref":"","in":"body","required":true,"desc":"your api token (get it at http://dev.justyo.co)","default":"","type":"string","name":"api_token"},{"_id":"542960538d596e080056e9dd","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"link"}],"url":"/yoall/"},"isReference":false,"order":1,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var http = new XMLHttpRequest();\\nvar url = \\\"https://api.justyo.co/yoall/\\\";\\nvar params = \\\"api_token=<token>&link=http://optional-link.com\\\";\\nhttp.open(\\\"POST\\\", url, true);\\n\\n//Send the proper header information along with the request\\nhttp.setRequestHeader(\\\"Content-type\\\", \\\"application/x-www-form-urlencoded\\\");\\nhttp.setRequestHeader(\\\"Content-length\\\", params.length);\\nhttp.setRequestHeader(\\\"Connection\\\", \\\"close\\\");\\n\\nhttp.onreadystatechange = function() {//Call a function when the state changes.\\n    if(http.readyState == 4 && http.status == 200) {\\n        alert(http.responseText);\\n    }\\n}\\nhttp.send(params);\",\n      \"language\": \"javascript\"\n    },\n    {\n      \"code\": \"import requests\\nrequests.post(\\\"https://api.justyo.co/yoall/\\\", data={'api_token': api_token, 'link': 'http://optional-link.com'})\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"require 'net/http'\\n\\npostData = Net::HTTP.post_form(URI.parse('https://api.justyo.co/yoall/'), {'api_token'=>'<token>', 'link'=>'http://optional-link.com'})\\n\\nputs postData.body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"$url = 'https://api.justyo.co/yoall/';\\n$data = array('api_token' => 'token', 'link' => 'http://optional-link.com');\\n\\n$options = array(\\n    'http' => array(\\n        'header'  => \\\"Content-type: application/x-www-form-urlencoded\\\\r\\\\n\\\",\\n        'method'  => 'POST',\\n        'content' => http_build_query($data),\\n    ),\\n);\\n$context  = stream_context_create($options);\\n$result = file_get_contents($url, false, $context);\\n\\nvar_dump($result);\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"NSURL *url = [NSURL urlWithString::::at:::\\\"https://api.justyo.co/yoall/\\\";\\nNSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];\\n// Set request type\\nrequest.HTTPMethod = @\\\"POST\\\";\\n \\n// Set params to be sent to the server\\nNSString *params = @\\\"api_token=<token>&link=http://optional-link.com\\\";\\n// Encoding type\\nNSData *data = [params dataUsingEncoding:NSUTF8StringEncoding];\\n// Add values and contenttype to the http header\\n[request addValue:@\\\"8bit\\\" forHTTPHeaderField:@\\\"Content-Transfer-Encoding\\\"];\\n[request addValue:@\\\"application/x-www-form-urlencoded\\\" forHTTPHeaderField:@\\\"Content-Type\\\"];\\n[request addValue:[NSString stringWithFormat:@\\\"%lu\\\", (unsigned long)[data length]] forHTTPHeaderField:@\\\"Content-Length\\\"];\\n[request setHTTPBody:data];\\n \\n// Send the request\\n[NSURLConnection connectionWithRequest:request delegate:self];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"String url = \\\"https://api.justyo.co/yoall/\\\";\\nURL obj = new URL(url);\\nHttpsURLConnection con = (HttpsURLConnection) obj.openConnection();\\n\\ncon.setRequestMethod(\\\"POST\\\");\\n\\nString urlParameters = \\\"api_token=<token>\\\";\\n\\ncon.setDoOutput(true);\\nDataOutputStream wr = new DataOutputStream(con.getOutputStream());\\nwr.writeBytes(urlParameters);\\nwr.flush();\\nwr.close();\\n\\nint responseCode = con.getResponseCode();\\n\\nBufferedReader in = new BufferedReader(\\n        new InputStreamReader(con.getInputStream()));\\nString inputLine;\\nStringBuffer response = new StringBuffer();\\n\\nwhile ((inputLine = in.readLine()) != null) {\\n\\tresponse.append(inputLine);\\n}\\nin.close();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var request = require('request');\\n\\nrequest.post(\\n    'http://api.justyo.co/yoall/',\\n    { form: { 'api_token': '<token>',\\n              'link': 'http://google.com' } },\\n    function (error, response, body) {\\n        if (!error && response.statusCode == 200) {\\n            console.log(body);\\n        }\\n    }\\n);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"yoall","type":"endpoint","title":"/yoall/"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

api_token:
required
string
your api token (get it at http://dev.justyo.co)
link:
string

Documentation

[block:code] { "codes": [ { "code": "var http = new XMLHttpRequest();\nvar url = \"https://api.justyo.co/yoall/\";\nvar params = \"api_token=<token>&link=http://optional-link.com\";\nhttp.open(\"POST\", url, true);\n\n//Send the proper header information along with the request\nhttp.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\nhttp.setRequestHeader(\"Content-length\", params.length);\nhttp.setRequestHeader(\"Connection\", \"close\");\n\nhttp.onreadystatechange = function() {//Call a function when the state changes.\n if(http.readyState == 4 && http.status == 200) {\n alert(http.responseText);\n }\n}\nhttp.send(params);", "language": "javascript" }, { "code": "import requests\nrequests.post(\"https://api.justyo.co/yoall/\", data={'api_token': api_token, 'link': 'http://optional-link.com'})", "language": "python" }, { "code": "require 'net/http'\n\npostData = Net::HTTP.post_form(URI.parse('https://api.justyo.co/yoall/'), {'api_token'=>'<token>', 'link'=>'http://optional-link.com'})\n\nputs postData.body", "language": "ruby" }, { "code": "$url = 'https://api.justyo.co/yoall/';\n$data = array('api_token' => 'token', 'link' => 'http://optional-link.com');\n\n$options = array(\n 'http' => array(\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n 'method' => 'POST',\n 'content' => http_build_query($data),\n ),\n);\n$context = stream_context_create($options);\n$result = file_get_contents($url, false, $context);\n\nvar_dump($result);", "language": "php" }, { "code": "NSURL *url = [NSURL urlWithString:@\"https://api.justyo.co/yoall/\";\nNSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];\n// Set request type\nrequest.HTTPMethod = @\"POST\";\n \n// Set params to be sent to the server\nNSString *params = @\"api_token=<token>&link=http://optional-link.com\";\n// Encoding type\nNSData *data = [params dataUsingEncoding:NSUTF8StringEncoding];\n// Add values and contenttype to the http header\n[request addValue:@\"8bit\" forHTTPHeaderField:@\"Content-Transfer-Encoding\"];\n[request addValue:@\"application/x-www-form-urlencoded\" forHTTPHeaderField:@\"Content-Type\"];\n[request addValue:[NSString stringWithFormat:@\"%lu\", (unsigned long)[data length]] forHTTPHeaderField:@\"Content-Length\"];\n[request setHTTPBody:data];\n \n// Send the request\n[NSURLConnection connectionWithRequest:request delegate:self];", "language": "objectivec" }, { "code": "String url = \"https://api.justyo.co/yoall/\";\nURL obj = new URL(url);\nHttpsURLConnection con = (HttpsURLConnection) obj.openConnection();\n\ncon.setRequestMethod(\"POST\");\n\nString urlParameters = \"api_token=<token>\";\n\ncon.setDoOutput(true);\nDataOutputStream wr = new DataOutputStream(con.getOutputStream());\nwr.writeBytes(urlParameters);\nwr.flush();\nwr.close();\n\nint responseCode = con.getResponseCode();\n\nBufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\nString inputLine;\nStringBuffer response = new StringBuffer();\n\nwhile ((inputLine = in.readLine()) != null) {\n\tresponse.append(inputLine);\n}\nin.close();", "language": "java" }, { "code": "var request = require('request');\n\nrequest.post(\n 'http://api.justyo.co/yoall/',\n { form: { 'api_token': '<token>',\n 'link': 'http://google.com' } },\n function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body);\n }\n }\n);", "language": "javascript" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}