getCampaign
Returns a specific campaigns
/api/public/campaigns/{campaign_id}
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json,text/plain"\
"http://v2.koalect.com/api/public/campaigns/{campaign_id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CampaignsApi;
import java.io.File;
import java.util.*;
public class CampaignsApiExample {
public static void main(String[] args) {
// Create an instance of the API class
CampaignsApi apiInstance = new CampaignsApi();
UUID campaignId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID |
try {
CampaignShow result = apiInstance.getCampaign(campaignId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CampaignsApi#getCampaign");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.CampaignsApi;
public class CampaignsApiExample {
public static void main(String[] args) {
CampaignsApi apiInstance = new CampaignsApi();
UUID campaignId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID |
try {
CampaignShow result = apiInstance.getCampaign(campaignId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CampaignsApi#getCampaign");
e.printStackTrace();
}
}
}
// Create an instance of the API class
CampaignsApi *apiInstance = [[CampaignsApi alloc] init];
UUID *campaignId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // (default to null)
[apiInstance getCampaignWith:campaignId
completionHandler: ^(CampaignShow output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var KoalectPublicApi = require('koalect_public_api');
// Create an instance of the API class
var api = new KoalectPublicApi.CampaignsApi()
var campaignId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getCampaign(campaignId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class getCampaignExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new CampaignsApi();
var campaignId = new UUID(); // UUID | (default to null)
try {
CampaignShow result = apiInstance.getCampaign(campaignId);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling CampaignsApi.getCampaign: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CampaignsApi();
$campaignId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID |
try {
$result = $api_instance->getCampaign($campaignId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CampaignsApi->getCampaign: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CampaignsApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CampaignsApi->new();
my $campaignId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID |
eval {
my $result = $api_instance->getCampaign(campaignId => $campaignId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CampaignsApi->getCampaign: $@\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.CampaignsApi()
campaignId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | (default to null)
try:
api_response = api_instance.get_campaign(campaignId)
pprint(api_response)
except ApiException as e:
print("Exception when calling CampaignsApi->getCampaign: %s\n" % e)
extern crate CampaignsApi;
pub fn main() {
let campaignId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
let mut context = CampaignsApi::Context::default();
let result = client.getCampaign(campaignId, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Path parameters
| Name | Description |
|---|---|
| campaign_id* |
UUID
(uuid)
Required
|