feedAlertsPost
Send a vending machine alert to the third party platform
/feed/alerts
Usage and SDK Samples
curl -X POST \
-H "Authorization: Basic [[basicHash]]" \
-H "X-API-Key: [[apiKey]]" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"https://3rdparty.connectivityPlatformIntegration.com/feed/alerts" \
-d '{
"vm_id" : "vm_id",
"level" : "level",
"time" : 0,
"message" : "message"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DataFeedCallbackAPIApi;
import java.io.File;
import java.util.*;
public class DataFeedCallbackAPIApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
// Create an instance of the API class
DataFeedCallbackAPIApi apiInstance = new DataFeedCallbackAPIApi();
AlertNotification alertNotification = ; // AlertNotification |
try {
CallbackResponse result = apiInstance.feedAlertsPost(alertNotification);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DataFeedCallbackAPIApi#feedAlertsPost");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final AlertNotification alertNotification = new AlertNotification(); // AlertNotification |
try {
final result = await api_instance.feedAlertsPost(alertNotification);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->feedAlertsPost: $e\n');
}
import org.openapitools.client.api.DataFeedCallbackAPIApi;
public class DataFeedCallbackAPIApiExample {
public static void main(String[] args) {
DataFeedCallbackAPIApi apiInstance = new DataFeedCallbackAPIApi();
AlertNotification alertNotification = ; // AlertNotification |
try {
CallbackResponse result = apiInstance.feedAlertsPost(alertNotification);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DataFeedCallbackAPIApi#feedAlertsPost");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: BasicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];
// Create an instance of the API class
DataFeedCallbackAPIApi *apiInstance = [[DataFeedCallbackAPIApi alloc] init];
AlertNotification *alertNotification = ; //
// Send a vending machine alert to the third party platform
[apiInstance feedAlertsPostWith:alertNotification
completionHandler: ^(CallbackResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var VendingMachineApiDocumentCallBackConnectivityPlatformVendingOnTrack = require('vending_machine_api_document__call_back_connectivity_platform_vending_on_track');
var defaultClient = VendingMachineApiDocumentCallBackConnectivityPlatformVendingOnTrack.ApiClient.instance;
// Configure HTTP basic authorization: BasicAuth
var BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-Key'] = "Token";
// Create an instance of the API class
var api = new VendingMachineApiDocumentCallBackConnectivityPlatformVendingOnTrack.DataFeedCallbackAPIApi()
var alertNotification = ; // {AlertNotification}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.feedAlertsPost(alertNotification, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class feedAlertsPostExample
{
public void main()
{
// Configure HTTP basic authorization: BasicAuth
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
// Configure API key authorization: ApiKeyAuth
Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");
// Create an instance of the API class
var apiInstance = new DataFeedCallbackAPIApi();
var alertNotification = new AlertNotification(); // AlertNotification |
try {
// Send a vending machine alert to the third party platform
CallbackResponse result = apiInstance.feedAlertsPost(alertNotification);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DataFeedCallbackAPIApi.feedAlertsPost: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DataFeedCallbackAPIApi();
$alertNotification = ; // AlertNotification |
try {
$result = $api_instance->feedAlertsPost($alertNotification);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataFeedCallbackAPIApi->feedAlertsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DataFeedCallbackAPIApi;
# Configure HTTP basic authorization: BasicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';
# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DataFeedCallbackAPIApi->new();
my $alertNotification = WWW::OPenAPIClient::Object::AlertNotification->new(); # AlertNotification |
eval {
my $result = $api_instance->feedAlertsPost(alertNotification => $alertNotification);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DataFeedCallbackAPIApi->feedAlertsPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# Create an instance of the API class
api_instance = openapi_client.DataFeedCallbackAPIApi()
alertNotification = # AlertNotification |
try:
# Send a vending machine alert to the third party platform
api_response = api_instance.feed_alerts_post(alertNotification)
pprint(api_response)
except ApiException as e:
print("Exception when calling DataFeedCallbackAPIApi->feedAlertsPost: %s\n" % e)
extern crate DataFeedCallbackAPIApi;
pub fn main() {
let alertNotification = ; // AlertNotification
let mut context = DataFeedCallbackAPIApi::Context::default();
let result = client.feedAlertsPost(alertNotification, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| alertNotification * |