mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-14 15:33:34 -04:00
API: added /sdrangel/features (GET) to get the list of available feature plugins
This commit is contained in:
@@ -4808,6 +4808,32 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "Represents a FeatureSetPreset::FeatureConfig object"
|
||||
};
|
||||
defs.FeatureListItem = {
|
||||
"required" : [ "id" ],
|
||||
"properties" : {
|
||||
"name" : {
|
||||
"type" : "string",
|
||||
"description" : "Displayable name of the feature plugin"
|
||||
},
|
||||
"idURI" : {
|
||||
"type" : "string",
|
||||
"description" : "Key to identify the feature plugin type in URI form"
|
||||
},
|
||||
"id" : {
|
||||
"type" : "string",
|
||||
"description" : "Key to identify the feature plugin type as short object name"
|
||||
},
|
||||
"version" : {
|
||||
"type" : "string",
|
||||
"description" : "Feature plugin version number"
|
||||
},
|
||||
"index" : {
|
||||
"type" : "integer",
|
||||
"description" : "Index of the feature in the list of registered channels"
|
||||
}
|
||||
},
|
||||
"description" : "Summarized information about feature plugin"
|
||||
};
|
||||
defs.FeatureReport = {
|
||||
"required" : [ "featureType" ],
|
||||
@@ -6061,6 +6087,22 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "Summarized information about logical devices from hardware devices attached to this SDRangel instance"
|
||||
};
|
||||
defs.InstanceFeaturesResponse = {
|
||||
"required" : [ "featurecount" ],
|
||||
"properties" : {
|
||||
"featurecount" : {
|
||||
"type" : "integer",
|
||||
"description" : "Number of plugins available"
|
||||
},
|
||||
"features" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"$ref" : "#/definitions/FeatureListItem"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "Summarized information about feature plugins available in this SDRangel instance"
|
||||
};
|
||||
defs.InstanceSummaryResponse = {
|
||||
"required" : [ "appname", "architecture", "devicesetlist", "dspRxBits", "dspTxBits", "os", "pid", "qtVersion", "version" ],
|
||||
@@ -12593,6 +12635,9 @@ margin-bottom: 20px;
|
||||
<li data-group="Instance" data-name="instanceFeatureSetsGet" class="">
|
||||
<a href="#api-Instance-instanceFeatureSetsGet">instanceFeatureSetsGet</a>
|
||||
</li>
|
||||
<li data-group="Instance" data-name="instanceFeatures" class="">
|
||||
<a href="#api-Instance-instanceFeatures">instanceFeatures</a>
|
||||
</li>
|
||||
<li data-group="Instance" data-name="instanceLimeRFEConfigGet" class="">
|
||||
<a href="#api-Instance-instanceLimeRFEConfigGet">instanceLimeRFEConfigGet</a>
|
||||
</li>
|
||||
@@ -40680,6 +40725,341 @@ except ApiException as e:
|
||||
</article>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="api-Instance-instanceFeatures">
|
||||
<article id="api-Instance-instanceFeatures-0" data-group="User" data-name="instanceFeatures" data-version="0">
|
||||
<div class="pull-left">
|
||||
<h1>instanceFeatures</h1>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="pull-right"></div>
|
||||
<div class="clearfix"></div>
|
||||
<p></p>
|
||||
<p class="marked">Get a list of feature plugins available in this instance</p>
|
||||
<p></p>
|
||||
<br />
|
||||
<pre class="prettyprint language-html prettyprinted" data-type="get"><code><span class="pln">/sdrangel/features</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-Instance-instanceFeatures-0-curl">Curl</a></li>
|
||||
<li class=""><a href="#examples-Instance-instanceFeatures-0-java">Java</a></li>
|
||||
<li class=""><a href="#examples-Instance-instanceFeatures-0-android">Android</a></li>
|
||||
<!--<li class=""><a href="#examples-Instance-instanceFeatures-0-groovy">Groovy</a></li>-->
|
||||
<li class=""><a href="#examples-Instance-instanceFeatures-0-objc">Obj-C</a></li>
|
||||
<li class=""><a href="#examples-Instance-instanceFeatures-0-javascript">JavaScript</a></li>
|
||||
<!--<li class=""><a href="#examples-Instance-instanceFeatures-0-angular">Angular</a></li>-->
|
||||
<li class=""><a href="#examples-Instance-instanceFeatures-0-csharp">C#</a></li>
|
||||
<li class=""><a href="#examples-Instance-instanceFeatures-0-php">PHP</a></li>
|
||||
<li class=""><a href="#examples-Instance-instanceFeatures-0-perl">Perl</a></li>
|
||||
<li class=""><a href="#examples-Instance-instanceFeatures-0-python">Python</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="examples-Instance-instanceFeatures-0-curl">
|
||||
<pre class="prettyprint"><code class="language-bsh">curl -X GET "http://localhost/sdrangel/features"</code></pre>
|
||||
</div>
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-0-java">
|
||||
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
|
||||
import SWGSDRangel.auth.*;
|
||||
import SWGSDRangel.model.*;
|
||||
import SWGSDRangel.api.InstanceApi;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
public class InstanceApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
InstanceApi apiInstance = new InstanceApi();
|
||||
try {
|
||||
InstanceFeaturesResponse result = apiInstance.instanceFeatures();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling InstanceApi#instanceFeatures");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-0-android">
|
||||
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.InstanceApi;
|
||||
|
||||
public class InstanceApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
InstanceApi apiInstance = new InstanceApi();
|
||||
try {
|
||||
InstanceFeaturesResponse result = apiInstance.instanceFeatures();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling InstanceApi#instanceFeatures");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
<!--
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-0-groovy">
|
||||
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
|
||||
</div> -->
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-0-objc">
|
||||
<pre class="prettyprint"><code class="language-cpp">
|
||||
InstanceApi *apiInstance = [[InstanceApi alloc] init];
|
||||
|
||||
[apiInstance instanceFeaturesWithCompletionHandler:
|
||||
^(InstanceFeaturesResponse output, NSError* error) {
|
||||
if (output) {
|
||||
NSLog(@"%@", output);
|
||||
}
|
||||
if (error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}
|
||||
}];
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-0-javascript">
|
||||
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
|
||||
|
||||
var api = new SdRangel.InstanceApi()
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
api.instanceFeatures(callback);
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<!--<div class="tab-pane" id="examples-Instance-instanceFeatures-0-angular">
|
||||
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
|
||||
</div>-->
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-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 instanceFeaturesExample
|
||||
{
|
||||
public void main()
|
||||
{
|
||||
|
||||
var apiInstance = new InstanceApi();
|
||||
|
||||
try
|
||||
{
|
||||
InstanceFeaturesResponse result = apiInstance.instanceFeatures();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print("Exception when calling InstanceApi.instanceFeatures: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-0-php">
|
||||
<pre class="prettyprint"><code class="language-php"><?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\InstanceApi();
|
||||
|
||||
try {
|
||||
$result = $api_instance->instanceFeatures();
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling InstanceApi->instanceFeatures: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
?></code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-0-perl">
|
||||
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
|
||||
use SWGSDRangel::Configuration;
|
||||
use SWGSDRangel::InstanceApi;
|
||||
|
||||
my $api_instance = SWGSDRangel::InstanceApi->new();
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->instanceFeatures();
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling InstanceApi->instanceFeatures: $@\n";
|
||||
}</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-Instance-instanceFeatures-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.InstanceApi()
|
||||
|
||||
try:
|
||||
api_response = api_instance.instance_features()
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print("Exception when calling InstanceApi->instanceFeatures: %s\n" % e)</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Parameters</h2>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Responses</h2>
|
||||
<h3> Status: 200 - Success </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-instanceFeatures-200-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-instanceFeatures-200-schema">
|
||||
<div id='responses-instanceFeatures-200-schema-200' 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" : "Success",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/InstanceFeaturesResponse"
|
||||
}
|
||||
};
|
||||
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-instanceFeatures-200-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-instanceFeatures-200-schema-200');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-instanceFeatures-200-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-instanceFeatures-500-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-instanceFeatures-500-schema">
|
||||
<div id='responses-instanceFeatures-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-instanceFeatures-500-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-instanceFeatures-500-schema-500');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-instanceFeatures-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-instanceFeatures-501-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-instanceFeatures-501-schema">
|
||||
<div id='responses-instanceFeatures-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-instanceFeatures-501-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-instanceFeatures-501-schema-501');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-instanceFeatures-501-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="api-Instance-instanceLimeRFEConfigGet">
|
||||
<article id="api-Instance-instanceLimeRFEConfigGet-0" data-group="User" data-name="instanceLimeRFEConfigGet" data-version="0">
|
||||
<div class="pull-left">
|
||||
@@ -47728,7 +48108,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2021-08-25T15:15:18.832+02:00
|
||||
Generated 2021-08-28T23:40:46.879+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user