createBidInAuction
Create Bid
Create a Bid in the Auction
/marketplace/auction/{id}/bid/create
Usage and SDK Samples
curl -X POST\
\
-H "Accept: application/json,application/xml"\
-H "Content-Type: application/json"\
"http://petstore.swagger.io/v2/marketplace/auction/{id}/bid/create"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AuctionApi;
import java.io.File;
import java.util.*;
public class AuctionApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
// Create an instance of the API class
AuctionApi apiInstance = new AuctionApi();
Long id = 789; // Long | auction id
array[Bid] bid = ; // array[Bid] |
try {
BidResponse result = apiInstance.createBidInAuction(id, bid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuctionApi#createBidInAuction");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.AuctionApi;
public class AuctionApiExample {
public static void main(String[] args) {
AuctionApi apiInstance = new AuctionApi();
Long id = 789; // Long | auction id
array[Bid] bid = ; // array[Bid] |
try {
BidResponse result = apiInstance.createBidInAuction(id, bid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuctionApi#createBidInAuction");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Create an instance of the API class
AuctionApi *apiInstance = [[AuctionApi alloc] init];
Long *id = 789; // auction id (default to null)
array[Bid] *bid = ; // (optional)
// Create Bid
[apiInstance createBidInAuctionWith:id
bid:bid
completionHandler: ^(BidResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var EnigmatchMarketplaceApi = require('enigmatch_marketplace_api');
var defaultClient = EnigmatchMarketplaceApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: petstore_auth
var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = "YOUR ACCESS TOKEN";
// Create an instance of the API class
var api = new EnigmatchMarketplaceApi.AuctionApi()
var id = 789; // {Long} auction id
var opts = {
'bid': // {array[Bid]}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createBidInAuction(id, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class createBidInAuctionExample
{
public void main()
{
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
// Create an instance of the API class
var apiInstance = new AuctionApi();
var id = 789; // Long | auction id (default to null)
var bid = new array[Bid](); // array[Bid] | (optional)
try {
// Create Bid
BidResponse result = apiInstance.createBidInAuction(id, bid);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling AuctionApi.createBidInAuction: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AuctionApi();
$id = 789; // Long | auction id
$bid = ; // array[Bid] |
try {
$result = $api_instance->createBidInAuction($id, $bid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuctionApi->createBidInAuction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AuctionApi;
# Configure OAuth2 access token for authorization: petstore_auth
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AuctionApi->new();
my $id = 789; # Long | auction id
my $bid = [WWW::OPenAPIClient::Object::array[Bid]->new()]; # array[Bid] |
eval {
my $result = $api_instance->createBidInAuction(id => $id, bid => $bid);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AuctionApi->createBidInAuction: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: petstore_auth
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Create an instance of the API class
api_instance = openapi_client.AuctionApi()
id = 789 # Long | auction id (default to null)
bid = # array[Bid] | (optional)
try:
# Create Bid
api_response = api_instance.create_bid_in_auction(id, bid=bid)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuctionApi->createBidInAuction: %s\n" % e)
extern crate AuctionApi;
pub fn main() {
let id = 789; // Long
let bid = ; // array[Bid]
let mut context = AuctionApi::Context::default();
let result = client.createBidInAuction(id, bid, &context).wait();
println!("{:?}", result);
}
Scopes
write:pets | modify pets in your account |
read:pets | read your pets |
Parameters
Name | Description |
---|---|
id* |
Long
(int64)
auction id
Required
|
Name | Description |
---|---|
bid |