updated api documentation
This commit is contained in:
parent
0e7be58c41
commit
7f408cd87c
@ -724,6 +724,39 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
defs["inline_response_200"] = {
|
defs["inline_response_200"] = {
|
||||||
|
"type" : "object",
|
||||||
|
"properties" : {
|
||||||
|
"User_Name" : {
|
||||||
|
"type" : "string",
|
||||||
|
"example" : "Code002Lover"
|
||||||
|
},
|
||||||
|
"User_Bio" : {
|
||||||
|
"type" : "string",
|
||||||
|
"example" : "wow such empty"
|
||||||
|
},
|
||||||
|
"post_user_name" : {
|
||||||
|
"type" : "string",
|
||||||
|
"example" : "he%20llo"
|
||||||
|
},
|
||||||
|
"post_text" : {
|
||||||
|
"type" : "string",
|
||||||
|
"example" : "hi"
|
||||||
|
},
|
||||||
|
"post_time" : {
|
||||||
|
"type" : "number",
|
||||||
|
"example" : 1653492585836
|
||||||
|
},
|
||||||
|
"post_special_text" : {
|
||||||
|
"type" : "string",
|
||||||
|
"example" : "First post"
|
||||||
|
},
|
||||||
|
"post_id" : {
|
||||||
|
"type" : "number",
|
||||||
|
"example" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
defs["inline_response_200_1"] = {
|
||||||
"required" : [ "bio", "username" ],
|
"required" : [ "bio", "username" ],
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -737,16 +770,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
defs["inline_response_200_1"] = {
|
defs["inline_response_200_2"] = {
|
||||||
"type" : "object",
|
"type" : "object",
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"post_user_name" : {
|
"post_user_name" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"example" : "WmVyb1R3bw=="
|
"example" : "he%20llo"
|
||||||
},
|
},
|
||||||
"post_text" : {
|
"post_text" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"example" : "aGVsbG8lMjB0aGVyZQ=="
|
"example" : "hi"
|
||||||
},
|
},
|
||||||
"post_time" : {
|
"post_time" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -828,6 +861,9 @@
|
|||||||
<li data-group="Everyone" data-name="register" class="">
|
<li data-group="Everyone" data-name="register" class="">
|
||||||
<a href="#api-Everyone-register">register</a>
|
<a href="#api-Everyone-register">register</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li data-group="Everyone" data-name="search" class="">
|
||||||
|
<a href="#api-Everyone-search">search</a>
|
||||||
|
</li>
|
||||||
<li data-group="Everyone" data-name="setBio" class="">
|
<li data-group="Everyone" data-name="setBio" class="">
|
||||||
<a href="#api-Everyone-setBio">setBio</a>
|
<a href="#api-Everyone-setBio">setBio</a>
|
||||||
</li>
|
</li>
|
||||||
@ -888,7 +924,7 @@ also sets the AUTH_COOKIE cookie to the new one
|
|||||||
<div class="tab-pane active" id="examples-Everyone-changePW-0-curl">
|
<div class="tab-pane active" id="examples-Everyone-changePW-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
||||||
-H "Content-Type: application/json"\
|
-H "Content-Type: application/json"\
|
||||||
"https://ws.zerotwohub.tk:25566/api/changePW"</code></pre>
|
"https://ws.zerotwohub.tk:25566//api/changePW"</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="examples-Everyone-changePW-0-java">
|
<div class="tab-pane" id="examples-Everyone-changePW-0-java">
|
||||||
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
@ -1135,7 +1171,7 @@ except ApiException as e:
|
|||||||
<p></p>
|
<p></p>
|
||||||
<p class="marked">returns information about all posts
|
<p class="marked">returns information about all posts
|
||||||
|
|
||||||
username and post text are base64 encoded and URI Encoded
|
username and post text are URI Encoded
|
||||||
</p>
|
</p>
|
||||||
<p></p>
|
<p></p>
|
||||||
<br />
|
<br />
|
||||||
@ -1161,7 +1197,7 @@ username and post text are base64 encoded and URI Encoded
|
|||||||
<div class="tab-pane active" id="examples-Everyone-getPosts-0-curl">
|
<div class="tab-pane active" id="examples-Everyone-getPosts-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">curl -X GET\
|
<pre class="prettyprint"><code class="language-bsh">curl -X GET\
|
||||||
-H "Accept: application/json"\
|
-H "Accept: application/json"\
|
||||||
"https://ws.zerotwohub.tk:25566/api/getPosts"</code></pre>
|
"https://ws.zerotwohub.tk:25566//api/getPosts"</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="examples-Everyone-getPosts-0-java">
|
<div class="tab-pane" id="examples-Everyone-getPosts-0-java">
|
||||||
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
@ -1178,7 +1214,7 @@ public class EveryoneApiExample {
|
|||||||
|
|
||||||
EveryoneApi apiInstance = new EveryoneApi();
|
EveryoneApi apiInstance = new EveryoneApi();
|
||||||
try {
|
try {
|
||||||
array[inline_response_200_1] result = apiInstance.getPosts();
|
array[inline_response_200_2] result = apiInstance.getPosts();
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling EveryoneApi#getPosts");
|
System.err.println("Exception when calling EveryoneApi#getPosts");
|
||||||
@ -1196,7 +1232,7 @@ public class EveryoneApiExample {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
EveryoneApi apiInstance = new EveryoneApi();
|
EveryoneApi apiInstance = new EveryoneApi();
|
||||||
try {
|
try {
|
||||||
array[inline_response_200_1] result = apiInstance.getPosts();
|
array[inline_response_200_2] result = apiInstance.getPosts();
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling EveryoneApi#getPosts");
|
System.err.println("Exception when calling EveryoneApi#getPosts");
|
||||||
@ -1215,7 +1251,7 @@ EveryoneApi *apiInstance = [[EveryoneApi alloc] init];
|
|||||||
|
|
||||||
// returns all posts
|
// returns all posts
|
||||||
[apiInstance getPostsWithCompletionHandler:
|
[apiInstance getPostsWithCompletionHandler:
|
||||||
^(array[inline_response_200_1] output, NSError* error) {
|
^(array[inline_response_200_2] output, NSError* error) {
|
||||||
if (output) {
|
if (output) {
|
||||||
NSLog(@"%@", output);
|
NSLog(@"%@", output);
|
||||||
}
|
}
|
||||||
@ -1263,7 +1299,7 @@ namespace Example
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// returns all posts
|
// returns all posts
|
||||||
array[inline_response_200_1] result = apiInstance.getPosts();
|
array[inline_response_200_2] result = apiInstance.getPosts();
|
||||||
Debug.WriteLine(result);
|
Debug.WriteLine(result);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@ -1356,7 +1392,7 @@ except ApiException as e:
|
|||||||
"schema" : {
|
"schema" : {
|
||||||
"type" : "array",
|
"type" : "array",
|
||||||
"items" : {
|
"items" : {
|
||||||
"$ref" : "#/components/schemas/inline_response_200_1"
|
"$ref" : "#/components/schemas/inline_response_200_2"
|
||||||
},
|
},
|
||||||
"x-content-type" : "application/json"
|
"x-content-type" : "application/json"
|
||||||
}
|
}
|
||||||
@ -1433,7 +1469,7 @@ except ApiException as e:
|
|||||||
<div class="tab-pane active" id="examples-Everyone-getotheruser-0-curl">
|
<div class="tab-pane active" id="examples-Everyone-getotheruser-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">curl -X GET\
|
<pre class="prettyprint"><code class="language-bsh">curl -X GET\
|
||||||
-H "Accept: application/json"\
|
-H "Accept: application/json"\
|
||||||
"https://ws.zerotwohub.tk:25566/api/getotheruser?user="</code></pre>
|
"https://ws.zerotwohub.tk:25566//api/getotheruser?user="</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="examples-Everyone-getotheruser-0-java">
|
<div class="tab-pane" id="examples-Everyone-getotheruser-0-java">
|
||||||
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
@ -1451,7 +1487,7 @@ public class EveryoneApiExample {
|
|||||||
EveryoneApi apiInstance = new EveryoneApi();
|
EveryoneApi apiInstance = new EveryoneApi();
|
||||||
String user = user_example; // String | pass the username of the user you want to get information on
|
String user = user_example; // String | pass the username of the user you want to get information on
|
||||||
try {
|
try {
|
||||||
inline_response_200 result = apiInstance.getotheruser(user);
|
inline_response_200_1 result = apiInstance.getotheruser(user);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling EveryoneApi#getotheruser");
|
System.err.println("Exception when calling EveryoneApi#getotheruser");
|
||||||
@ -1470,7 +1506,7 @@ public class EveryoneApiExample {
|
|||||||
EveryoneApi apiInstance = new EveryoneApi();
|
EveryoneApi apiInstance = new EveryoneApi();
|
||||||
String user = user_example; // String | pass the username of the user you want to get information on
|
String user = user_example; // String | pass the username of the user you want to get information on
|
||||||
try {
|
try {
|
||||||
inline_response_200 result = apiInstance.getotheruser(user);
|
inline_response_200_1 result = apiInstance.getotheruser(user);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling EveryoneApi#getotheruser");
|
System.err.println("Exception when calling EveryoneApi#getotheruser");
|
||||||
@ -1490,7 +1526,7 @@ EveryoneApi *apiInstance = [[EveryoneApi alloc] init];
|
|||||||
|
|
||||||
// returns information about any user
|
// returns information about any user
|
||||||
[apiInstance getotheruserWith:user
|
[apiInstance getotheruserWith:user
|
||||||
completionHandler: ^(inline_response_200 output, NSError* error) {
|
completionHandler: ^(inline_response_200_1 output, NSError* error) {
|
||||||
if (output) {
|
if (output) {
|
||||||
NSLog(@"%@", output);
|
NSLog(@"%@", output);
|
||||||
}
|
}
|
||||||
@ -1541,7 +1577,7 @@ namespace Example
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// returns information about any user
|
// returns information about any user
|
||||||
inline_response_200 result = apiInstance.getotheruser(user);
|
inline_response_200_1 result = apiInstance.getotheruser(user);
|
||||||
Debug.WriteLine(result);
|
Debug.WriteLine(result);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@ -1664,7 +1700,7 @@ except ApiException as e:
|
|||||||
"content" : {
|
"content" : {
|
||||||
"application/json" : {
|
"application/json" : {
|
||||||
"schema" : {
|
"schema" : {
|
||||||
"$ref" : "#/components/schemas/inline_response_200"
|
"$ref" : "#/components/schemas/inline_response_200_1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1739,7 +1775,7 @@ except ApiException as e:
|
|||||||
<div class="tab-pane active" id="examples-Everyone-getuser-0-curl">
|
<div class="tab-pane active" id="examples-Everyone-getuser-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">curl -X GET\
|
<pre class="prettyprint"><code class="language-bsh">curl -X GET\
|
||||||
-H "Accept: application/json"\
|
-H "Accept: application/json"\
|
||||||
"https://ws.zerotwohub.tk:25566/api/getuser"</code></pre>
|
"https://ws.zerotwohub.tk:25566//api/getuser"</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="examples-Everyone-getuser-0-java">
|
<div class="tab-pane" id="examples-Everyone-getuser-0-java">
|
||||||
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
@ -1756,7 +1792,7 @@ public class EveryoneApiExample {
|
|||||||
|
|
||||||
EveryoneApi apiInstance = new EveryoneApi();
|
EveryoneApi apiInstance = new EveryoneApi();
|
||||||
try {
|
try {
|
||||||
inline_response_200 result = apiInstance.getuser();
|
inline_response_200_1 result = apiInstance.getuser();
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling EveryoneApi#getuser");
|
System.err.println("Exception when calling EveryoneApi#getuser");
|
||||||
@ -1774,7 +1810,7 @@ public class EveryoneApiExample {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
EveryoneApi apiInstance = new EveryoneApi();
|
EveryoneApi apiInstance = new EveryoneApi();
|
||||||
try {
|
try {
|
||||||
inline_response_200 result = apiInstance.getuser();
|
inline_response_200_1 result = apiInstance.getuser();
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling EveryoneApi#getuser");
|
System.err.println("Exception when calling EveryoneApi#getuser");
|
||||||
@ -1793,7 +1829,7 @@ EveryoneApi *apiInstance = [[EveryoneApi alloc] init];
|
|||||||
|
|
||||||
// returns current user information
|
// returns current user information
|
||||||
[apiInstance getuserWithCompletionHandler:
|
[apiInstance getuserWithCompletionHandler:
|
||||||
^(inline_response_200 output, NSError* error) {
|
^(inline_response_200_1 output, NSError* error) {
|
||||||
if (output) {
|
if (output) {
|
||||||
NSLog(@"%@", output);
|
NSLog(@"%@", output);
|
||||||
}
|
}
|
||||||
@ -1841,7 +1877,7 @@ namespace Example
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// returns current user information
|
// returns current user information
|
||||||
inline_response_200 result = apiInstance.getuser();
|
inline_response_200_1 result = apiInstance.getuser();
|
||||||
Debug.WriteLine(result);
|
Debug.WriteLine(result);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@ -1931,7 +1967,7 @@ except ApiException as e:
|
|||||||
"content" : {
|
"content" : {
|
||||||
"application/json" : {
|
"application/json" : {
|
||||||
"schema" : {
|
"schema" : {
|
||||||
"$ref" : "#/components/schemas/inline_response_200"
|
"$ref" : "#/components/schemas/inline_response_200_1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2005,7 +2041,7 @@ except ApiException as e:
|
|||||||
<div class="tab-pane active" id="examples-Everyone-login-0-curl">
|
<div class="tab-pane active" id="examples-Everyone-login-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
||||||
-H "Content-Type: application/json"\
|
-H "Content-Type: application/json"\
|
||||||
"https://ws.zerotwohub.tk:25566/login"</code></pre>
|
"https://ws.zerotwohub.tk:25566//login"</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="examples-Everyone-login-0-java">
|
<div class="tab-pane" id="examples-Everyone-login-0-java">
|
||||||
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
@ -2275,7 +2311,7 @@ except ApiException as e:
|
|||||||
<div class="tab-pane active" id="examples-Everyone-post-0-curl">
|
<div class="tab-pane active" id="examples-Everyone-post-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
||||||
-H "Content-Type: application/json"\
|
-H "Content-Type: application/json"\
|
||||||
"https://ws.zerotwohub.tk:25566/api/post"</code></pre>
|
"https://ws.zerotwohub.tk:25566//api/post"</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="examples-Everyone-post-0-java">
|
<div class="tab-pane" id="examples-Everyone-post-0-java">
|
||||||
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
@ -2545,7 +2581,7 @@ except ApiException as e:
|
|||||||
<div class="tab-pane active" id="examples-Everyone-register-0-curl">
|
<div class="tab-pane active" id="examples-Everyone-register-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
||||||
-H "Content-Type: application/json"\
|
-H "Content-Type: application/json"\
|
||||||
"https://ws.zerotwohub.tk:25566/register"</code></pre>
|
"https://ws.zerotwohub.tk:25566//register"</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="examples-Everyone-register-0-java">
|
<div class="tab-pane" id="examples-Everyone-register-0-java">
|
||||||
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
@ -2780,6 +2816,346 @@ except ApiException as e:
|
|||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
<div id="api-Everyone-search">
|
||||||
|
<article id="api-Everyone-search-0" data-group="User" data-name="search" data-version="0">
|
||||||
|
<div class="pull-left">
|
||||||
|
<h1>search</h1>
|
||||||
|
<p>returns information about the searched term</p>
|
||||||
|
</div>
|
||||||
|
<div class="pull-right"></div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<p></p>
|
||||||
|
<p class="marked">When a valid cookie is set, the API will return the search result
|
||||||
|
</p>
|
||||||
|
<p></p>
|
||||||
|
<br />
|
||||||
|
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/api/search</span></code></pre>
|
||||||
|
<p>
|
||||||
|
<h3>Usage and SDK Samples</h3>
|
||||||
|
</p>
|
||||||
|
<ul class="nav nav-tabs nav-tabs-examples">
|
||||||
|
<li class="active"><a href="#examples-Everyone-search-0-curl">Curl</a></li>
|
||||||
|
<li class=""><a href="#examples-Everyone-search-0-java">Java</a></li>
|
||||||
|
<li class=""><a href="#examples-Everyone-search-0-android">Android</a></li>
|
||||||
|
<!--<li class=""><a href="#examples-Everyone-search-0-groovy">Groovy</a></li>-->
|
||||||
|
<li class=""><a href="#examples-Everyone-search-0-objc">Obj-C</a></li>
|
||||||
|
<li class=""><a href="#examples-Everyone-search-0-javascript">JavaScript</a></li>
|
||||||
|
<!--<li class=""><a href="#examples-Everyone-search-0-angular">Angular</a></li>-->
|
||||||
|
<li class=""><a href="#examples-Everyone-search-0-csharp">C#</a></li>
|
||||||
|
<li class=""><a href="#examples-Everyone-search-0-php">PHP</a></li>
|
||||||
|
<li class=""><a href="#examples-Everyone-search-0-perl">Perl</a></li>
|
||||||
|
<li class=""><a href="#examples-Everyone-search-0-python">Python</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="tab-content">
|
||||||
|
<div class="tab-pane active" id="examples-Everyone-search-0-curl">
|
||||||
|
<pre class="prettyprint"><code class="language-bsh">curl -X GET\
|
||||||
|
-H "Accept: application/json"\
|
||||||
|
"https://ws.zerotwohub.tk:25566//api/search?type=&selector="</code></pre>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-java">
|
||||||
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
|
import io.swagger.client.auth.*;
|
||||||
|
import io.swagger.client.model.*;
|
||||||
|
import io.swagger.client.api.EveryoneApi;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class EveryoneApiExample {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
EveryoneApi apiInstance = new EveryoneApi();
|
||||||
|
String type = type_example; // String | what to search for ("user" or "post")
|
||||||
|
String selector = selector_example; // String | what term to search for
|
||||||
|
try {
|
||||||
|
array[inline_response_200] result = apiInstance.search(type, selector);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling EveryoneApi#search");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-android">
|
||||||
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.api.EveryoneApi;
|
||||||
|
|
||||||
|
public class EveryoneApiExample {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
EveryoneApi apiInstance = new EveryoneApi();
|
||||||
|
String type = type_example; // String | what to search for ("user" or "post")
|
||||||
|
String selector = selector_example; // String | what term to search for
|
||||||
|
try {
|
||||||
|
array[inline_response_200] result = apiInstance.search(type, selector);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling EveryoneApi#search");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}</code></pre>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-groovy">
|
||||||
|
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
|
||||||
|
</div> -->
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-objc">
|
||||||
|
<pre class="prettyprint"><code class="language-cpp">String *type = type_example; // what to search for ("user" or "post")
|
||||||
|
String *selector = selector_example; // what term to search for
|
||||||
|
|
||||||
|
EveryoneApi *apiInstance = [[EveryoneApi alloc] init];
|
||||||
|
|
||||||
|
// returns information about the searched term
|
||||||
|
[apiInstance searchWith:type
|
||||||
|
selector:selector
|
||||||
|
completionHandler: ^(array[inline_response_200] output, NSError* error) {
|
||||||
|
if (output) {
|
||||||
|
NSLog(@"%@", output);
|
||||||
|
}
|
||||||
|
if (error) {
|
||||||
|
NSLog(@"Error: %@", error);
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-javascript">
|
||||||
|
<pre class="prettyprint"><code class="language-js">var SimplePostsaccountApi = require('simple_postsaccount_api');
|
||||||
|
|
||||||
|
var api = new SimplePostsaccountApi.EveryoneApi()
|
||||||
|
var type = type_example; // {{String}} what to search for ("user" or "post")
|
||||||
|
var selector = selector_example; // {{String}} what term to search for
|
||||||
|
|
||||||
|
var callback = function(error, data, response) {
|
||||||
|
if (error) {
|
||||||
|
console.error(error);
|
||||||
|
} else {
|
||||||
|
console.log('API called successfully. Returned data: ' + data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
api.search(type, selector, callback);
|
||||||
|
</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--<div class="tab-pane" id="examples-Everyone-search-0-angular">
|
||||||
|
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
|
||||||
|
</div>-->
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-csharp">
|
||||||
|
<pre class="prettyprint"><code class="language-cs">using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using IO.Swagger.Api;
|
||||||
|
using IO.Swagger.Client;
|
||||||
|
using IO.Swagger.Model;
|
||||||
|
|
||||||
|
namespace Example
|
||||||
|
{
|
||||||
|
public class searchExample
|
||||||
|
{
|
||||||
|
public void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
var apiInstance = new EveryoneApi();
|
||||||
|
var type = type_example; // String | what to search for ("user" or "post")
|
||||||
|
var selector = selector_example; // String | what term to search for
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// returns information about the searched term
|
||||||
|
array[inline_response_200] result = apiInstance.search(type, selector);
|
||||||
|
Debug.WriteLine(result);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Print("Exception when calling EveryoneApi.search: " + e.Message );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-php">
|
||||||
|
<pre class="prettyprint"><code class="language-php"><?php
|
||||||
|
require_once(__DIR__ . '/vendor/autoload.php');
|
||||||
|
|
||||||
|
$api_instance = new Swagger\Client\ApiEveryoneApi();
|
||||||
|
$type = type_example; // String | what to search for ("user" or "post")
|
||||||
|
$selector = selector_example; // String | what term to search for
|
||||||
|
|
||||||
|
try {
|
||||||
|
$result = $api_instance->search($type, $selector);
|
||||||
|
print_r($result);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo 'Exception when calling EveryoneApi->search: ', $e->getMessage(), PHP_EOL;
|
||||||
|
}
|
||||||
|
?></code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-perl">
|
||||||
|
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
|
||||||
|
use WWW::SwaggerClient::Configuration;
|
||||||
|
use WWW::SwaggerClient::EveryoneApi;
|
||||||
|
|
||||||
|
my $api_instance = WWW::SwaggerClient::EveryoneApi->new();
|
||||||
|
my $type = type_example; # String | what to search for ("user" or "post")
|
||||||
|
my $selector = selector_example; # String | what term to search for
|
||||||
|
|
||||||
|
eval {
|
||||||
|
my $result = $api_instance->search(type => $type, selector => $selector);
|
||||||
|
print Dumper($result);
|
||||||
|
};
|
||||||
|
if ($@) {
|
||||||
|
warn "Exception when calling EveryoneApi->search: $@\n";
|
||||||
|
}</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane" id="examples-Everyone-search-0-python">
|
||||||
|
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
|
||||||
|
import time
|
||||||
|
import swagger_client
|
||||||
|
from swagger_client.rest import ApiException
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# create an instance of the API class
|
||||||
|
api_instance = swagger_client.EveryoneApi()
|
||||||
|
type = type_example # String | what to search for ("user" or "post")
|
||||||
|
selector = selector_example # String | what term to search for
|
||||||
|
|
||||||
|
try:
|
||||||
|
# returns information about the searched term
|
||||||
|
api_response = api_instance.search(type, selector)
|
||||||
|
pprint(api_response)
|
||||||
|
except ApiException as e:
|
||||||
|
print("Exception when calling EveryoneApi->search: %s\n" % e)</code></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Parameters</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methodsubtabletitle">Query parameters</div>
|
||||||
|
<table id="methodsubtable">
|
||||||
|
<tr>
|
||||||
|
<th width="150px">Name</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td style="width:150px;">type*</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="d2e199_search_type">
|
||||||
|
<div class="json-schema-view">
|
||||||
|
<div class="primitive">
|
||||||
|
<span class="type">
|
||||||
|
String
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="inner description">
|
||||||
|
what to search for ("user" or "post")
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inner required">
|
||||||
|
Required
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td style="width:150px;">selector*</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="d2e199_search_selector">
|
||||||
|
<div class="json-schema-view">
|
||||||
|
<div class="primitive">
|
||||||
|
<span class="type">
|
||||||
|
String
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="inner description">
|
||||||
|
what term to search for
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inner required">
|
||||||
|
Required
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h2>Responses</h2>
|
||||||
|
<h3> Status: 200 - successfully got information </h3>
|
||||||
|
|
||||||
|
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||||
|
<li class="active">
|
||||||
|
<a data-toggle="tab" href="#responses-search-200-schema">Schema</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||||
|
<div class="tab-pane active" id="responses-search-200-schema">
|
||||||
|
<div id='responses-search-200-schema-200' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
var schemaWrapper = {
|
||||||
|
"description" : "successfully got information",
|
||||||
|
"content" : {
|
||||||
|
"application/json" : {
|
||||||
|
"schema" : {
|
||||||
|
"type" : "array",
|
||||||
|
"items" : {
|
||||||
|
"$ref" : "#/components/schemas/inline_response_200"
|
||||||
|
},
|
||||||
|
"x-content-type" : "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var schema = schemaWrapper.content["application/json"].schema;
|
||||||
|
if (schema.$ref != null) {
|
||||||
|
schema = defsParser.$refs.get(schema.$ref);
|
||||||
|
} else {
|
||||||
|
schemaWrapper.components = {};
|
||||||
|
schemaWrapper.components.schemas = Object.assign({}, defs);
|
||||||
|
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(JSON.stringify(schema));
|
||||||
|
var view = new JSONSchemaView(schema, 3);
|
||||||
|
$('#responses-search-200-schema-data').val(stringify(schema));
|
||||||
|
var result = $('#responses-search-200-schema-200');
|
||||||
|
result.empty();
|
||||||
|
result.append(view.render());
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<input id='responses-search-200-schema-data' type='hidden' value=''></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3> Status: 400 - no or bad login cookie </h3>
|
||||||
|
|
||||||
|
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
<div id="api-Everyone-setBio">
|
<div id="api-Everyone-setBio">
|
||||||
<article id="api-Everyone-setBio-0" data-group="User" data-name="setBio" data-version="0">
|
<article id="api-Everyone-setBio-0" data-group="User" data-name="setBio" data-version="0">
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
@ -2814,7 +3190,7 @@ except ApiException as e:
|
|||||||
<div class="tab-pane active" id="examples-Everyone-setBio-0-curl">
|
<div class="tab-pane active" id="examples-Everyone-setBio-0-curl">
|
||||||
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
<pre class="prettyprint"><code class="language-bsh">curl -X POST\
|
||||||
-H "Content-Type: application/json"\
|
-H "Content-Type: application/json"\
|
||||||
"https://ws.zerotwohub.tk:25566/api/setBio"</code></pre>
|
"https://ws.zerotwohub.tk:25566//api/setBio"</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="examples-Everyone-setBio-0-java">
|
<div class="tab-pane" id="examples-Everyone-setBio-0-java">
|
||||||
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
<pre class="prettyprint"><code class="language-java">import io.swagger.client.*;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user