OpenAPI definition

AjaxRestController

getFollowedUsersPosts

Load more posts from followed-users


/api/ajax/followed-users/posts

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8443/api/ajax/followed-users/posts?page=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AjaxRestControllerApi;

import java.io.File;
import java.util.*;

public class AjaxRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AjaxRestControllerApi apiInstance = new AjaxRestControllerApi();
        Integer page = 56; // Integer | 

        try {
            array[Post] result = apiInstance.getFollowedUsersPosts(page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AjaxRestControllerApi#getFollowedUsersPosts");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AjaxRestControllerApi;

public class AjaxRestControllerApiExample {
    public static void main(String[] args) {
        AjaxRestControllerApi apiInstance = new AjaxRestControllerApi();
        Integer page = 56; // Integer | 

        try {
            array[Post] result = apiInstance.getFollowedUsersPosts(page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AjaxRestControllerApi#getFollowedUsersPosts");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AjaxRestControllerApi *apiInstance = [[AjaxRestControllerApi alloc] init];
Integer *page = 56; //  (default to null)

// Load more posts from followed-users
[apiInstance getFollowedUsersPostsWith:page
              completionHandler: ^(array[Post] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.AjaxRestControllerApi()
var page = 56; // {Integer} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFollowedUsersPosts(page, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getFollowedUsersPostsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AjaxRestControllerApi();
            var page = 56;  // Integer |  (default to null)

            try {
                // Load more posts from followed-users
                array[Post] result = apiInstance.getFollowedUsersPosts(page);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AjaxRestControllerApi.getFollowedUsersPosts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AjaxRestControllerApi();
$page = 56; // Integer | 

try {
    $result = $api_instance->getFollowedUsersPosts($page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AjaxRestControllerApi->getFollowedUsersPosts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AjaxRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AjaxRestControllerApi->new();
my $page = 56; # Integer | 

eval {
    my $result = $api_instance->getFollowedUsersPosts(page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AjaxRestControllerApi->getFollowedUsersPosts: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AjaxRestControllerApi()
page = 56 # Integer |  (default to null)

try:
    # Load more posts from followed-users
    api_response = api_instance.get_followed_users_posts(page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AjaxRestControllerApi->getFollowedUsersPosts: %s\n" % e)
extern crate AjaxRestControllerApi;

pub fn main() {
    let page = 56; // Integer

    let mut context = AjaxRestControllerApi::Context::default();
    let result = client.getFollowedUsersPosts(page, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
page*
Integer (int32)
Required

Responses


getNewPosts

Load more posts


/api/ajax/posts

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8443/api/ajax/posts?page=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AjaxRestControllerApi;

import java.io.File;
import java.util.*;

public class AjaxRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AjaxRestControllerApi apiInstance = new AjaxRestControllerApi();
        Integer page = 56; // Integer | 

        try {
            array[Post] result = apiInstance.getNewPosts(page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AjaxRestControllerApi#getNewPosts");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AjaxRestControllerApi;

public class AjaxRestControllerApiExample {
    public static void main(String[] args) {
        AjaxRestControllerApi apiInstance = new AjaxRestControllerApi();
        Integer page = 56; // Integer | 

        try {
            array[Post] result = apiInstance.getNewPosts(page);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AjaxRestControllerApi#getNewPosts");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AjaxRestControllerApi *apiInstance = [[AjaxRestControllerApi alloc] init];
Integer *page = 56; //  (default to null)

// Load more posts
[apiInstance getNewPostsWith:page
              completionHandler: ^(array[Post] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.AjaxRestControllerApi()
var page = 56; // {Integer} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNewPosts(page, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getNewPostsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AjaxRestControllerApi();
            var page = 56;  // Integer |  (default to null)

            try {
                // Load more posts
                array[Post] result = apiInstance.getNewPosts(page);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AjaxRestControllerApi.getNewPosts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AjaxRestControllerApi();
$page = 56; // Integer | 

try {
    $result = $api_instance->getNewPosts($page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AjaxRestControllerApi->getNewPosts: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AjaxRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AjaxRestControllerApi->new();
my $page = 56; # Integer | 

eval {
    my $result = $api_instance->getNewPosts(page => $page);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AjaxRestControllerApi->getNewPosts: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AjaxRestControllerApi()
page = 56 # Integer |  (default to null)

try:
    # Load more posts
    api_response = api_instance.get_new_posts(page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AjaxRestControllerApi->getNewPosts: %s\n" % e)
extern crate AjaxRestControllerApi;

pub fn main() {
    let page = 56; // Integer

    let mut context = AjaxRestControllerApi::Context::default();
    let result = client.getNewPosts(page, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
page*
Integer (int32)
Required

Responses


AuthRestController

logOut

Sign-out user


/api/auth/sign-out

Usage and SDK Samples

curl -X POST \
 -H "Accept: */*" \
 "http://localhost:8443/api/auth/sign-out"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AuthRestControllerApi;

import java.io.File;
import java.util.*;

public class AuthRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AuthRestControllerApi apiInstance = new AuthRestControllerApi();

        try {
            AuthResponse result = apiInstance.logOut();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthRestControllerApi#logOut");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AuthRestControllerApi;

public class AuthRestControllerApiExample {
    public static void main(String[] args) {
        AuthRestControllerApi apiInstance = new AuthRestControllerApi();

        try {
            AuthResponse result = apiInstance.logOut();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthRestControllerApi#logOut");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AuthRestControllerApi *apiInstance = [[AuthRestControllerApi alloc] init];

// Sign-out user
[apiInstance logOutWithCompletionHandler: 
              ^(AuthResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.AuthRestControllerApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.logOut(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class logOutExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AuthRestControllerApi();

            try {
                // Sign-out user
                AuthResponse result = apiInstance.logOut();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AuthRestControllerApi.logOut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AuthRestControllerApi();

try {
    $result = $api_instance->logOut();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthRestControllerApi->logOut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AuthRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AuthRestControllerApi->new();

eval {
    my $result = $api_instance->logOut();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AuthRestControllerApi->logOut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AuthRestControllerApi()

try:
    # Sign-out user
    api_response = api_instance.log_out()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthRestControllerApi->logOut: %s\n" % e)
extern crate AuthRestControllerApi;

pub fn main() {

    let mut context = AuthRestControllerApi::Context::default();
    let result = client.logOut(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


login

Sign-in user with credentials


/api/auth/sign-in

Usage and SDK Samples

curl -X POST \
 -H "Accept: */*" \
 -H "Content-Type: application/json" \
 "http://localhost:8443/api/auth/sign-in" \
 -d '{
  "password" : "password",
  "username" : "username"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AuthRestControllerApi;

import java.io.File;
import java.util.*;

public class AuthRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AuthRestControllerApi apiInstance = new AuthRestControllerApi();
        LoginRequest loginRequest = ; // LoginRequest | 
        String accessToken = accessToken_example; // String | 
        String refreshToken = refreshToken_example; // String | 

        try {
            AuthResponse result = apiInstance.login(loginRequest, accessToken, refreshToken);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthRestControllerApi#login");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.AuthRestControllerApi;

public class AuthRestControllerApiExample {
    public static void main(String[] args) {
        AuthRestControllerApi apiInstance = new AuthRestControllerApi();
        LoginRequest loginRequest = ; // LoginRequest | 
        String accessToken = accessToken_example; // String | 
        String refreshToken = refreshToken_example; // String | 

        try {
            AuthResponse result = apiInstance.login(loginRequest, accessToken, refreshToken);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthRestControllerApi#login");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AuthRestControllerApi *apiInstance = [[AuthRestControllerApi alloc] init];
LoginRequest *loginRequest = ; // 
String *accessToken = accessToken_example; //  (optional) (default to null)
String *refreshToken = refreshToken_example; //  (optional) (default to null)

// Sign-in user with credentials
[apiInstance loginWith:loginRequest
    accessToken:accessToken
    refreshToken:refreshToken
              completionHandler: ^(AuthResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.AuthRestControllerApi()
var loginRequest = ; // {LoginRequest} 
var opts = {
  'accessToken': accessToken_example, // {String} 
  'refreshToken': refreshToken_example // {String} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.login(loginRequest, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class loginExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AuthRestControllerApi();
            var loginRequest = new LoginRequest(); // LoginRequest | 
            var accessToken = accessToken_example;  // String |  (optional)  (default to null)
            var refreshToken = refreshToken_example;  // String |  (optional)  (default to null)

            try {
                // Sign-in user with credentials
                AuthResponse result = apiInstance.login(loginRequest, accessToken, refreshToken);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AuthRestControllerApi.login: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AuthRestControllerApi();
$loginRequest = ; // LoginRequest | 
$accessToken = accessToken_example; // String | 
$refreshToken = refreshToken_example; // String | 

try {
    $result = $api_instance->login($loginRequest, $accessToken, $refreshToken);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthRestControllerApi->login: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AuthRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AuthRestControllerApi->new();
my $loginRequest = WWW::OPenAPIClient::Object::LoginRequest->new(); # LoginRequest | 
my $accessToken = accessToken_example; # String | 
my $refreshToken = refreshToken_example; # String | 

eval {
    my $result = $api_instance->login(loginRequest => $loginRequest, accessToken => $accessToken, refreshToken => $refreshToken);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AuthRestControllerApi->login: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AuthRestControllerApi()
loginRequest =  # LoginRequest | 
accessToken = accessToken_example # String |  (optional) (default to null)
refreshToken = refreshToken_example # String |  (optional) (default to null)

try:
    # Sign-in user with credentials
    api_response = api_instance.login(loginRequest, accessToken=accessToken, refreshToken=refreshToken)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthRestControllerApi->login: %s\n" % e)
extern crate AuthRestControllerApi;

pub fn main() {
    let loginRequest = ; // LoginRequest
    let accessToken = accessToken_example; // String
    let refreshToken = refreshToken_example; // String

    let mut context = AuthRestControllerApi::Context::default();
    let result = client.login(loginRequest, accessToken, refreshToken, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
loginRequest *

Responses


CommentRestController

createComment

Delete a comment of a post


/api/comments/{postId}

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8443/api/comments/{postId}" \
 -d '{
  "imagePath" : "imagePath",
  "content" : "content"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommentRestControllerApi;

import java.io.File;
import java.util.*;

public class CommentRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        CommentRestControllerApi apiInstance = new CommentRestControllerApi();
        Long postId = 789; // Long | 
        Data data = ; // Data | 

        try {
            array[Comment] result = apiInstance.createComment(postId, data);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommentRestControllerApi#createComment");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.CommentRestControllerApi;

public class CommentRestControllerApiExample {
    public static void main(String[] args) {
        CommentRestControllerApi apiInstance = new CommentRestControllerApi();
        Long postId = 789; // Long | 
        Data data = ; // Data | 

        try {
            array[Comment] result = apiInstance.createComment(postId, data);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommentRestControllerApi#createComment");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CommentRestControllerApi *apiInstance = [[CommentRestControllerApi alloc] init];
Long *postId = 789; //  (default to null)
Data *data = ; // 

// Delete a comment of a post
[apiInstance createCommentWith:postId
    data:data
              completionHandler: ^(array[Comment] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.CommentRestControllerApi()
var postId = 789; // {Long} 
var data = ; // {Data} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createComment(postId, data, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createCommentExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new CommentRestControllerApi();
            var postId = 789;  // Long |  (default to null)
            var data = new Data(); // Data | 

            try {
                // Delete a comment of a post
                array[Comment] result = apiInstance.createComment(postId, data);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommentRestControllerApi.createComment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommentRestControllerApi();
$postId = 789; // Long | 
$data = ; // Data | 

try {
    $result = $api_instance->createComment($postId, $data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommentRestControllerApi->createComment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommentRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommentRestControllerApi->new();
my $postId = 789; # Long | 
my $data = WWW::OPenAPIClient::Object::Data->new(); # Data | 

eval {
    my $result = $api_instance->createComment(postId => $postId, data => $data);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommentRestControllerApi->createComment: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.CommentRestControllerApi()
postId = 789 # Long |  (default to null)
data =  # Data | 

try:
    # Delete a comment of a post
    api_response = api_instance.create_comment(postId, data)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentRestControllerApi->createComment: %s\n" % e)
extern crate CommentRestControllerApi;

pub fn main() {
    let postId = 789; // Long
    let data = ; // Data

    let mut context = CommentRestControllerApi::Context::default();
    let result = client.createComment(postId, data, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
postId*
Long (int64)
Required
Body parameters
Name Description
data *

Responses


deleteComment

Delete a comment of a post


/api/comments/{postId}/{commentId}

Usage and SDK Samples

curl -X DELETE \
 -H "Accept: application/json" \
 "http://localhost:8443/api/comments/{postId}/{commentId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommentRestControllerApi;

import java.io.File;
import java.util.*;

public class CommentRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        CommentRestControllerApi apiInstance = new CommentRestControllerApi();
        Long postId = 789; // Long | 
        Long commentId = 789; // Long | 

        try {
            array[Comment] result = apiInstance.deleteComment(postId, commentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommentRestControllerApi#deleteComment");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.CommentRestControllerApi;

public class CommentRestControllerApiExample {
    public static void main(String[] args) {
        CommentRestControllerApi apiInstance = new CommentRestControllerApi();
        Long postId = 789; // Long | 
        Long commentId = 789; // Long | 

        try {
            array[Comment] result = apiInstance.deleteComment(postId, commentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommentRestControllerApi#deleteComment");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CommentRestControllerApi *apiInstance = [[CommentRestControllerApi alloc] init];
Long *postId = 789; //  (default to null)
Long *commentId = 789; //  (default to null)

// Delete a comment of a post
[apiInstance deleteCommentWith:postId
    commentId:commentId
              completionHandler: ^(array[Comment] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.CommentRestControllerApi()
var postId = 789; // {Long} 
var commentId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteComment(postId, commentId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteCommentExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new CommentRestControllerApi();
            var postId = 789;  // Long |  (default to null)
            var commentId = 789;  // Long |  (default to null)

            try {
                // Delete a comment of a post
                array[Comment] result = apiInstance.deleteComment(postId, commentId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommentRestControllerApi.deleteComment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommentRestControllerApi();
$postId = 789; // Long | 
$commentId = 789; // Long | 

try {
    $result = $api_instance->deleteComment($postId, $commentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommentRestControllerApi->deleteComment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommentRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommentRestControllerApi->new();
my $postId = 789; # Long | 
my $commentId = 789; # Long | 

eval {
    my $result = $api_instance->deleteComment(postId => $postId, commentId => $commentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommentRestControllerApi->deleteComment: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.CommentRestControllerApi()
postId = 789 # Long |  (default to null)
commentId = 789 # Long |  (default to null)

try:
    # Delete a comment of a post
    api_response = api_instance.delete_comment(postId, commentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentRestControllerApi->deleteComment: %s\n" % e)
extern crate CommentRestControllerApi;

pub fn main() {
    let postId = 789; // Long
    let commentId = 789; // Long

    let mut context = CommentRestControllerApi::Context::default();
    let result = client.deleteComment(postId, commentId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
postId*
Long (int64)
Required
commentId*
Long (int64)
Required

Responses


getPostComments

Get all the comments of a post


/api/comments/post/{postId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8443/api/comments/post/{postId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommentRestControllerApi;

import java.io.File;
import java.util.*;

public class CommentRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        CommentRestControllerApi apiInstance = new CommentRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Comment] result = apiInstance.getPostComments(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommentRestControllerApi#getPostComments");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.CommentRestControllerApi;

public class CommentRestControllerApiExample {
    public static void main(String[] args) {
        CommentRestControllerApi apiInstance = new CommentRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Comment] result = apiInstance.getPostComments(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommentRestControllerApi#getPostComments");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CommentRestControllerApi *apiInstance = [[CommentRestControllerApi alloc] init];
Long *postId = 789; //  (default to null)

// Get all the comments of a post
[apiInstance getPostCommentsWith:postId
              completionHandler: ^(array[Comment] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.CommentRestControllerApi()
var postId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPostComments(postId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getPostCommentsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new CommentRestControllerApi();
            var postId = 789;  // Long |  (default to null)

            try {
                // Get all the comments of a post
                array[Comment] result = apiInstance.getPostComments(postId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommentRestControllerApi.getPostComments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommentRestControllerApi();
$postId = 789; // Long | 

try {
    $result = $api_instance->getPostComments($postId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommentRestControllerApi->getPostComments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommentRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommentRestControllerApi->new();
my $postId = 789; # Long | 

eval {
    my $result = $api_instance->getPostComments(postId => $postId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommentRestControllerApi->getPostComments: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.CommentRestControllerApi()
postId = 789 # Long |  (default to null)

try:
    # Get all the comments of a post
    api_response = api_instance.get_post_comments(postId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentRestControllerApi->getPostComments: %s\n" % e)
extern crate CommentRestControllerApi;

pub fn main() {
    let postId = 789; // Long

    let mut context = CommentRestControllerApi::Context::default();
    let result = client.getPostComments(postId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
postId*
Long (int64)
Required

Responses


getUserComments

Get all the comments of an user


/api/comments/user/{userId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8443/api/comments/user/{userId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommentRestControllerApi;

import java.io.File;
import java.util.*;

public class CommentRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        CommentRestControllerApi apiInstance = new CommentRestControllerApi();
        Long userId = 789; // Long | 

        try {
            array[Comment] result = apiInstance.getUserComments(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommentRestControllerApi#getUserComments");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.CommentRestControllerApi;

public class CommentRestControllerApiExample {
    public static void main(String[] args) {
        CommentRestControllerApi apiInstance = new CommentRestControllerApi();
        Long userId = 789; // Long | 

        try {
            array[Comment] result = apiInstance.getUserComments(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CommentRestControllerApi#getUserComments");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CommentRestControllerApi *apiInstance = [[CommentRestControllerApi alloc] init];
Long *userId = 789; //  (default to null)

// Get all the comments of an user
[apiInstance getUserCommentsWith:userId
              completionHandler: ^(array[Comment] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.CommentRestControllerApi()
var userId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserComments(userId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getUserCommentsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new CommentRestControllerApi();
            var userId = 789;  // Long |  (default to null)

            try {
                // Get all the comments of an user
                array[Comment] result = apiInstance.getUserComments(userId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CommentRestControllerApi.getUserComments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommentRestControllerApi();
$userId = 789; // Long | 

try {
    $result = $api_instance->getUserComments($userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CommentRestControllerApi->getUserComments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommentRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommentRestControllerApi->new();
my $userId = 789; # Long | 

eval {
    my $result = $api_instance->getUserComments(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommentRestControllerApi->getUserComments: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.CommentRestControllerApi()
userId = 789 # Long |  (default to null)

try:
    # Get all the comments of an user
    api_response = api_instance.get_user_comments(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CommentRestControllerApi->getUserComments: %s\n" % e)
extern crate CommentRestControllerApi;

pub fn main() {
    let userId = 789; // Long

    let mut context = CommentRestControllerApi::Context::default();
    let result = client.getUserComments(userId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
userId*
Long (int64)
Required

Responses


PostRestController

createPost

Create new post


/api/posts/

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "http://localhost:8443/api/posts/?post="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PostRestControllerApi;

import java.io.File;
import java.util.*;

public class PostRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Post post = ; // Post | 

        try {
            array[Post] result = apiInstance.createPost(post);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#createPost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.PostRestControllerApi;

public class PostRestControllerApiExample {
    public static void main(String[] args) {
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Post post = ; // Post | 

        try {
            array[Post] result = apiInstance.createPost(post);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#createPost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PostRestControllerApi *apiInstance = [[PostRestControllerApi alloc] init];
Post *post = ; //  (default to null)

// Create new post
[apiInstance createPostWith:post
              completionHandler: ^(array[Post] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.PostRestControllerApi()
var post = ; // {Post} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createPost(post, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createPostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PostRestControllerApi();
            var post = new Post(); // Post |  (default to null)

            try {
                // Create new post
                array[Post] result = apiInstance.createPost(post);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PostRestControllerApi.createPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PostRestControllerApi();
$post = ; // Post | 

try {
    $result = $api_instance->createPost($post);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PostRestControllerApi->createPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PostRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PostRestControllerApi->new();
my $post = ; # Post | 

eval {
    my $result = $api_instance->createPost(post => $post);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PostRestControllerApi->createPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PostRestControllerApi()
post =  # Post |  (default to null)

try:
    # Create new post
    api_response = api_instance.create_post(post)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PostRestControllerApi->createPost: %s\n" % e)
extern crate PostRestControllerApi;

pub fn main() {
    let post = ; // Post

    let mut context = PostRestControllerApi::Context::default();
    let result = client.createPost(post, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
post*
Post
Required

Responses


deletePost

Delete specific post


/api/posts/{postId}

Usage and SDK Samples

curl -X DELETE \
 -H "Accept: application/json" \
 "http://localhost:8443/api/posts/{postId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PostRestControllerApi;

import java.io.File;
import java.util.*;

public class PostRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Post] result = apiInstance.deletePost(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#deletePost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.PostRestControllerApi;

public class PostRestControllerApiExample {
    public static void main(String[] args) {
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Post] result = apiInstance.deletePost(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#deletePost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PostRestControllerApi *apiInstance = [[PostRestControllerApi alloc] init];
Long *postId = 789; //  (default to null)

// Delete specific post
[apiInstance deletePostWith:postId
              completionHandler: ^(array[Post] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.PostRestControllerApi()
var postId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deletePost(postId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deletePostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PostRestControllerApi();
            var postId = 789;  // Long |  (default to null)

            try {
                // Delete specific post
                array[Post] result = apiInstance.deletePost(postId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PostRestControllerApi.deletePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PostRestControllerApi();
$postId = 789; // Long | 

try {
    $result = $api_instance->deletePost($postId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PostRestControllerApi->deletePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PostRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PostRestControllerApi->new();
my $postId = 789; # Long | 

eval {
    my $result = $api_instance->deletePost(postId => $postId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PostRestControllerApi->deletePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PostRestControllerApi()
postId = 789 # Long |  (default to null)

try:
    # Delete specific post
    api_response = api_instance.delete_post(postId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PostRestControllerApi->deletePost: %s\n" % e)
extern crate PostRestControllerApi;

pub fn main() {
    let postId = 789; // Long

    let mut context = PostRestControllerApi::Context::default();
    let result = client.deletePost(postId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
postId*
Long (int64)
Required

Responses


downvotePost

Current user downvote a post


/api/posts/{postId}/downvotes

Usage and SDK Samples

curl -X PUT \
 -H "Accept: application/json" \
 "http://localhost:8443/api/posts/{postId}/downvotes"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PostRestControllerApi;

import java.io.File;
import java.util.*;

public class PostRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Post] result = apiInstance.downvotePost(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#downvotePost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.PostRestControllerApi;

public class PostRestControllerApiExample {
    public static void main(String[] args) {
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Post] result = apiInstance.downvotePost(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#downvotePost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PostRestControllerApi *apiInstance = [[PostRestControllerApi alloc] init];
Long *postId = 789; //  (default to null)

// Current user downvote a post
[apiInstance downvotePostWith:postId
              completionHandler: ^(array[Post] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.PostRestControllerApi()
var postId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.downvotePost(postId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class downvotePostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PostRestControllerApi();
            var postId = 789;  // Long |  (default to null)

            try {
                // Current user downvote a post
                array[Post] result = apiInstance.downvotePost(postId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PostRestControllerApi.downvotePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PostRestControllerApi();
$postId = 789; // Long | 

try {
    $result = $api_instance->downvotePost($postId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PostRestControllerApi->downvotePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PostRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PostRestControllerApi->new();
my $postId = 789; # Long | 

eval {
    my $result = $api_instance->downvotePost(postId => $postId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PostRestControllerApi->downvotePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PostRestControllerApi()
postId = 789 # Long |  (default to null)

try:
    # Current user downvote a post
    api_response = api_instance.downvote_post(postId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PostRestControllerApi->downvotePost: %s\n" % e)
extern crate PostRestControllerApi;

pub fn main() {
    let postId = 789; // Long

    let mut context = PostRestControllerApi::Context::default();
    let result = client.downvotePost(postId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
postId*
Long (int64)
Required

Responses


getPost

Get specific post


/api/posts/{postId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8443/api/posts/{postId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PostRestControllerApi;

import java.io.File;
import java.util.*;

public class PostRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Post] result = apiInstance.getPost(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#getPost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.PostRestControllerApi;

public class PostRestControllerApiExample {
    public static void main(String[] args) {
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Post] result = apiInstance.getPost(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#getPost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PostRestControllerApi *apiInstance = [[PostRestControllerApi alloc] init];
Long *postId = 789; //  (default to null)

// Get specific post
[apiInstance getPostWith:postId
              completionHandler: ^(array[Post] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.PostRestControllerApi()
var postId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPost(postId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getPostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PostRestControllerApi();
            var postId = 789;  // Long |  (default to null)

            try {
                // Get specific post
                array[Post] result = apiInstance.getPost(postId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PostRestControllerApi.getPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PostRestControllerApi();
$postId = 789; // Long | 

try {
    $result = $api_instance->getPost($postId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PostRestControllerApi->getPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PostRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PostRestControllerApi->new();
my $postId = 789; # Long | 

eval {
    my $result = $api_instance->getPost(postId => $postId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PostRestControllerApi->getPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PostRestControllerApi()
postId = 789 # Long |  (default to null)

try:
    # Get specific post
    api_response = api_instance.get_post(postId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PostRestControllerApi->getPost: %s\n" % e)
extern crate PostRestControllerApi;

pub fn main() {
    let postId = 789; // Long

    let mut context = PostRestControllerApi::Context::default();
    let result = client.getPost(postId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
postId*
Long (int64)
Required

Responses


upvotePost

Current user upvote a post


/api/posts/{postId}/upvotes

Usage and SDK Samples

curl -X PUT \
 -H "Accept: application/json" \
 "http://localhost:8443/api/posts/{postId}/upvotes"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PostRestControllerApi;

import java.io.File;
import java.util.*;

public class PostRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Post] result = apiInstance.upvotePost(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#upvotePost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.PostRestControllerApi;

public class PostRestControllerApiExample {
    public static void main(String[] args) {
        PostRestControllerApi apiInstance = new PostRestControllerApi();
        Long postId = 789; // Long | 

        try {
            array[Post] result = apiInstance.upvotePost(postId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PostRestControllerApi#upvotePost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PostRestControllerApi *apiInstance = [[PostRestControllerApi alloc] init];
Long *postId = 789; //  (default to null)

// Current user upvote a post
[apiInstance upvotePostWith:postId
              completionHandler: ^(array[Post] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.PostRestControllerApi()
var postId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.upvotePost(postId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class upvotePostExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PostRestControllerApi();
            var postId = 789;  // Long |  (default to null)

            try {
                // Current user upvote a post
                array[Post] result = apiInstance.upvotePost(postId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PostRestControllerApi.upvotePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PostRestControllerApi();
$postId = 789; // Long | 

try {
    $result = $api_instance->upvotePost($postId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PostRestControllerApi->upvotePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PostRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PostRestControllerApi->new();
my $postId = 789; # Long | 

eval {
    my $result = $api_instance->upvotePost(postId => $postId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PostRestControllerApi->upvotePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PostRestControllerApi()
postId = 789 # Long |  (default to null)

try:
    # Current user upvote a post
    api_response = api_instance.upvote_post(postId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PostRestControllerApi->upvotePost: %s\n" % e)
extern crate PostRestControllerApi;

pub fn main() {
    let postId = 789; // Long

    let mut context = PostRestControllerApi::Context::default();
    let result = client.upvotePost(postId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
postId*
Long (int64)
Required

Responses


TopicRestController

createTopic

Create topic


/api/topics/

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "http://localhost:8443/api/topics/?topic="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicRestControllerApi;

import java.io.File;
import java.util.*;

public class TopicRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        TopicRestControllerApi apiInstance = new TopicRestControllerApi();
        Topic topic = ; // Topic | 

        try {
            array[Topic] result = apiInstance.createTopic(topic);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicRestControllerApi#createTopic");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.TopicRestControllerApi;

public class TopicRestControllerApiExample {
    public static void main(String[] args) {
        TopicRestControllerApi apiInstance = new TopicRestControllerApi();
        Topic topic = ; // Topic | 

        try {
            array[Topic] result = apiInstance.createTopic(topic);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicRestControllerApi#createTopic");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
TopicRestControllerApi *apiInstance = [[TopicRestControllerApi alloc] init];
Topic *topic = ; //  (default to null)

// Create topic
[apiInstance createTopicWith:topic
              completionHandler: ^(array[Topic] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.TopicRestControllerApi()
var topic = ; // {Topic} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createTopic(topic, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createTopicExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new TopicRestControllerApi();
            var topic = new Topic(); // Topic |  (default to null)

            try {
                // Create topic
                array[Topic] result = apiInstance.createTopic(topic);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicRestControllerApi.createTopic: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicRestControllerApi();
$topic = ; // Topic | 

try {
    $result = $api_instance->createTopic($topic);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicRestControllerApi->createTopic: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicRestControllerApi->new();
my $topic = ; # Topic | 

eval {
    my $result = $api_instance->createTopic(topic => $topic);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicRestControllerApi->createTopic: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.TopicRestControllerApi()
topic =  # Topic |  (default to null)

try:
    # Create topic
    api_response = api_instance.create_topic(topic)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicRestControllerApi->createTopic: %s\n" % e)
extern crate TopicRestControllerApi;

pub fn main() {
    let topic = ; // Topic

    let mut context = TopicRestControllerApi::Context::default();
    let result = client.createTopic(topic, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
topic*
Topic
Required

Responses


deleteTopic

Delete specific topic


/api/topics/{topicId}

Usage and SDK Samples

curl -X DELETE \
 -H "Accept: application/json" \
 "http://localhost:8443/api/topics/{topicId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicRestControllerApi;

import java.io.File;
import java.util.*;

public class TopicRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        TopicRestControllerApi apiInstance = new TopicRestControllerApi();
        Long topicId = 789; // Long | 

        try {
            array[Topic] result = apiInstance.deleteTopic(topicId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicRestControllerApi#deleteTopic");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.TopicRestControllerApi;

public class TopicRestControllerApiExample {
    public static void main(String[] args) {
        TopicRestControllerApi apiInstance = new TopicRestControllerApi();
        Long topicId = 789; // Long | 

        try {
            array[Topic] result = apiInstance.deleteTopic(topicId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicRestControllerApi#deleteTopic");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
TopicRestControllerApi *apiInstance = [[TopicRestControllerApi alloc] init];
Long *topicId = 789; //  (default to null)

// Delete specific topic
[apiInstance deleteTopicWith:topicId
              completionHandler: ^(array[Topic] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.TopicRestControllerApi()
var topicId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteTopic(topicId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteTopicExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new TopicRestControllerApi();
            var topicId = 789;  // Long |  (default to null)

            try {
                // Delete specific topic
                array[Topic] result = apiInstance.deleteTopic(topicId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicRestControllerApi.deleteTopic: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicRestControllerApi();
$topicId = 789; // Long | 

try {
    $result = $api_instance->deleteTopic($topicId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicRestControllerApi->deleteTopic: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicRestControllerApi->new();
my $topicId = 789; # Long | 

eval {
    my $result = $api_instance->deleteTopic(topicId => $topicId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicRestControllerApi->deleteTopic: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.TopicRestControllerApi()
topicId = 789 # Long |  (default to null)

try:
    # Delete specific topic
    api_response = api_instance.delete_topic(topicId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicRestControllerApi->deleteTopic: %s\n" % e)
extern crate TopicRestControllerApi;

pub fn main() {
    let topicId = 789; // Long

    let mut context = TopicRestControllerApi::Context::default();
    let result = client.deleteTopic(topicId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
topicId*
Long (int64)
Required

Responses


getTopic

Get specific topic


/api/topics/{topicId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8443/api/topics/{topicId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.TopicRestControllerApi;

import java.io.File;
import java.util.*;

public class TopicRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        TopicRestControllerApi apiInstance = new TopicRestControllerApi();
        Long topicId = 789; // Long | 

        try {
            array[Topic] result = apiInstance.getTopic(topicId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicRestControllerApi#getTopic");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.TopicRestControllerApi;

public class TopicRestControllerApiExample {
    public static void main(String[] args) {
        TopicRestControllerApi apiInstance = new TopicRestControllerApi();
        Long topicId = 789; // Long | 

        try {
            array[Topic] result = apiInstance.getTopic(topicId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TopicRestControllerApi#getTopic");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
TopicRestControllerApi *apiInstance = [[TopicRestControllerApi alloc] init];
Long *topicId = 789; //  (default to null)

// Get specific topic
[apiInstance getTopicWith:topicId
              completionHandler: ^(array[Topic] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.TopicRestControllerApi()
var topicId = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTopic(topicId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getTopicExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new TopicRestControllerApi();
            var topicId = 789;  // Long |  (default to null)

            try {
                // Get specific topic
                array[Topic] result = apiInstance.getTopic(topicId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling TopicRestControllerApi.getTopic: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\TopicRestControllerApi();
$topicId = 789; // Long | 

try {
    $result = $api_instance->getTopic($topicId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TopicRestControllerApi->getTopic: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::TopicRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::TopicRestControllerApi->new();
my $topicId = 789; # Long | 

eval {
    my $result = $api_instance->getTopic(topicId => $topicId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TopicRestControllerApi->getTopic: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.TopicRestControllerApi()
topicId = 789 # Long |  (default to null)

try:
    # Get specific topic
    api_response = api_instance.get_topic(topicId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TopicRestControllerApi->getTopic: %s\n" % e)
extern crate TopicRestControllerApi;

pub fn main() {
    let topicId = 789; // Long

    let mut context = TopicRestControllerApi::Context::default();
    let result = client.getTopic(topicId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
topicId*
Long (int64)
Required

Responses


UserRestController

banUser

(Admin) Ban/unban user by its id


/api/users/{id}

Usage and SDK Samples

curl -X PUT \
 -H "Accept: application/json" \
 "http://localhost:8443/api/users/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserRestControllerApi;

import java.io.File;
import java.util.*;

public class UserRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        UserRestControllerApi apiInstance = new UserRestControllerApi();
        Long id = 789; // Long | 

        try {
            User result = apiInstance.banUser(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserRestControllerApi#banUser");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.UserRestControllerApi;

public class UserRestControllerApiExample {
    public static void main(String[] args) {
        UserRestControllerApi apiInstance = new UserRestControllerApi();
        Long id = 789; // Long | 

        try {
            User result = apiInstance.banUser(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserRestControllerApi#banUser");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
UserRestControllerApi *apiInstance = [[UserRestControllerApi alloc] init];
Long *id = 789; //  (default to null)

// (Admin) Ban/unban user by its id
[apiInstance banUserWith:id
              completionHandler: ^(User output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.UserRestControllerApi()
var id = 789; // {Long} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.banUser(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class banUserExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new UserRestControllerApi();
            var id = 789;  // Long |  (default to null)

            try {
                // (Admin) Ban/unban user by its id
                User result = apiInstance.banUser(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserRestControllerApi.banUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserRestControllerApi();
$id = 789; // Long | 

try {
    $result = $api_instance->banUser($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserRestControllerApi->banUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserRestControllerApi->new();
my $id = 789; # Long | 

eval {
    my $result = $api_instance->banUser(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserRestControllerApi->banUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.UserRestControllerApi()
id = 789 # Long |  (default to null)

try:
    # (Admin) Ban/unban user by its id
    api_response = api_instance.ban_user(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserRestControllerApi->banUser: %s\n" % e)
extern crate UserRestControllerApi;

pub fn main() {
    let id = 789; // Long

    let mut context = UserRestControllerApi::Context::default();
    let result = client.banUser(id, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
id*
Long (int64)
Required

Responses


follow

Current user follows another user by its name


/api/users/{username}/follows

Usage and SDK Samples

curl -X PUT \
 -H "Accept: application/json" \
 "http://localhost:8443/api/users/{username}/follows"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserRestControllerApi;

import java.io.File;
import java.util.*;

public class UserRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        UserRestControllerApi apiInstance = new UserRestControllerApi();
        String username = username_example; // String | 

        try {
            User result = apiInstance.follow(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserRestControllerApi#follow");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.UserRestControllerApi;

public class UserRestControllerApiExample {
    public static void main(String[] args) {
        UserRestControllerApi apiInstance = new UserRestControllerApi();
        String username = username_example; // String | 

        try {
            User result = apiInstance.follow(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserRestControllerApi#follow");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
UserRestControllerApi *apiInstance = [[UserRestControllerApi alloc] init];
String *username = username_example; //  (default to null)

// Current user follows another user by its name
[apiInstance followWith:username
              completionHandler: ^(User output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.UserRestControllerApi()
var username = username_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.follow(username, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class followExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new UserRestControllerApi();
            var username = username_example;  // String |  (default to null)

            try {
                // Current user follows another user by its name
                User result = apiInstance.follow(username);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserRestControllerApi.follow: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserRestControllerApi();
$username = username_example; // String | 

try {
    $result = $api_instance->follow($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserRestControllerApi->follow: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserRestControllerApi->new();
my $username = username_example; # String | 

eval {
    my $result = $api_instance->follow(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserRestControllerApi->follow: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.UserRestControllerApi()
username = username_example # String |  (default to null)

try:
    # Current user follows another user by its name
    api_response = api_instance.follow(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserRestControllerApi->follow: %s\n" % e)
extern crate UserRestControllerApi;

pub fn main() {
    let username = username_example; // String

    let mut context = UserRestControllerApi::Context::default();
    let result = client.follow(username, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
username*
String
Required

Responses


getUser

Get a user by its username


/api/users/{username}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8443/api/users/{username}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserRestControllerApi;

import java.io.File;
import java.util.*;

public class UserRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        UserRestControllerApi apiInstance = new UserRestControllerApi();
        String username = username_example; // String | 

        try {
            User result = apiInstance.getUser(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserRestControllerApi#getUser");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.UserRestControllerApi;

public class UserRestControllerApiExample {
    public static void main(String[] args) {
        UserRestControllerApi apiInstance = new UserRestControllerApi();
        String username = username_example; // String | 

        try {
            User result = apiInstance.getUser(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserRestControllerApi#getUser");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
UserRestControllerApi *apiInstance = [[UserRestControllerApi alloc] init];
String *username = username_example; //  (default to null)

// Get a user by its username
[apiInstance getUserWith:username
              completionHandler: ^(User output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.UserRestControllerApi()
var username = username_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUser(username, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getUserExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new UserRestControllerApi();
            var username = username_example;  // String |  (default to null)

            try {
                // Get a user by its username
                User result = apiInstance.getUser(username);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserRestControllerApi.getUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserRestControllerApi();
$username = username_example; // String | 

try {
    $result = $api_instance->getUser($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserRestControllerApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserRestControllerApi->new();
my $username = username_example; # String | 

eval {
    my $result = $api_instance->getUser(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserRestControllerApi->getUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.UserRestControllerApi()
username = username_example # String |  (default to null)

try:
    # Get a user by its username
    api_response = api_instance.get_user(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserRestControllerApi->getUser: %s\n" % e)
extern crate UserRestControllerApi;

pub fn main() {
    let username = username_example; // String

    let mut context = UserRestControllerApi::Context::default();
    let result = client.getUser(username, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
username*
String
Required

Responses


register

Register a new user


/api/users/

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "http://localhost:8443/api/users/" \
 -d '{
  "password" : "password",
  "email" : "email",
  "username" : "username"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserRestControllerApi;

import java.io.File;
import java.util.*;

public class UserRestControllerApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        UserRestControllerApi apiInstance = new UserRestControllerApi();
        RegistrationRequest registrationRequest = ; // RegistrationRequest | 

        try {
            User result = apiInstance.register(registrationRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserRestControllerApi#register");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.UserRestControllerApi;

public class UserRestControllerApiExample {
    public static void main(String[] args) {
        UserRestControllerApi apiInstance = new UserRestControllerApi();
        RegistrationRequest registrationRequest = ; // RegistrationRequest | 

        try {
            User result = apiInstance.register(registrationRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserRestControllerApi#register");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
UserRestControllerApi *apiInstance = [[UserRestControllerApi alloc] init];
RegistrationRequest *registrationRequest = ; // 

// Register a new user
[apiInstance registerWith:registrationRequest
              completionHandler: ^(User output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var OpenApiDefinition = require('open_api_definition');

// Create an instance of the API class
var api = new OpenApiDefinition.UserRestControllerApi()
var registrationRequest = ; // {RegistrationRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.register(registrationRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class registerExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new UserRestControllerApi();
            var registrationRequest = new RegistrationRequest(); // RegistrationRequest | 

            try {
                // Register a new user
                User result = apiInstance.register(registrationRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserRestControllerApi.register: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserRestControllerApi();
$registrationRequest = ; // RegistrationRequest | 

try {
    $result = $api_instance->register($registrationRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserRestControllerApi->register: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserRestControllerApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserRestControllerApi->new();
my $registrationRequest = WWW::OPenAPIClient::Object::RegistrationRequest->new(); # RegistrationRequest | 

eval {
    my $result = $api_instance->register(registrationRequest => $registrationRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserRestControllerApi->register: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.UserRestControllerApi()
registrationRequest =  # RegistrationRequest | 

try:
    # Register a new user
    api_response = api_instance.register(registrationRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserRestControllerApi->register: %s\n" % e)
extern crate UserRestControllerApi;

pub fn main() {
    let registrationRequest = ; // RegistrationRequest

    let mut context = UserRestControllerApi::Context::default();
    let result = client.register(registrationRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
registrationRequest *

Responses