Social Voting Platform API (Team 7 - Final)

Identification

authKakaoPost

카카오 토큰으로 서비스 로그인


/auth/kakao

Usage and SDK Samples

curl -X POST \
 -H "Content-Type: application/json" \
 "http://localhost/auth/kakao" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.IdentificationApi;

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

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

        // Create an instance of the API class
        IdentificationApi apiInstance = new IdentificationApi();
        AuthKakaoPostRequest authKakaoPostRequest = ; // AuthKakaoPostRequest | 

        try {
            apiInstance.authKakaoPost(authKakaoPostRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling IdentificationApi#authKakaoPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final AuthKakaoPostRequest authKakaoPostRequest = new AuthKakaoPostRequest(); // AuthKakaoPostRequest | 

try {
    final result = await api_instance.authKakaoPost(authKakaoPostRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->authKakaoPost: $e\n');
}

import org.openapitools.client.api.IdentificationApi;

public class IdentificationApiExample {
    public static void main(String[] args) {
        IdentificationApi apiInstance = new IdentificationApi();
        AuthKakaoPostRequest authKakaoPostRequest = ; // AuthKakaoPostRequest | 

        try {
            apiInstance.authKakaoPost(authKakaoPostRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling IdentificationApi#authKakaoPost");
            e.printStackTrace();
        }
    }
}


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

// 카카오 토큰으로 서비스 로그인
[apiInstance authKakaoPostWith:authKakaoPostRequest
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SocialVotingPlatformApiTeam7Final = require('social_voting_platform_api__team_7_final');

// Create an instance of the API class
var api = new SocialVotingPlatformApiTeam7Final.IdentificationApi()
var authKakaoPostRequest = ; // {AuthKakaoPostRequest} 

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

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

            // Create an instance of the API class
            var apiInstance = new IdentificationApi();
            var authKakaoPostRequest = new AuthKakaoPostRequest(); // AuthKakaoPostRequest | 

            try {
                // 카카오 토큰으로 서비스 로그인
                apiInstance.authKakaoPost(authKakaoPostRequest);
            } catch (Exception e) {
                Debug.Print("Exception when calling IdentificationApi.authKakaoPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\IdentificationApi();
$authKakaoPostRequest = ; // AuthKakaoPostRequest | 

try {
    $api_instance->authKakaoPost($authKakaoPostRequest);
} catch (Exception $e) {
    echo 'Exception when calling IdentificationApi->authKakaoPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::IdentificationApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::IdentificationApi->new();
my $authKakaoPostRequest = WWW::OPenAPIClient::Object::AuthKakaoPostRequest->new(); # AuthKakaoPostRequest | 

eval {
    $api_instance->authKakaoPost(authKakaoPostRequest => $authKakaoPostRequest);
};
if ($@) {
    warn "Exception when calling IdentificationApi->authKakaoPost: $@\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.IdentificationApi()
authKakaoPostRequest =  # AuthKakaoPostRequest | 

try:
    # 카카오 토큰으로 서비스 로그인
    api_instance.auth_kakao_post(authKakaoPostRequest)
except ApiException as e:
    print("Exception when calling IdentificationApi->authKakaoPost: %s\n" % e)
extern crate IdentificationApi;

pub fn main() {
    let authKakaoPostRequest = ; // AuthKakaoPostRequest

    let mut context = IdentificationApi::Context::default();
    let result = client.authKakaoPost(authKakaoPostRequest, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
authKakaoPostRequest *

Responses

Name Type Format Description
Set-Cookie String


Vote

votesGet

전체 투표 목록 조회


/votes

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost/votes"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VoteApi;

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

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

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

        try {
            array[Vote] result = apiInstance.votesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoteApi#votesGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.votesGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->votesGet: $e\n');
}

import org.openapitools.client.api.VoteApi;

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

        try {
            array[Vote] result = apiInstance.votesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoteApi#votesGet");
            e.printStackTrace();
        }
    }
}


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

// 전체 투표 목록 조회
[apiInstance votesGetWithCompletionHandler: 
              ^(array[Vote] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SocialVotingPlatformApiTeam7Final = require('social_voting_platform_api__team_7_final');

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

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

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

            try {
                // 전체 투표 목록 조회
                array[Vote] result = apiInstance.votesGet();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling VoteApi.votesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval {
    my $result = $api_instance->votesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VoteApi->votesGet: $@\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.VoteApi()

try:
    # 전체 투표 목록 조회
    api_response = api_instance.votes_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VoteApi->votesGet: %s\n" % e)
extern crate VoteApi;

pub fn main() {

    let mut context = VoteApi::Context::default();
    let result = client.votesGet(&context).wait();

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

Scopes

Parameters

Responses


votesIdParticipatePost

특정 투표에 참여 (인증 필요)


/votes/{id}/participate

Usage and SDK Samples

curl -X POST \
 -H "Content-Type: application/json" \
 "http://localhost/votes/{id}/participate" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VoteApi;

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

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

        // Create an instance of the API class
        VoteApi apiInstance = new VoteApi();
        String id = id_example; // String | 
        VotesIdParticipatePostRequest votesIdParticipatePostRequest = ; // VotesIdParticipatePostRequest | 

        try {
            apiInstance.votesIdParticipatePost(id, votesIdParticipatePostRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoteApi#votesIdParticipatePost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | 
final VotesIdParticipatePostRequest votesIdParticipatePostRequest = new VotesIdParticipatePostRequest(); // VotesIdParticipatePostRequest | 

try {
    final result = await api_instance.votesIdParticipatePost(id, votesIdParticipatePostRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->votesIdParticipatePost: $e\n');
}

import org.openapitools.client.api.VoteApi;

public class VoteApiExample {
    public static void main(String[] args) {
        VoteApi apiInstance = new VoteApi();
        String id = id_example; // String | 
        VotesIdParticipatePostRequest votesIdParticipatePostRequest = ; // VotesIdParticipatePostRequest | 

        try {
            apiInstance.votesIdParticipatePost(id, votesIdParticipatePostRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoteApi#votesIdParticipatePost");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
VoteApi *apiInstance = [[VoteApi alloc] init];
String *id = id_example; //  (default to null)
VotesIdParticipatePostRequest *votesIdParticipatePostRequest = ; // 

// 특정 투표에 참여 (인증 필요)
[apiInstance votesIdParticipatePostWith:id
    votesIdParticipatePostRequest:votesIdParticipatePostRequest
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SocialVotingPlatformApiTeam7Final = require('social_voting_platform_api__team_7_final');

// Create an instance of the API class
var api = new SocialVotingPlatformApiTeam7Final.VoteApi()
var id = id_example; // {String} 
var votesIdParticipatePostRequest = ; // {VotesIdParticipatePostRequest} 

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

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

            // Create an instance of the API class
            var apiInstance = new VoteApi();
            var id = id_example;  // String |  (default to null)
            var votesIdParticipatePostRequest = new VotesIdParticipatePostRequest(); // VotesIdParticipatePostRequest | 

            try {
                // 특정 투표에 참여 (인증 필요)
                apiInstance.votesIdParticipatePost(id, votesIdParticipatePostRequest);
            } catch (Exception e) {
                Debug.Print("Exception when calling VoteApi.votesIdParticipatePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VoteApi();
$id = id_example; // String | 
$votesIdParticipatePostRequest = ; // VotesIdParticipatePostRequest | 

try {
    $api_instance->votesIdParticipatePost($id, $votesIdParticipatePostRequest);
} catch (Exception $e) {
    echo 'Exception when calling VoteApi->votesIdParticipatePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::VoteApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VoteApi->new();
my $id = id_example; # String | 
my $votesIdParticipatePostRequest = WWW::OPenAPIClient::Object::VotesIdParticipatePostRequest->new(); # VotesIdParticipatePostRequest | 

eval {
    $api_instance->votesIdParticipatePost(id => $id, votesIdParticipatePostRequest => $votesIdParticipatePostRequest);
};
if ($@) {
    warn "Exception when calling VoteApi->votesIdParticipatePost: $@\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.VoteApi()
id = id_example # String |  (default to null)
votesIdParticipatePostRequest =  # VotesIdParticipatePostRequest | 

try:
    # 특정 투표에 참여 (인증 필요)
    api_instance.votes_id_participate_post(id, votesIdParticipatePostRequest)
except ApiException as e:
    print("Exception when calling VoteApi->votesIdParticipatePost: %s\n" % e)
extern crate VoteApi;

pub fn main() {
    let id = id_example; // String
    let votesIdParticipatePostRequest = ; // VotesIdParticipatePostRequest

    let mut context = VoteApi::Context::default();
    let result = client.votesIdParticipatePost(id, votesIdParticipatePostRequest, &context).wait();

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

Scopes

Parameters

Path parameters
Name Description
id*
String
Required
Body parameters
Name Description
votesIdParticipatePostRequest *

Responses


votesIdResultsGet

투표 결과(단순 득표수) 조회


/votes/{id}/results

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost/votes/{id}/results"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VoteApi;

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

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

        // Create an instance of the API class
        VoteApi apiInstance = new VoteApi();
        String id = id_example; // String | 

        try {
            _votes__id__results_get_200_response result = apiInstance.votesIdResultsGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoteApi#votesIdResultsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String id = new String(); // String | 

try {
    final result = await api_instance.votesIdResultsGet(id);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->votesIdResultsGet: $e\n');
}

import org.openapitools.client.api.VoteApi;

public class VoteApiExample {
    public static void main(String[] args) {
        VoteApi apiInstance = new VoteApi();
        String id = id_example; // String | 

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


// Create an instance of the API class
VoteApi *apiInstance = [[VoteApi alloc] init];
String *id = id_example; //  (default to null)

// 투표 결과(단순 득표수) 조회
[apiInstance votesIdResultsGetWith:id
              completionHandler: ^(_votes__id__results_get_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SocialVotingPlatformApiTeam7Final = require('social_voting_platform_api__team_7_final');

// Create an instance of the API class
var api = new SocialVotingPlatformApiTeam7Final.VoteApi()
var id = id_example; // {String} 

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

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

            // Create an instance of the API class
            var apiInstance = new VoteApi();
            var id = id_example;  // String |  (default to null)

            try {
                // 투표 결과(단순 득표수) 조회
                _votes__id__results_get_200_response result = apiInstance.votesIdResultsGet(id);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling VoteApi.votesIdResultsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VoteApi();
$id = id_example; // String | 

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

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VoteApi->new();
my $id = id_example; # String | 

eval {
    my $result = $api_instance->votesIdResultsGet(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VoteApi->votesIdResultsGet: $@\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.VoteApi()
id = id_example # String |  (default to null)

try:
    # 투표 결과(단순 득표수) 조회
    api_response = api_instance.votes_id_results_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VoteApi->votesIdResultsGet: %s\n" % e)
extern crate VoteApi;

pub fn main() {
    let id = id_example; // String

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

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

Scopes

Parameters

Path parameters
Name Description
id*
String
Required

Responses


votesPost

신규 투표 생성 (인증 필요)


/votes

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Content-Type: application/json" \
 "http://localhost/votes" \
 -d '{
  "title" : "title",
  "options" : [ {
    "name" : "name",
    "kakao_id" : "kakao_id",
    "lat" : 0.8008281904610115,
    "lng" : 6.027456183070403
  }, {
    "name" : "name",
    "kakao_id" : "kakao_id",
    "lat" : 0.8008281904610115,
    "lng" : 6.027456183070403
  } ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.VoteApi;

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

public class VoteApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: bearerAuth
        HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
        bearerAuth.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        VoteApi apiInstance = new VoteApi();
        VoteCreate voteCreate = ; // VoteCreate | 

        try {
            apiInstance.votesPost(voteCreate);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoteApi#votesPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final VoteCreate voteCreate = new VoteCreate(); // VoteCreate | 

try {
    final result = await api_instance.votesPost(voteCreate);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->votesPost: $e\n');
}

import org.openapitools.client.api.VoteApi;

public class VoteApiExample {
    public static void main(String[] args) {
        VoteApi apiInstance = new VoteApi();
        VoteCreate voteCreate = ; // VoteCreate | 

        try {
            apiInstance.votesPost(voteCreate);
        } catch (ApiException e) {
            System.err.println("Exception when calling VoteApi#votesPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: bearerAuth
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

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

// 신규 투표 생성 (인증 필요)
[apiInstance votesPostWith:voteCreate
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SocialVotingPlatformApiTeam7Final = require('social_voting_platform_api__team_7_final');
var defaultClient = SocialVotingPlatformApiTeam7Final.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new SocialVotingPlatformApiTeam7Final.VoteApi()
var voteCreate = ; // {VoteCreate} 

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

namespace Example
{
    public class votesPostExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: bearerAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new VoteApi();
            var voteCreate = new VoteCreate(); // VoteCreate | 

            try {
                // 신규 투표 생성 (인증 필요)
                apiInstance.votesPost(voteCreate);
            } catch (Exception e) {
                Debug.Print("Exception when calling VoteApi.votesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\VoteApi();
$voteCreate = ; // VoteCreate | 

try {
    $api_instance->votesPost($voteCreate);
} catch (Exception $e) {
    echo 'Exception when calling VoteApi->votesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::VoteApi;

# Configure Bearer (JWT) access token for authorization: bearerAuth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::VoteApi->new();
my $voteCreate = WWW::OPenAPIClient::Object::VoteCreate->new(); # VoteCreate | 

eval {
    $api_instance->votesPost(voteCreate => $voteCreate);
};
if ($@) {
    warn "Exception when calling VoteApi->votesPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: bearerAuth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.VoteApi()
voteCreate =  # VoteCreate | 

try:
    # 신규 투표 생성 (인증 필요)
    api_instance.votes_post(voteCreate)
except ApiException as e:
    print("Exception when calling VoteApi->votesPost: %s\n" % e)
extern crate VoteApi;

pub fn main() {
    let voteCreate = ; // VoteCreate

    let mut context = VoteApi::Context::default();
    let result = client.votesPost(voteCreate, &context).wait();

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

Scopes

Parameters

Body parameters
Name Description
voteCreate *

Responses