1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 08:04:49 -05:00

API: /sdrangel/featuresets (GET) implemented and /sdrangel/featureset (POST, DELETE) implemented returning 501

This commit is contained in:
f4exb 2021-08-21 12:42:57 +02:00
parent 00832f23bd
commit a36867af66
12 changed files with 1773 additions and 2 deletions

View File

@ -12522,6 +12522,12 @@ margin-bottom: 20px;
<li data-group="FeatureSet" data-name="featuresetGet" class="">
<a href="#api-FeatureSet-featuresetGet">featuresetGet</a>
</li>
<li data-group="FeatureSet" data-name="instanceFeatureSetDelete" class="">
<a href="#api-FeatureSet-instanceFeatureSetDelete">instanceFeatureSetDelete</a>
</li>
<li data-group="FeatureSet" data-name="instanceFeatureSetPost" class="">
<a href="#api-FeatureSet-instanceFeatureSetPost">instanceFeatureSetPost</a>
</li>
<li class="nav-header" data-group="Instance"><a href="#api-Instance">API Methods - Instance</a></li>
<li data-group="Instance" data-name="instanceAMBEDevicesDelete" class="">
<a href="#api-Instance-instanceAMBEDevicesDelete">instanceAMBEDevicesDelete</a>
@ -32547,6 +32553,719 @@ except ApiException as e:
</article>
</div>
<hr>
<div id="api-FeatureSet-instanceFeatureSetDelete">
<article id="api-FeatureSet-instanceFeatureSetDelete-0" data-group="User" data-name="instanceFeatureSetDelete" data-version="0">
<div class="pull-left">
<h1>instanceFeatureSetDelete</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">Remove last feature set. The GUI version does not remove the first feature set.</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/sdrangel/featureset</span></code></pre>
<p>
<h3>Usage and SDK Samples</h3>
</p>
<ul class="nav nav-tabs nav-tabs-examples">
<li class="active"><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-curl">Curl</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-java">Java</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-android">Android</a></li>
<!--<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-csharp">C#</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-php">PHP</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-perl">Perl</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-FeatureSet-instanceFeatureSetDelete-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/sdrangel/featureset"</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-java">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
import SWGSDRangel.auth.*;
import SWGSDRangel.model.*;
import SWGSDRangel.api.FeatureSetApi;
import java.io.File;
import java.util.*;
public class FeatureSetApiExample {
public static void main(String[] args) {
FeatureSetApi apiInstance = new FeatureSetApi();
try {
SuccessResponse result = apiInstance.instanceFeatureSetDelete();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureSetApi#instanceFeatureSetDelete");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-android">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.FeatureSetApi;
public class FeatureSetApiExample {
public static void main(String[] args) {
FeatureSetApi apiInstance = new FeatureSetApi();
try {
SuccessResponse result = apiInstance.instanceFeatureSetDelete();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureSetApi#instanceFeatureSetDelete");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-objc">
<pre class="prettyprint"><code class="language-cpp">
FeatureSetApi *apiInstance = [[FeatureSetApi alloc] init];
[apiInstance instanceFeatureSetDeleteWithCompletionHandler:
^(SuccessResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.FeatureSetApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.instanceFeatureSetDelete(callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-csharp">
<pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using SWGSDRangel.Api;
using SWGSDRangel.Client;
using SWGSDRangel.Model;
namespace Example
{
public class instanceFeatureSetDeleteExample
{
public void main()
{
var apiInstance = new FeatureSetApi();
try
{
SuccessResponse result = apiInstance.instanceFeatureSetDelete();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling FeatureSetApi.instanceFeatureSetDelete: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FeatureSetApi();
try {
$result = $api_instance->instanceFeatureSetDelete();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FeatureSetApi->instanceFeatureSetDelete: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::FeatureSetApi;
my $api_instance = SWGSDRangel::FeatureSetApi->new();
eval {
my $result = $api_instance->instanceFeatureSetDelete();
print Dumper($result);
};
if ($@) {
warn "Exception when calling FeatureSetApi->instanceFeatureSetDelete: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-python">
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_sdrangel
from swagger_sdrangel.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_sdrangel.FeatureSetApi()
try:
api_response = api_instance.instance_feature_set_delete()
pprint(api_response)
except ApiException as e:
print("Exception when calling FeatureSetApi->instanceFeatureSetDelete: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<h2>Responses</h2>
<h3> Status: 202 - Message to remove last feature set was sent successfully </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetDelete-202-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetDelete-202-schema">
<div id='responses-instanceFeatureSetDelete-202-schema-202' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Message to remove last feature set was sent successfully",
"schema" : {
"$ref" : "#/definitions/SuccessResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetDelete-202-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetDelete-202-schema-202');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetDelete-202-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 404 - No more feature sets to be deleted </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetDelete-404-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetDelete-404-schema">
<div id='responses-instanceFeatureSetDelete-404-schema-404' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "No more feature sets to be deleted",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetDelete-404-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetDelete-404-schema-404');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetDelete-404-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 500 - Error </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetDelete-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetDelete-500-schema">
<div id='responses-instanceFeatureSetDelete-500-schema-500' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Error",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetDelete-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetDelete-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetDelete-500-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 501 - Function not implemented </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetDelete-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetDelete-501-schema">
<div id='responses-instanceFeatureSetDelete-501-schema-501' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Function not implemented",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetDelete-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetDelete-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetDelete-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-FeatureSet-instanceFeatureSetPost">
<article id="api-FeatureSet-instanceFeatureSetPost-0" data-group="User" data-name="instanceFeatureSetPost" data-version="0">
<div class="pull-left">
<h1>instanceFeatureSetPost</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">Add (append) a new feature set</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/sdrangel/featureset</span></code></pre>
<p>
<h3>Usage and SDK Samples</h3>
</p>
<ul class="nav nav-tabs nav-tabs-examples">
<li class="active"><a href="#examples-FeatureSet-instanceFeatureSetPost-0-curl">Curl</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-java">Java</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-android">Android</a></li>
<!--<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-csharp">C#</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-php">PHP</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-perl">Perl</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-FeatureSet-instanceFeatureSetPost-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/sdrangel/featureset"</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-java">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
import SWGSDRangel.auth.*;
import SWGSDRangel.model.*;
import SWGSDRangel.api.FeatureSetApi;
import java.io.File;
import java.util.*;
public class FeatureSetApiExample {
public static void main(String[] args) {
FeatureSetApi apiInstance = new FeatureSetApi();
try {
SuccessResponse result = apiInstance.instanceFeatureSetPost();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureSetApi#instanceFeatureSetPost");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-android">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.FeatureSetApi;
public class FeatureSetApiExample {
public static void main(String[] args) {
FeatureSetApi apiInstance = new FeatureSetApi();
try {
SuccessResponse result = apiInstance.instanceFeatureSetPost();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureSetApi#instanceFeatureSetPost");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-objc">
<pre class="prettyprint"><code class="language-cpp">
FeatureSetApi *apiInstance = [[FeatureSetApi alloc] init];
[apiInstance instanceFeatureSetPostWithCompletionHandler:
^(SuccessResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.FeatureSetApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.instanceFeatureSetPost(callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-csharp">
<pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using SWGSDRangel.Api;
using SWGSDRangel.Client;
using SWGSDRangel.Model;
namespace Example
{
public class instanceFeatureSetPostExample
{
public void main()
{
var apiInstance = new FeatureSetApi();
try
{
SuccessResponse result = apiInstance.instanceFeatureSetPost();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling FeatureSetApi.instanceFeatureSetPost: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FeatureSetApi();
try {
$result = $api_instance->instanceFeatureSetPost();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FeatureSetApi->instanceFeatureSetPost: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::FeatureSetApi;
my $api_instance = SWGSDRangel::FeatureSetApi->new();
eval {
my $result = $api_instance->instanceFeatureSetPost();
print Dumper($result);
};
if ($@) {
warn "Exception when calling FeatureSetApi->instanceFeatureSetPost: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-python">
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_sdrangel
from swagger_sdrangel.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_sdrangel.FeatureSetApi()
try:
api_response = api_instance.instance_feature_set_post()
pprint(api_response)
except ApiException as e:
print("Exception when calling FeatureSetApi->instanceFeatureSetPost: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<h2>Responses</h2>
<h3> Status: 202 - Message to add a new feature set was sent successfully </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetPost-202-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetPost-202-schema">
<div id='responses-instanceFeatureSetPost-202-schema-202' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Message to add a new feature set was sent successfully",
"schema" : {
"$ref" : "#/definitions/SuccessResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetPost-202-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetPost-202-schema-202');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetPost-202-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 500 - Error </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetPost-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetPost-500-schema">
<div id='responses-instanceFeatureSetPost-500-schema-500' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Error",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetPost-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetPost-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetPost-500-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 501 - Function not implemented </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetPost-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetPost-501-schema">
<div id='responses-instanceFeatureSetPost-501-schema-501' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Function not implemented",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetPost-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetPost-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetPost-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
</section>
<section id="api-Instance">
<h1>Instance</h1>
@ -47005,7 +47724,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-07-12T19:39:02.669+02:00
Generated 2021-08-21T12:00:48.492+02:00
</div>
</div>
</div>

View File

@ -1873,6 +1873,41 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset:
x-swagger-router-controller: instance
post:
description: Add (append) a new feature set
operationId: instanceFeatureSetPost
tags:
- FeatureSet
responses:
"202":
description: Message to add a new feature set was sent successfully
schema:
$ref: "#/definitions/SuccessResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
delete:
description: Remove last feature set. The GUI version does not remove the first feature set.
operationId: instanceFeatureSetDelete
tags:
- FeatureSet
responses:
"202":
description: Message to remove last feature set was sent successfully
schema:
$ref: "#/definitions/SuccessResponse"
"404":
description: "No more feature sets to be deleted"
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}:
x-swagger-router-controller: featureset
get:

View File

@ -1427,6 +1427,28 @@ int WebAPIAdapter::instanceDeviceSetDelete(
}
}
int WebAPIAdapter::instanceFeatureSetPost(
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error)
{
(void) response;
error.init();
*error.getMessage() = "Not implemented";
return 501;
}
int WebAPIAdapter::instanceFeatureSetDelete(
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error)
{
(void) response;
error.init();
*error.getMessage() = "Not implemented";
return 501;
}
int WebAPIAdapter::devicesetGet(
int deviceSetIndex,
SWGSDRangel::SWGDeviceSet& response,

View File

@ -208,6 +208,14 @@ public:
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error);
virtual int instanceFeatureSetPost(
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error);
virtual int instanceFeatureSetDelete(
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error);
virtual int devicesetGet(
int deviceSetIndex,
SWGSDRangel::SWGDeviceSet& response,

View File

@ -41,6 +41,8 @@ QString WebAPIAdapterInterface::instancePresetURL = "/sdrangel/preset";
QString WebAPIAdapterInterface::instancePresetFileURL = "/sdrangel/preset/file";
QString WebAPIAdapterInterface::instanceDeviceSetsURL = "/sdrangel/devicesets";
QString WebAPIAdapterInterface::instanceDeviceSetURL = "/sdrangel/deviceset";
QString WebAPIAdapterInterface::instanceFeatureSetsURL = "/sdrangel/featuresets";
QString WebAPIAdapterInterface::instanceFeatureSetURL = "/sdrangel/featureset";
std::regex WebAPIAdapterInterface::devicesetURLRe("^/sdrangel/deviceset/([0-9]{1,2})$");
std::regex WebAPIAdapterInterface::devicesetFocusURLRe("^/sdrangel/deviceset/([0-9]{1,2})/focus$");

View File

@ -678,6 +678,48 @@ public:
return 501;
}
/**
* Handler of /sdrangel/featurets (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels
* returns the Http status code (default 501: not implemented)
*/
virtual int instanceFeatureSetsGet(
SWGSDRangel::SWGFeatureSetList& response,
SWGSDRangel::SWGErrorResponse& error)
{
(void) response;
error.init();
*error.getMessage() = QString("Function not implemented");
return 501;
}
/**
* Handler of /sdrangel/featureset (POST) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels
* returns the Http status code (default 501: not implemented)
*/
virtual int instanceFeatureSetPost(
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error)
{
(void) response;
error.init();
*error.getMessage() = QString("Function not implemented");
return 501;
}
/**
* Handler of /sdrangel/deviceset (DELETE) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels
* returns the Http status code (default 501: not implemented)
*/
virtual int instanceFeatureSetDelete(
SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error)
{
(void) response;
error.init();
*error.getMessage() = QString("Function not implemented");
return 501;
}
/**
* Handler of /sdrangel/deviceset/{devicesetIndex} (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels
* returns the Http status code (default 501: not implemented)
@ -1333,6 +1375,8 @@ public:
static QString instancePresetFileURL;
static QString instanceDeviceSetsURL;
static QString instanceDeviceSetURL;
static QString instanceFeatureSetsURL;
static QString instanceFeatureSetURL;
static std::regex devicesetURLRe;
static std::regex devicesetFocusURLRe;
static std::regex devicesetSpectrumSettingsURLRe;

View File

@ -151,6 +151,10 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http
instanceDeviceSetsService(request, response);
} else if (path == WebAPIAdapterInterface::instanceDeviceSetURL) {
instanceDeviceSetService(request, response);
} else if (path == WebAPIAdapterInterface::instanceFeatureSetsURL) {
instanceFeatureSetsService(request, response);
} else if (path == WebAPIAdapterInterface::instanceFeatureSetURL) {
instanceFeatureSetService(request, response);
}
else
{
@ -1360,6 +1364,33 @@ void WebAPIRequestMapper::instanceDeviceSetsService(qtwebapp::HttpRequest& reque
}
}
void WebAPIRequestMapper::instanceFeatureSetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
{
SWGSDRangel::SWGErrorResponse errorResponse;
response.setHeader("Content-Type", "application/json");
response.setHeader("Access-Control-Allow-Origin", "*");
if (request.getMethod() == "GET")
{
SWGSDRangel::SWGFeatureSetList normalResponse;
int status = m_adapter->instanceFeatureSetsGet(normalResponse, errorResponse);
response.setStatus(status);
if (status/100 == 2) {
response.write(normalResponse.asJson().toUtf8());
} else {
response.write(errorResponse.asJson().toUtf8());
}
}
else
{
response.setStatus(405,"Invalid HTTP method");
errorResponse.init();
*errorResponse.getMessage() = "Invalid HTTP method";
response.write(errorResponse.asJson().toUtf8());
}
}
void WebAPIRequestMapper::instanceDeviceSetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
{
SWGSDRangel::SWGErrorResponse errorResponse;
@ -1411,6 +1442,46 @@ void WebAPIRequestMapper::instanceDeviceSetService(qtwebapp::HttpRequest& reques
}
}
void WebAPIRequestMapper::instanceFeatureSetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
{
SWGSDRangel::SWGErrorResponse errorResponse;
response.setHeader("Content-Type", "application/json");
response.setHeader("Access-Control-Allow-Origin", "*");
if (request.getMethod() == "POST")
{
SWGSDRangel::SWGSuccessResponse normalResponse;
int status = m_adapter->instanceFeatureSetPost(normalResponse, errorResponse);
response.setStatus(status);
if (status/100 == 2) {
response.write(normalResponse.asJson().toUtf8());
} else {
response.write(errorResponse.asJson().toUtf8());
}
}
else if (request.getMethod() == "DELETE")
{
SWGSDRangel::SWGSuccessResponse normalResponse;
int status = m_adapter->instanceFeatureSetDelete(normalResponse, errorResponse);
response.setStatus(status);
if (status/100 == 2) {
response.write(normalResponse.asJson().toUtf8());
} else {
response.write(errorResponse.asJson().toUtf8());
}
}
else
{
response.setStatus(405,"Invalid HTTP method");
errorResponse.init();
*errorResponse.getMessage() = "Invalid HTTP method";
response.write(errorResponse.asJson().toUtf8());
}
}
void WebAPIRequestMapper::devicesetService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
{
SWGSDRangel::SWGErrorResponse errorResponse;

View File

@ -77,6 +77,8 @@ private:
void instancePresetFileService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceDeviceSetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceDeviceSetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceFeatureSetsService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void instanceFeatureSetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void devicesetService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
void devicesetFocusService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);

View File

@ -1873,6 +1873,41 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset:
x-swagger-router-controller: instance
post:
description: Add (append) a new feature set
operationId: instanceFeatureSetPost
tags:
- FeatureSet
responses:
"202":
description: Message to add a new feature set was sent successfully
schema:
$ref: "#/definitions/SuccessResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
delete:
description: Remove last feature set. The GUI version does not remove the first feature set.
operationId: instanceFeatureSetDelete
tags:
- FeatureSet
responses:
"202":
description: Message to remove last feature set was sent successfully
schema:
$ref: "#/definitions/SuccessResponse"
"404":
description: "No more feature sets to be deleted"
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}:
x-swagger-router-controller: featureset
get:

View File

@ -12522,6 +12522,12 @@ margin-bottom: 20px;
<li data-group="FeatureSet" data-name="featuresetGet" class="">
<a href="#api-FeatureSet-featuresetGet">featuresetGet</a>
</li>
<li data-group="FeatureSet" data-name="instanceFeatureSetDelete" class="">
<a href="#api-FeatureSet-instanceFeatureSetDelete">instanceFeatureSetDelete</a>
</li>
<li data-group="FeatureSet" data-name="instanceFeatureSetPost" class="">
<a href="#api-FeatureSet-instanceFeatureSetPost">instanceFeatureSetPost</a>
</li>
<li class="nav-header" data-group="Instance"><a href="#api-Instance">API Methods - Instance</a></li>
<li data-group="Instance" data-name="instanceAMBEDevicesDelete" class="">
<a href="#api-Instance-instanceAMBEDevicesDelete">instanceAMBEDevicesDelete</a>
@ -32547,6 +32553,719 @@ except ApiException as e:
</article>
</div>
<hr>
<div id="api-FeatureSet-instanceFeatureSetDelete">
<article id="api-FeatureSet-instanceFeatureSetDelete-0" data-group="User" data-name="instanceFeatureSetDelete" data-version="0">
<div class="pull-left">
<h1>instanceFeatureSetDelete</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">Remove last feature set. The GUI version does not remove the first feature set.</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="delete"><code><span class="pln">/sdrangel/featureset</span></code></pre>
<p>
<h3>Usage and SDK Samples</h3>
</p>
<ul class="nav nav-tabs nav-tabs-examples">
<li class="active"><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-curl">Curl</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-java">Java</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-android">Android</a></li>
<!--<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-csharp">C#</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-php">PHP</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-perl">Perl</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetDelete-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-FeatureSet-instanceFeatureSetDelete-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X DELETE "http://localhost/sdrangel/featureset"</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-java">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
import SWGSDRangel.auth.*;
import SWGSDRangel.model.*;
import SWGSDRangel.api.FeatureSetApi;
import java.io.File;
import java.util.*;
public class FeatureSetApiExample {
public static void main(String[] args) {
FeatureSetApi apiInstance = new FeatureSetApi();
try {
SuccessResponse result = apiInstance.instanceFeatureSetDelete();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureSetApi#instanceFeatureSetDelete");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-android">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.FeatureSetApi;
public class FeatureSetApiExample {
public static void main(String[] args) {
FeatureSetApi apiInstance = new FeatureSetApi();
try {
SuccessResponse result = apiInstance.instanceFeatureSetDelete();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureSetApi#instanceFeatureSetDelete");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-objc">
<pre class="prettyprint"><code class="language-cpp">
FeatureSetApi *apiInstance = [[FeatureSetApi alloc] init];
[apiInstance instanceFeatureSetDeleteWithCompletionHandler:
^(SuccessResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.FeatureSetApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.instanceFeatureSetDelete(callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-csharp">
<pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using SWGSDRangel.Api;
using SWGSDRangel.Client;
using SWGSDRangel.Model;
namespace Example
{
public class instanceFeatureSetDeleteExample
{
public void main()
{
var apiInstance = new FeatureSetApi();
try
{
SuccessResponse result = apiInstance.instanceFeatureSetDelete();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling FeatureSetApi.instanceFeatureSetDelete: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FeatureSetApi();
try {
$result = $api_instance->instanceFeatureSetDelete();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FeatureSetApi->instanceFeatureSetDelete: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::FeatureSetApi;
my $api_instance = SWGSDRangel::FeatureSetApi->new();
eval {
my $result = $api_instance->instanceFeatureSetDelete();
print Dumper($result);
};
if ($@) {
warn "Exception when calling FeatureSetApi->instanceFeatureSetDelete: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetDelete-0-python">
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_sdrangel
from swagger_sdrangel.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_sdrangel.FeatureSetApi()
try:
api_response = api_instance.instance_feature_set_delete()
pprint(api_response)
except ApiException as e:
print("Exception when calling FeatureSetApi->instanceFeatureSetDelete: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<h2>Responses</h2>
<h3> Status: 202 - Message to remove last feature set was sent successfully </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetDelete-202-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetDelete-202-schema">
<div id='responses-instanceFeatureSetDelete-202-schema-202' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Message to remove last feature set was sent successfully",
"schema" : {
"$ref" : "#/definitions/SuccessResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetDelete-202-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetDelete-202-schema-202');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetDelete-202-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 404 - No more feature sets to be deleted </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetDelete-404-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetDelete-404-schema">
<div id='responses-instanceFeatureSetDelete-404-schema-404' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "No more feature sets to be deleted",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetDelete-404-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetDelete-404-schema-404');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetDelete-404-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 500 - Error </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetDelete-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetDelete-500-schema">
<div id='responses-instanceFeatureSetDelete-500-schema-500' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Error",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetDelete-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetDelete-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetDelete-500-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 501 - Function not implemented </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetDelete-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetDelete-501-schema">
<div id='responses-instanceFeatureSetDelete-501-schema-501' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Function not implemented",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetDelete-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetDelete-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetDelete-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
<div id="api-FeatureSet-instanceFeatureSetPost">
<article id="api-FeatureSet-instanceFeatureSetPost-0" data-group="User" data-name="instanceFeatureSetPost" data-version="0">
<div class="pull-left">
<h1>instanceFeatureSetPost</h1>
<p></p>
</div>
<div class="pull-right"></div>
<div class="clearfix"></div>
<p></p>
<p class="marked">Add (append) a new feature set</p>
<p></p>
<br />
<pre class="prettyprint language-html prettyprinted" data-type="post"><code><span class="pln">/sdrangel/featureset</span></code></pre>
<p>
<h3>Usage and SDK Samples</h3>
</p>
<ul class="nav nav-tabs nav-tabs-examples">
<li class="active"><a href="#examples-FeatureSet-instanceFeatureSetPost-0-curl">Curl</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-java">Java</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-android">Android</a></li>
<!--<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-groovy">Groovy</a></li>-->
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-objc">Obj-C</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-javascript">JavaScript</a></li>
<!--<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-angular">Angular</a></li>-->
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-csharp">C#</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-php">PHP</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-perl">Perl</a></li>
<li class=""><a href="#examples-FeatureSet-instanceFeatureSetPost-0-python">Python</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="examples-FeatureSet-instanceFeatureSetPost-0-curl">
<pre class="prettyprint"><code class="language-bsh">curl -X POST "http://localhost/sdrangel/featureset"</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-java">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
import SWGSDRangel.auth.*;
import SWGSDRangel.model.*;
import SWGSDRangel.api.FeatureSetApi;
import java.io.File;
import java.util.*;
public class FeatureSetApiExample {
public static void main(String[] args) {
FeatureSetApi apiInstance = new FeatureSetApi();
try {
SuccessResponse result = apiInstance.instanceFeatureSetPost();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureSetApi#instanceFeatureSetPost");
e.printStackTrace();
}
}
}</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-android">
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.FeatureSetApi;
public class FeatureSetApiExample {
public static void main(String[] args) {
FeatureSetApi apiInstance = new FeatureSetApi();
try {
SuccessResponse result = apiInstance.instanceFeatureSetPost();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FeatureSetApi#instanceFeatureSetPost");
e.printStackTrace();
}
}
}</code></pre>
</div>
<!--
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-groovy">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div> -->
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-objc">
<pre class="prettyprint"><code class="language-cpp">
FeatureSetApi *apiInstance = [[FeatureSetApi alloc] init];
[apiInstance instanceFeatureSetPostWithCompletionHandler:
^(SuccessResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-javascript">
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
var api = new SdRangel.FeatureSetApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.instanceFeatureSetPost(callback);
</code></pre>
</div>
<!--<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-angular">
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
</div>-->
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-csharp">
<pre class="prettyprint"><code class="language-cs">using System;
using System.Diagnostics;
using SWGSDRangel.Api;
using SWGSDRangel.Client;
using SWGSDRangel.Model;
namespace Example
{
public class instanceFeatureSetPostExample
{
public void main()
{
var apiInstance = new FeatureSetApi();
try
{
SuccessResponse result = apiInstance.instanceFeatureSetPost();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling FeatureSetApi.instanceFeatureSetPost: " + e.Message );
}
}
}
}
</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-php">
<pre class="prettyprint"><code class="language-php"><&#63;php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FeatureSetApi();
try {
$result = $api_instance->instanceFeatureSetPost();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FeatureSetApi->instanceFeatureSetPost: ', $e->getMessage(), PHP_EOL;
}
?></code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-perl">
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
use SWGSDRangel::Configuration;
use SWGSDRangel::FeatureSetApi;
my $api_instance = SWGSDRangel::FeatureSetApi->new();
eval {
my $result = $api_instance->instanceFeatureSetPost();
print Dumper($result);
};
if ($@) {
warn "Exception when calling FeatureSetApi->instanceFeatureSetPost: $@\n";
}</code></pre>
</div>
<div class="tab-pane" id="examples-FeatureSet-instanceFeatureSetPost-0-python">
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
import time
import swagger_sdrangel
from swagger_sdrangel.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_sdrangel.FeatureSetApi()
try:
api_response = api_instance.instance_feature_set_post()
pprint(api_response)
except ApiException as e:
print("Exception when calling FeatureSetApi->instanceFeatureSetPost: %s\n" % e)</code></pre>
</div>
</div>
<h2>Parameters</h2>
<h2>Responses</h2>
<h3> Status: 202 - Message to add a new feature set was sent successfully </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetPost-202-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetPost-202-schema">
<div id='responses-instanceFeatureSetPost-202-schema-202' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Message to add a new feature set was sent successfully",
"schema" : {
"$ref" : "#/definitions/SuccessResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetPost-202-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetPost-202-schema-202');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetPost-202-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 500 - Error </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetPost-500-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetPost-500-schema">
<div id='responses-instanceFeatureSetPost-500-schema-500' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Error",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetPost-500-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetPost-500-schema-500');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetPost-500-schema-data' type='hidden' value=''></input>
</div>
</div>
<h3> Status: 501 - Function not implemented </h3>
<ul class="nav nav-tabs nav-tabs-examples" >
<li class="active">
<a data-toggle="tab" href="#responses-instanceFeatureSetPost-501-schema">Schema</a>
</li>
</ul>
<div class="tab-content" style='margin-bottom: 10px;'>
<div class="tab-pane active" id="responses-instanceFeatureSetPost-501-schema">
<div id='responses-instanceFeatureSetPost-501-schema-501' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
<script>
$(document).ready(function() {
var schemaWrapper = {
"description" : "Function not implemented",
"schema" : {
"$ref" : "#/definitions/ErrorResponse"
}
};
var schema = schemaWrapper.schema;
if (schema.$ref != null) {
schema = defsParser.$refs.get(schema.$ref);
} else {
schemaWrapper.definitions = Object.assign({}, defs);
$RefParser.dereference(schemaWrapper).catch(function(err) {
console.log(err);
});
}
//console.log(JSON.stringify(schema));
var view = new JSONSchemaView(schema, 3);
$('#responses-instanceFeatureSetPost-501-schema-data').val(stringify(schema));
var result = $('#responses-instanceFeatureSetPost-501-schema-501');
result.empty();
result.append(view.render());
});
</script>
</div>
<input id='responses-instanceFeatureSetPost-501-schema-data' type='hidden' value=''></input>
</div>
</div>
</article>
</div>
<hr>
</section>
<section id="api-Instance">
<h1>Instance</h1>
@ -47005,7 +47724,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-07-12T19:39:02.669+02:00
Generated 2021-08-21T12:00:48.492+02:00
</div>
</div>
</div>

View File

@ -652,5 +652,109 @@ SWGFeatureSetApi::featuresetGetCallback(SWGHttpRequestWorker * worker) {
}
}
void
SWGFeatureSetApi::instanceFeatureSetDelete() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::instanceFeatureSetDeleteCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::instanceFeatureSetDeleteCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGSuccessResponse* output = static_cast<SWGSuccessResponse*>(create(json, QString("SWGSuccessResponse")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit instanceFeatureSetDeleteSignal(output);
} else {
emit instanceFeatureSetDeleteSignalE(output, error_type, error_str);
emit instanceFeatureSetDeleteSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::instanceFeatureSetPost() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::instanceFeatureSetPostCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::instanceFeatureSetPostCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGSuccessResponse* output = static_cast<SWGSuccessResponse*>(create(json, QString("SWGSuccessResponse")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit instanceFeatureSetPostSignal(output);
} else {
emit instanceFeatureSetPostSignalE(output, error_type, error_str);
emit instanceFeatureSetPostSignalEFull(worker, error_type, error_str);
}
}
}

View File

@ -50,6 +50,8 @@ public:
void featuresetFeatureSettingsGet(qint32 feature_set_index, qint32 feature_index);
void featuresetFeatureSettingsPatch(qint32 feature_set_index, qint32 feature_index, SWGFeatureSettings& body);
void featuresetGet(qint32 feature_set_index);
void instanceFeatureSetDelete();
void instanceFeatureSetPost();
private:
void featuresetFEatureSettingsPutCallback (SWGHttpRequestWorker * worker);
@ -63,6 +65,8 @@ private:
void featuresetFeatureSettingsGetCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureSettingsPatchCallback (SWGHttpRequestWorker * worker);
void featuresetGetCallback (SWGHttpRequestWorker * worker);
void instanceFeatureSetDeleteCallback (SWGHttpRequestWorker * worker);
void instanceFeatureSetPostCallback (SWGHttpRequestWorker * worker);
signals:
void featuresetFEatureSettingsPutSignal(SWGFeatureSettings* summary);
@ -76,6 +80,8 @@ signals:
void featuresetFeatureSettingsGetSignal(SWGFeatureSettings* summary);
void featuresetFeatureSettingsPatchSignal(SWGFeatureSettings* summary);
void featuresetGetSignal(SWGFeatureSet* summary);
void instanceFeatureSetDeleteSignal(SWGSuccessResponse* summary);
void instanceFeatureSetPostSignal(SWGSuccessResponse* summary);
void featuresetFEatureSettingsPutSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureActionsPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
@ -88,6 +94,8 @@ signals:
void featuresetFeatureSettingsGetSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureSettingsPatchSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetGetSignalE(SWGFeatureSet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeatureSetDeleteSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeatureSetPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFEatureSettingsPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureActionsPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
@ -100,6 +108,8 @@ signals:
void featuresetFeatureSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeatureSetDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeatureSetPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
};