assetsRegisterFile
Register asset against a file
Publishes file-asset info on the Żetonium blockchain. The file is stored in a special container called a Vault. > Using this call will charge the calling account **12 Żetons** (12,000,000 Leos) for utilizing computational resources. Errors will be thrown if this balance is not held by the publisher's account.
/assets/register/file
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://34.69.151.182:8080/api/assets/register/file"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AssetsApi;
import java.io.File;
import java.util.*;
public class AssetsApiExample {
public static void main(String[] args) {
AssetsApi apiInstance = new AssetsApi();
Register_file_body body = ; // Register_file_body |
try {
array['Integer'] result = apiInstance.assetsRegisterFile(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AssetsApi#assetsRegisterFile");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AssetsApi;
public class AssetsApiExample {
public static void main(String[] args) {
AssetsApi apiInstance = new AssetsApi();
Register_file_body body = ; // Register_file_body |
try {
array['Integer'] result = apiInstance.assetsRegisterFile(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AssetsApi#assetsRegisterFile");
e.printStackTrace();
}
}
}
Register_file_body *body = ; // (optional)
AssetsApi *apiInstance = [[AssetsApi alloc] init];
// Register asset against a file
[apiInstance assetsRegisterFileWith:body
completionHandler: ^(array['Integer'] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ThePersonalDigitalSpacesApi = require('the_personal_digital_spaces_api');
var api = new ThePersonalDigitalSpacesApi.AssetsApi()
var opts = {
'body': // {{Register_file_body}}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.assetsRegisterFile(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class assetsRegisterFileExample
{
public void main()
{
var apiInstance = new AssetsApi();
var body = new Register_file_body(); // Register_file_body | (optional)
try
{
// Register asset against a file
array['Integer'] result = apiInstance.assetsRegisterFile(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AssetsApi.assetsRegisterFile: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAssetsApi();
$body = ; // Register_file_body |
try {
$result = $api_instance->assetsRegisterFile($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssetsApi->assetsRegisterFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AssetsApi;
my $api_instance = WWW::SwaggerClient::AssetsApi->new();
my $body = WWW::SwaggerClient::Object::Register_file_body->new(); # Register_file_body |
eval {
my $result = $api_instance->assetsRegisterFile(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AssetsApi->assetsRegisterFile: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AssetsApi()
body = # Register_file_body | (optional)
try:
# Register asset against a file
api_response = api_instance.assets_register_file(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AssetsApi->assetsRegisterFile: %s\n" % e)
Parameters
Name | Description |
---|---|
body |