addProjects
Add a new projects to the store
/projects
Usage and SDK Samples
curl -X POST "https://api.corexads.com/v1//projects"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProjectsApi;
import java.io.File;
import java.util.*;
public class ProjectsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: projectsstore_auth
OAuth projectsstore_auth = (OAuth) defaultClient.getAuthentication("projectsstore_auth");
projectsstore_auth.setAccessToken("YOUR ACCESS TOKEN");
ProjectsApi apiInstance = new ProjectsApi();
Projects body = ; // Projects | Projects object that needs to be added to the store
try {
apiInstance.addProjects(body);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#addProjects");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ProjectsApi;
public class ProjectsApiExample {
public static void main(String[] args) {
ProjectsApi apiInstance = new ProjectsApi();
Projects body = ; // Projects | Projects object that needs to be added to the store
try {
apiInstance.addProjects(body);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectsApi#addProjects");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: projectsstore_auth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Projects *body = ; // Projects object that needs to be added to the store
ProjectsApi *apiInstance = [[ProjectsApi alloc] init];
// Add a new projects to the store
[apiInstance addProjectsWith:body
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var CorexApi = require('corex_api');
var defaultClient = CorexApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: projectsstore_auth
var projectsstore_auth = defaultClient.authentications['projectsstore_auth'];
projectsstore_auth.accessToken = "YOUR ACCESS TOKEN"
var api = new CorexApi.ProjectsApi()
var body = ; // {{Projects}} Projects object that needs to be added to the store
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.addProjects(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class addProjectsExample
{
public void main()
{
// Configure OAuth2 access token for authorization: projectsstore_auth
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ProjectsApi();
var body = new Projects(); // Projects | Projects object that needs to be added to the store
try
{
// Add a new projects to the store
apiInstance.addProjects(body);
}
catch (Exception e)
{
Debug.Print("Exception when calling ProjectsApi.addProjects: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: projectsstore_auth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\ApiProjectsApi();
$body = ; // Projects | Projects object that needs to be added to the store
try {
$api_instance->addProjects($body);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->addProjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProjectsApi;
# Configure OAuth2 access token for authorization: projectsstore_auth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api_instance = WWW::SwaggerClient::ProjectsApi->new();
my $body = WWW::SwaggerClient::Object::Projects->new(); # Projects | Projects object that needs to be added to the store
eval {
$api_instance->addProjects(body => $body);
};
if ($@) {
warn "Exception when calling ProjectsApi->addProjects: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: projectsstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.ProjectsApi()
body = # Projects | Projects object that needs to be added to the store
try:
# Add a new projects to the store
api_instance.add_projects(body)
except ApiException as e:
print("Exception when calling ProjectsApi->addProjects: %s\n" % e)
Parameters
Body parameters
| Name | Description |
|---|---|
| body * |