voteQuote
vote a quote
vote a quote
/quotes/vote
Usage and SDK Samples
curl -X POST "https://api.apieco.ir/prog-quotes/quotes/vote?quoteId=&newVote="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProtectedRoutesApi;
import java.io.File;
import java.util.*;
public class ProtectedRoutesApiExample {
public static void main(String[] args) {
ProtectedRoutesApi apiInstance = new ProtectedRoutesApi();
String apiecoKey = apiecoKey_example; // String |
String quoteId = quoteId_example; // String | The Quote id
BigDecimal newVote = 8.14; // BigDecimal | Vote Value (from 1 to 5)
try {
inline_response_200 result = apiInstance.voteQuote(apiecoKey, quoteId, newVote);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProtectedRoutesApi#voteQuote");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ProtectedRoutesApi;
public class ProtectedRoutesApiExample {
public static void main(String[] args) {
ProtectedRoutesApi apiInstance = new ProtectedRoutesApi();
String apiecoKey = apiecoKey_example; // String |
String quoteId = quoteId_example; // String | The Quote id
BigDecimal newVote = 8.14; // BigDecimal | Vote Value (from 1 to 5)
try {
inline_response_200 result = apiInstance.voteQuote(apiecoKey, quoteId, newVote);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProtectedRoutesApi#voteQuote");
e.printStackTrace();
}
}
}
String *apiecoKey = apiecoKey_example; //
String *quoteId = quoteId_example; // The Quote id
BigDecimal *newVote = 8.14; // Vote Value (from 1 to 5)
ProtectedRoutesApi *apiInstance = [[ProtectedRoutesApi alloc] init];
// vote a quote
[apiInstance voteQuoteWith:apiecoKey
quoteId:quoteId
newVote:newVote
completionHandler: ^(inline_response_200 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ProgrammingQuotesApi = require('programming_quotes_api');
var api = new ProgrammingQuotesApi.ProtectedRoutesApi()
var apiecoKey = apiecoKey_example; // {String}
var quoteId = quoteId_example; // {String} The Quote id
var newVote = 8.14; // {BigDecimal} Vote Value (from 1 to 5)
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.voteQuote(apiecoKey, quoteId, newVote, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class voteQuoteExample
{
public void main()
{
var apiInstance = new ProtectedRoutesApi();
var apiecoKey = apiecoKey_example; // String |
var quoteId = quoteId_example; // String | The Quote id
var newVote = 8.14; // BigDecimal | Vote Value (from 1 to 5)
try
{
// vote a quote
inline_response_200 result = apiInstance.voteQuote(apiecoKey, quoteId, newVote);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProtectedRoutesApi.voteQuote: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\ProtectedRoutesApi();
$apiecoKey = apiecoKey_example; // String |
$quoteId = quoteId_example; // String | The Quote id
$newVote = 8.14; // BigDecimal | Vote Value (from 1 to 5)
try {
$result = $api_instance->voteQuote($apiecoKey, $quoteId, $newVote);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProtectedRoutesApi->voteQuote: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProtectedRoutesApi;
my $api_instance = WWW::SwaggerClient::ProtectedRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String |
my $quoteId = quoteId_example; # String | The Quote id
my $newVote = 8.14; # BigDecimal | Vote Value (from 1 to 5)
eval {
my $result = $api_instance->voteQuote(apiecoKey => $apiecoKey, quoteId => $quoteId, newVote => $newVote);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ProtectedRoutesApi->voteQuote: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.ProtectedRoutesApi()
apiecoKey = apiecoKey_example # String |
quoteId = quoteId_example # String | The Quote id
newVote = 8.14 # BigDecimal | Vote Value (from 1 to 5)
try:
# vote a quote
api_response = api_instance.vote_quote(apiecoKey, quoteId, newVote)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProtectedRoutesApi->voteQuote: %s\n" % e)
Parameters
Header parameters
Name | Description |
---|---|
apieco-key* |
String
Required
|
Query parameters
Name | Description |
---|---|
quoteId* |
String
The Quote id
Required
|
newVote* |
BigDecimal
Vote Value (from 1 to 5)
Required
|