swagger_client
SwaggerClient - the Ruby gem for the Estuary API
This is the API for the Estuary application.
This SDK is automatically generated by the Swagger Codegen project:
- API version: 0.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen For more information, please visit https://docs.estuary.tech/feedback
Installation
Build a gem
To build the Ruby code into a gem:
gem build swagger_client.gemspec
Then either install the gem locally:
gem install ./swagger_client-1.0.0.gem
(for development, run gem install --dev ./swagger_client-1.0.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'swagger_client', '~> 1.0.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'swagger_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'swagger_client'
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AdminApi.new
body = [true] # Array<BOOLEAN> | Peer ids
begin
#Remove peers on Peering Service
result = api_instance.admin_peering_peers_delete(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AdminApi->admin_peering_peers_delete: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AdminApi.new
begin
#List all Peering peers
result = api_instance.admin_peering_peers_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AdminApi->admin_peering_peers_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AdminApi.new
begin
#Add peers on Peering Service
result = api_instance.admin_peering_peers_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AdminApi->admin_peering_peers_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AdminApi.new
begin
#Start Peering
result = api_instance.admin_peering_start_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AdminApi->admin_peering_start_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AdminApi.new
begin
#Check Peering Status
result = api_instance.admin_peering_status_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AdminApi->admin_peering_status_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AdminApi.new
begin
#Stop Peering
result = api_instance.admin_peering_stop_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AdminApi->admin_peering_stop_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AdminApi.new
begin
#Get systems(estuary/shuttle) config
result = api_instance.admin_system_config_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AdminApi->admin_system_config_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AdminApi.new
begin
#Get all users
result = api_instance.admin_users_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AdminApi->admin_users_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AutoretrieveApi.new
addresses = 'addresses_example' # String |
pub_key = 'pub_key_example' # String |
begin
#Register autoretrieve server
result = api_instance.admin_autoretrieve_init_post(addresses, pub_key)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AutoretrieveApi->admin_autoretrieve_init_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AutoretrieveApi.new
begin
#List autoretrieve servers
result = api_instance.admin_autoretrieve_list_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AutoretrieveApi->admin_autoretrieve_list_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::AutoretrieveApi.new
token = 'token_example' # String | Autoretrieve's auth token
begin
#Marks autoretrieve server as up
result = api_instance.autoretrieve_heartbeat_post(token)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling AutoretrieveApi->autoretrieve_heartbeat_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::CollectionsApi.new
coluuid = 'coluuid_example' # String | coluuid
begin
#Produce a CID of the collection contents
result = api_instance.collections_coluuid_commit_post(coluuid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_commit_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::CollectionsApi.new
body = SwaggerClient::MainDeleteContentFromCollectionBody.new # MainDeleteContentFromCollectionBody | Variable to use when filtering for files (must be either 'path' or 'content_id')
coluuid = 'coluuid_example' # String | Collection ID
contentid = 'contentid_example' # String | Content ID
begin
#Deletes a content from a collection
result = api_instance.collections_coluuid_contents_delete(body, coluuid, contentid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_contents_delete: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::CollectionsApi.new
coluuid = 'coluuid_example' # String | Collection ID
begin
#Deletes a collection
result = api_instance.collections_coluuid_delete(coluuid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_delete: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::CollectionsApi.new
coluuid = 'coluuid_example' # String | coluuid
opts = {
dir: 'dir_example' # String | Directory
}
begin
#Get contents in a collection
result = api_instance.collections_coluuid_get(coluuid, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::CollectionsApi.new
body = [56] # Array<Integer> | Content IDs to add to collection
coluuid = 'coluuid_example' # String | Collection UUID
begin
#Add contents to a collection
result = api_instance.collections_coluuid_post(body, coluuid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_coluuid_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::CollectionsApi.new
coluuid = 'coluuid_example' # String | Collection ID
content = 'content_example' # String | Content
path = 'path_example' # String | Path to file
begin
#Add a file to a collection
result = api_instance.collections_fs_add_post(coluuid, content, path)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_fs_add_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::CollectionsApi.new
begin
#List all collections
result = api_instance.collections_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::CollectionsApi.new
body = SwaggerClient::MainCreateCollectionBody.new # MainCreateCollectionBody | Collection name and description
begin
#Create a new collection
result = api_instance.collections_post(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling CollectionsApi->collections_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
begin
#Get Estuary invites
result = api_instance.admin_invites_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->admin_invites_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
code = 'code_example' # String | Invite code to be created
begin
#Create an Estuary invite
result = api_instance.admin_invites_post(code)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->admin_invites_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
body = 'body_example' # String | Car
opts = {
ignore_dupes: 'ignore_dupes_example', # String | Ignore Dupes
filename: 'filename_example' # String | Filename
}
begin
#Add Car object
result = api_instance.content_add_car_post(body, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_add_car_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
body = SwaggerClient::UtilContentAddIpfsBody.new # UtilContentAddIpfsBody | IPFS Body
opts = {
ignore_dupes: 'ignore_dupes_example' # String | Ignore Dupes
}
begin
#Add IPFS object
result = api_instance.content_add_ipfs_post(body, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_add_ipfs_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
data = 'data_example' # String |
filename = 'filename_example' # String |
opts = {
coluuid: 'coluuid_example', # String | Collection UUID
replication: 56, # Integer | Replication value
ignore_dupes: 'ignore_dupes_example', # String | Ignore Dupes true/false
lazy_provide: 'lazy_provide_example', # String | Lazy Provide true/false
dir: 'dir_example' # String | Directory
}
begin
#Add new content
result = api_instance.content_add_post(data, filename, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_add_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
content = 'content_example' # String | Content ID
begin
#Get aggregated content stats
result = api_instance.content_aggregated_content_get(content)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_aggregated_content_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
_begin = '_begin_example' # String | Begin
duration = 'duration_example' # String | Duration
all = 'all_example' # String | All
begin
#Get all deals for a user
result = api_instance.content_all_deals_get(_begin, duration, all)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_all_deals_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
content = 'content_example' # String | Content ID
begin
#Get content bandwidth
result = api_instance.content_bw_usage_content_get(content)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_bw_usage_content_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
body = SwaggerClient::UtilContentCreateBody.new # UtilContentCreateBody | Content
opts = {
ignore_dupes: 'ignore_dupes_example' # String | Ignore Dupes
}
begin
#Add a new content
result = api_instance.content_create_post(body, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_create_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
opts = {
limit: 56, # Integer | Limit
offset: 56 # Integer | Offset
}
begin
#Content with deals
result = api_instance.content_deals_get(opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_deals_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
datacid = 'datacid_example' # String | Data CID
begin
#Ensure Replication
result = api_instance.content_ensure_replication_datacid_get(datacid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_ensure_replication_datacid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
content = 'content_example' # String | Content ID
begin
#List all failures for a content
result = api_instance.content_failures_content_get(content)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_failures_content_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
id = 56 # Integer | Content ID
begin
#Content
result = api_instance.content_id_get(id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_id_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
body = SwaggerClient::MainImportDealBody.new # MainImportDealBody | Import a deal
begin
#Import a deal
result = api_instance.content_importdeal_post(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_importdeal_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
begin
#List all pinned content
result = api_instance.content_list_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_list_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
cont = 'cont_example' # String | CID
begin
#Read content
result = api_instance.content_read_cont_get(cont)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_read_cont_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
begin
#Get staging zone for user
result = api_instance.content_staging_zones_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_staging_zones_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
limit = 'limit_example' # String | limit
offset = 'offset_example' # String | offset
begin
#Get content statistics
result = api_instance.content_stats_get(limit, offset)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_stats_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::ContentApi.new
id = 56 # Integer | Content ID
begin
#Content Status
result = api_instance.content_status_id_get(id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling ContentApi->content_status_id_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
body = SwaggerClient::MainEstimateDealBody.new # MainEstimateDealBody | The size of the deal in bytes, the replication factor, and the duration of the deal in blocks
begin
#Estimate the cost of a deal
result = api_instance.deal_estimate_post(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deal_estimate_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
dealid = 56 # Integer | Deal ID
begin
#Get Deal Info
result = api_instance.deal_info_dealid_get(dealid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deal_info_dealid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
propcid = 'propcid_example' # String | Proposal CID
begin
#Get Proposal
result = api_instance.deal_proposal_propcid_get(propcid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deal_proposal_propcid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
miner = 'miner_example' # String | CID
begin
#Query Ask
result = api_instance.deal_query_miner_get(miner)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deal_query_miner_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
propcid = 'propcid_example' # String | PropCid
begin
#Get Deal Status by PropCid
result = api_instance.deal_status_by_proposal_propcid_get(propcid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deal_status_by_proposal_propcid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
miner = 'miner_example' # String | Miner
propcid = 'propcid_example' # String | Proposal CID
begin
#Deal Status
result = api_instance.deal_status_miner_propcid_get(miner, propcid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deal_status_miner_propcid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
begin
#Transfer In Progress
result = api_instance.deal_transfer_in_progress_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deal_transfer_in_progress_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
body = SwaggerClient::MainChannelIDParam.new # MainChannelIDParam | Channel ID
begin
#Transfer Status
result = api_instance.deal_transfer_status_post(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deal_transfer_status_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
begin
#Get storage failures for user
result = api_instance.deals_failures_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deals_failures_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
body = 'body_example' # String | Deal Request
miner = 'miner_example' # String | Miner
begin
#Make Deal
result = api_instance.deals_make_miner_post(body, miner)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deals_make_miner_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
deal = 56 # Integer | Deal ID
begin
#Get Deal Status
result = api_instance.deals_status_deal_get(deal)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->deals_status_deal_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
begin
#Get storage failures
result = api_instance.public_deals_failures_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->public_deals_failures_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::DealsApi.new
miner = 'miner_example' # String | CID
begin
#Query Ask
result = api_instance.public_miners_storage_query_miner_get(miner)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling DealsApi->public_miners_storage_query_miner_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::MetricsApi.new
begin
#Get deal metrics
result = api_instance.public_metrics_deals_on_chain_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling MetricsApi->public_metrics_deals_on_chain_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::MinerApi.new
miner = 'miner_example' # String | Filter by miner
opts = {
ignore_failed: 'ignore_failed_example' # String | Ignore Failed
}
begin
#Get all miners deals
result = api_instance.public_miners_deals_miner_get(miner, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling MinerApi->public_miners_deals_miner_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::MinerApi.new
miner = 'miner_example' # String | Filter by miner
begin
#Get miner stats
result = api_instance.public_miners_stats_miner_get(miner)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling MinerApi->public_miners_stats_miner_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::NetApi.new
begin
#Net Addrs
result = api_instance.net_addrs_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling NetApi->net_addrs_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::NetApi.new
miner = 'miner_example' # String | Filter by miner
begin
#Get all miners
result = api_instance.public_miners_failures_miner_get(miner)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling NetApi->public_miners_failures_miner_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::NetApi.new
begin
#Get all miners
result = api_instance.public_miners_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling NetApi->public_miners_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::NetApi.new
begin
#Net Addrs
result = api_instance.public_net_addrs_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling NetApi->public_net_addrs_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::NetApi.new
begin
#Net Peers
result = api_instance.public_net_peers_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling NetApi->public_net_peers_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeeringApi.new
body = [true] # Array<BOOLEAN> | Peer ids
begin
#Remove peers on Peering Service
result = api_instance.admin_peering_peers_delete(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeeringApi->admin_peering_peers_delete: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeeringApi.new
begin
#List all Peering peers
result = api_instance.admin_peering_peers_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeeringApi->admin_peering_peers_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeeringApi.new
begin
#Add peers on Peering Service
result = api_instance.admin_peering_peers_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeeringApi->admin_peering_peers_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeeringApi.new
begin
#Start Peering
result = api_instance.admin_peering_start_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeeringApi->admin_peering_start_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeeringApi.new
begin
#Check Peering Status
result = api_instance.admin_peering_status_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeeringApi->admin_peering_status_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeeringApi.new
begin
#Stop Peering
result = api_instance.admin_peering_stop_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeeringApi->admin_peering_stop_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeersApi.new
body = [true] # Array<BOOLEAN> | Peer ids
begin
#Remove peers on Peering Service
result = api_instance.admin_peering_peers_delete(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeersApi->admin_peering_peers_delete: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeersApi.new
begin
#List all Peering peers
result = api_instance.admin_peering_peers_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeersApi->admin_peering_peers_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeersApi.new
begin
#Add peers on Peering Service
result = api_instance.admin_peering_peers_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeersApi->admin_peering_peers_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeersApi.new
begin
#Start Peering
result = api_instance.admin_peering_start_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeersApi->admin_peering_start_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeersApi.new
begin
#Check Peering Status
result = api_instance.admin_peering_status_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeersApi->admin_peering_status_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PeersApi.new
begin
#Stop Peering
result = api_instance.admin_peering_stop_post
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PeersApi->admin_peering_stop_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PinningApi.new
begin
#List all pin status objects
result = api_instance.pinning_pins_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PinningApi->pinning_pins_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PinningApi.new
pinid = 'pinid_example' # String | Pin ID
begin
#Delete a pinned object
api_instance.pinning_pins_pinid_delete(pinid)
rescue SwaggerClient::ApiError => e
puts "Exception when calling PinningApi->pinning_pins_pinid_delete: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PinningApi.new
pinid = 'pinid_example' # String | cid
begin
#Get a pin status object
result = api_instance.pinning_pins_pinid_get(pinid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PinningApi->pinning_pins_pinid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PinningApi.new
pinid = 'pinid_example' # String | Pin ID
opts = {
body: 'body_example' # String | Meta information of new pin
}
begin
#Replace a pinned object
result = api_instance.pinning_pins_pinid_post(pinid, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PinningApi->pinning_pins_pinid_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PinningApi.new
body = SwaggerClient::TypesIpfsPin.new # TypesIpfsPin | Pin Body {cid:cid, name:name}
begin
#Add and pin object
result = api_instance.pinning_pins_post(body)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PinningApi->pinning_pins_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
cid = 'cid_example' # String | Cid
begin
#Get Full Content by Cid
api_instance.get_cid_get(cid)
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->get_cid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
cid = 'cid_example' # String | Cid
begin
#Get Content by Cid
result = api_instance.public_by_cid_cid_get(cid)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_by_cid_cid_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
begin
#Get public node info
result = api_instance.public_info_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_info_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
begin
#Get deal metrics
result = api_instance.public_metrics_deals_on_chain_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_metrics_deals_on_chain_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
miner = 'miner_example' # String | Filter by miner
opts = {
ignore_failed: 'ignore_failed_example' # String | Ignore Failed
}
begin
#Get all miners deals
result = api_instance.public_miners_deals_miner_get(miner, opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_miners_deals_miner_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
miner = 'miner_example' # String | Filter by miner
begin
#Get all miners
result = api_instance.public_miners_failures_miner_get(miner)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_miners_failures_miner_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
begin
#Get all miners
result = api_instance.public_miners_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_miners_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
miner = 'miner_example' # String | Filter by miner
begin
#Get miner stats
result = api_instance.public_miners_stats_miner_get(miner)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_miners_stats_miner_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
begin
#Net Addrs
result = api_instance.public_net_addrs_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_net_addrs_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
begin
#Net Peers
result = api_instance.public_net_peers_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_net_peers_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::PublicApi.new
begin
#Public stats
result = api_instance.public_stats_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling PublicApi->public_stats_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::UserApi.new
begin
#Get API keys for a user
result = api_instance.user_api_keys_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling UserApi->user_api_keys_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::UserApi.new
key_or_hash = 'key_or_hash_example' # String | Key or Hash
begin
#Revoke a User API Key.
result = api_instance.user_api_keys_key_or_hash_delete(key_or_hash)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling UserApi->user_api_keys_key_or_hash_delete: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::UserApi.new
opts = {
expiry: 'expiry_example', # String | Expiration - Expiration - Valid time units are ns, us (or µs), ms, s, m, h. for example 300h
perms: 'perms_example' # String | Permissions -- currently unused
}
begin
#Create API keys for a user
result = api_instance.user_api_keys_post(opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling UserApi->user_api_keys_post: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::UserApi.new
begin
#Export user data
result = api_instance.user_export_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling UserApi->user_export_get: #{e}"
end
# Setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: bearerAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = SwaggerClient::UserApi.new
begin
#Get stats for the current user
result = api_instance.user_stats_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling UserApi->user_stats_get: #{e}"
end
Documentation for API Endpoints
All URIs are relative to //api.estuary.tech/
Class | Method | HTTP request | Description |
---|---|---|---|
SwaggerClient::AdminApi | admin_peering_peers_delete | DELETE /admin/peering/peers | Remove peers on Peering Service |
SwaggerClient::AdminApi | admin_peering_peers_get | GET /admin/peering/peers | List all Peering peers |
SwaggerClient::AdminApi | admin_peering_peers_post | POST /admin/peering/peers | Add peers on Peering Service |
SwaggerClient::AdminApi | admin_peering_start_post | POST /admin/peering/start | Start Peering |
SwaggerClient::AdminApi | admin_peering_status_get | GET /admin/peering/status | Check Peering Status |
SwaggerClient::AdminApi | admin_peering_stop_post | POST /admin/peering/stop | Stop Peering |
SwaggerClient::AdminApi | admin_system_config_get | GET /admin/system/config | Get systems(estuary/shuttle) config |
SwaggerClient::AdminApi | admin_users_get | GET /admin/users | Get all users |
SwaggerClient::AutoretrieveApi | admin_autoretrieve_init_post | POST /admin/autoretrieve/init | Register autoretrieve server |
SwaggerClient::AutoretrieveApi | admin_autoretrieve_list_get | GET /admin/autoretrieve/list | List autoretrieve servers |
SwaggerClient::AutoretrieveApi | autoretrieve_heartbeat_post | POST /autoretrieve/heartbeat | Marks autoretrieve server as up |
SwaggerClient::CollectionsApi | collections_coluuid_commit_post | POST /collections/{coluuid}/commit | Produce a CID of the collection contents |
SwaggerClient::CollectionsApi | collections_coluuid_contents_delete | DELETE /collections/{coluuid}/contents | Deletes a content from a collection |
SwaggerClient::CollectionsApi | collections_coluuid_delete | DELETE /collections/{coluuid} | Deletes a collection |
SwaggerClient::CollectionsApi | collections_coluuid_get | GET /collections/{coluuid} | Get contents in a collection |
SwaggerClient::CollectionsApi | collections_coluuid_post | POST /collections/{coluuid} | Add contents to a collection |
SwaggerClient::CollectionsApi | collections_fs_add_post | POST /collections/fs/add | Add a file to a collection |
SwaggerClient::CollectionsApi | collections_get | GET /collections/ | List all collections |
SwaggerClient::CollectionsApi | collections_post | POST /collections/ | Create a new collection |
SwaggerClient::ContentApi | admin_invites_get | GET /admin/invites | Get Estuary invites |
SwaggerClient::ContentApi | admin_invites_post | POST /admin/invites | Create an Estuary invite |
SwaggerClient::ContentApi | content_add_car_post | POST /content/add-car | Add Car object |
SwaggerClient::ContentApi | content_add_ipfs_post | POST /content/add-ipfs | Add IPFS object |
SwaggerClient::ContentApi | content_add_post | POST /content/add | Add new content |
SwaggerClient::ContentApi | content_aggregated_content_get | GET /content/aggregated/{content} | Get aggregated content stats |
SwaggerClient::ContentApi | content_all_deals_get | GET /content/all-deals | Get all deals for a user |
SwaggerClient::ContentApi | content_bw_usage_content_get | GET /content/bw-usage/{content} | Get content bandwidth |
SwaggerClient::ContentApi | content_create_post | POST /content/create | Add a new content |
SwaggerClient::ContentApi | content_deals_get | GET /content/deals | Content with deals |
SwaggerClient::ContentApi | content_ensure_replication_datacid_get | GET /content/ensure-replication/{datacid} | Ensure Replication |
SwaggerClient::ContentApi | content_failures_content_get | GET /content/failures/{content} | List all failures for a content |
SwaggerClient::ContentApi | content_id_get | GET /content/{id} | Content |
SwaggerClient::ContentApi | content_importdeal_post | POST /content/importdeal | Import a deal |
SwaggerClient::ContentApi | content_list_get | GET /content/list | List all pinned content |
SwaggerClient::ContentApi | content_read_cont_get | GET /content/read/{cont} | Read content |
SwaggerClient::ContentApi | content_staging_zones_get | GET /content/staging-zones | Get staging zone for user |
SwaggerClient::ContentApi | content_stats_get | GET /content/stats | Get content statistics |
SwaggerClient::ContentApi | content_status_id_get | GET /content/status/{id} | Content Status |
SwaggerClient::DealsApi | deal_estimate_post | POST /deal/estimate | Estimate the cost of a deal |
SwaggerClient::DealsApi | deal_info_dealid_get | GET /deal/info/{dealid} | Get Deal Info |
SwaggerClient::DealsApi | deal_proposal_propcid_get | GET /deal/proposal/{propcid} | Get Proposal |
SwaggerClient::DealsApi | deal_query_miner_get | GET /deal/query/{miner} | Query Ask |
SwaggerClient::DealsApi | deal_status_by_proposal_propcid_get | GET /deal/status-by-proposal/{propcid} | Get Deal Status by PropCid |
SwaggerClient::DealsApi | deal_status_miner_propcid_get | GET /deal/status/{miner}/{propcid} | Deal Status |
SwaggerClient::DealsApi | deal_transfer_in_progress_get | GET /deal/transfer/in-progress | Transfer In Progress |
SwaggerClient::DealsApi | deal_transfer_status_post | POST /deal/transfer/status | Transfer Status |
SwaggerClient::DealsApi | deals_failures_get | GET /deals/failures | Get storage failures for user |
SwaggerClient::DealsApi | deals_make_miner_post | POST /deals/make/{miner} | Make Deal |
SwaggerClient::DealsApi | deals_status_deal_get | GET /deals/status/{deal} | Get Deal Status |
SwaggerClient::DealsApi | public_deals_failures_get | GET /public/deals/failures | Get storage failures |
SwaggerClient::DealsApi | public_miners_storage_query_miner_get | GET /public/miners/storage/query/{miner} | Query Ask |
SwaggerClient::MetricsApi | public_metrics_deals_on_chain_get | GET /public/metrics/deals-on-chain | Get deal metrics |
SwaggerClient::MinerApi | public_miners_deals_miner_get | GET /public/miners/deals/{miner} | Get all miners deals |
SwaggerClient::MinerApi | public_miners_stats_miner_get | GET /public/miners/stats/{miner} | Get miner stats |
SwaggerClient::NetApi | net_addrs_get | GET /net/addrs | Net Addrs |
SwaggerClient::NetApi | public_miners_failures_miner_get | GET /public/miners/failures/{miner} | Get all miners |
SwaggerClient::NetApi | public_miners_get | GET /public/miners | Get all miners |
SwaggerClient::NetApi | public_net_addrs_get | GET /public/net/addrs | Net Addrs |
SwaggerClient::NetApi | public_net_peers_get | GET /public/net/peers | Net Peers |
SwaggerClient::PeeringApi | admin_peering_peers_delete | DELETE /admin/peering/peers | Remove peers on Peering Service |
SwaggerClient::PeeringApi | admin_peering_peers_get | GET /admin/peering/peers | List all Peering peers |
SwaggerClient::PeeringApi | admin_peering_peers_post | POST /admin/peering/peers | Add peers on Peering Service |
SwaggerClient::PeeringApi | admin_peering_start_post | POST /admin/peering/start | Start Peering |
SwaggerClient::PeeringApi | admin_peering_status_get | GET /admin/peering/status | Check Peering Status |
SwaggerClient::PeeringApi | admin_peering_stop_post | POST /admin/peering/stop | Stop Peering |
SwaggerClient::PeersApi | admin_peering_peers_delete | DELETE /admin/peering/peers | Remove peers on Peering Service |
SwaggerClient::PeersApi | admin_peering_peers_get | GET /admin/peering/peers | List all Peering peers |
SwaggerClient::PeersApi | admin_peering_peers_post | POST /admin/peering/peers | Add peers on Peering Service |
SwaggerClient::PeersApi | admin_peering_start_post | POST /admin/peering/start | Start Peering |
SwaggerClient::PeersApi | admin_peering_status_get | GET /admin/peering/status | Check Peering Status |
SwaggerClient::PeersApi | admin_peering_stop_post | POST /admin/peering/stop | Stop Peering |
SwaggerClient::PinningApi | pinning_pins_get | GET /pinning/pins | List all pin status objects |
SwaggerClient::PinningApi | pinning_pins_pinid_delete | DELETE /pinning/pins/{pinid} | Delete a pinned object |
SwaggerClient::PinningApi | pinning_pins_pinid_get | GET /pinning/pins/{pinid} | Get a pin status object |
SwaggerClient::PinningApi | pinning_pins_pinid_post | POST /pinning/pins/{pinid} | Replace a pinned object |
SwaggerClient::PinningApi | pinning_pins_post | POST /pinning/pins | Add and pin object |
SwaggerClient::PublicApi | get_cid_get | GET /get/{cid} | Get Full Content by Cid |
SwaggerClient::PublicApi | public_by_cid_cid_get | GET /public/by-cid/{cid} | Get Content by Cid |
SwaggerClient::PublicApi | public_info_get | GET /public/info | Get public node info |
SwaggerClient::PublicApi | public_metrics_deals_on_chain_get | GET /public/metrics/deals-on-chain | Get deal metrics |
SwaggerClient::PublicApi | public_miners_deals_miner_get | GET /public/miners/deals/{miner} | Get all miners deals |
SwaggerClient::PublicApi | public_miners_failures_miner_get | GET /public/miners/failures/{miner} | Get all miners |
SwaggerClient::PublicApi | public_miners_get | GET /public/miners | Get all miners |
SwaggerClient::PublicApi | public_miners_stats_miner_get | GET /public/miners/stats/{miner} | Get miner stats |
SwaggerClient::PublicApi | public_net_addrs_get | GET /public/net/addrs | Net Addrs |
SwaggerClient::PublicApi | public_net_peers_get | GET /public/net/peers | Net Peers |
SwaggerClient::PublicApi | public_stats_get | GET /public/stats | Public stats |
SwaggerClient::UserApi | user_api_keys_get | GET /user/api-keys | Get API keys for a user |
SwaggerClient::UserApi | user_api_keys_key_or_hash_delete | DELETE /user/api-keys/{key_or_hash} | Revoke a User API Key. |
SwaggerClient::UserApi | user_api_keys_post | POST /user/api-keys | Create API keys for a user |
SwaggerClient::UserApi | user_export_get | GET /user/export | Export user data |
SwaggerClient::UserApi | user_stats_get | GET /user/stats | Get stats for the current user |
Documentation for Models
- SwaggerClient::AutoretrieveInitBody
- SwaggerClient::CollectionsCollection
- SwaggerClient::ContentAddBody
- SwaggerClient::MainChannelIDParam
- SwaggerClient::MainCreateCollectionBody
- SwaggerClient::MainDeleteContentFromCollectionBody
- SwaggerClient::MainEstimateDealBody
- SwaggerClient::MainGetApiKeysResp
- SwaggerClient::MainImportDealBody
- SwaggerClient::TypesIpfsListPinStatusResponse
- SwaggerClient::TypesIpfsPin
- SwaggerClient::TypesIpfsPinStatusResponse
- SwaggerClient::UtilContentAddIpfsBody
- SwaggerClient::UtilContentAddResponse
- SwaggerClient::UtilContentCreateBody
- SwaggerClient::UtilHttpError
Documentation for Authorization
bearerAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header