An easy to use API that helps you access the Factom blockchain.
This Client is currently in beta. It has been automatically generated by the OpenAPI Generator project:
- API version: 1.0.19
- SDK version: 1.0.7
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit https://docs.harmony.factom.com
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
- RestSharp - 105.1.0 or later
- Json.NET - 7.0.0 or later
- JsonSubTypes - 1.2.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using harmony-connect-client.Api;
using harmony-connect-client.Client;
using harmony-connect-client.Model;
A .nuspec
is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec
uses placeholders from the .csproj
, so build the .csproj
directly:
nuget pack -Build -OutputDirectory out harmony-connect-client.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
using System;
using System.Diagnostics;
using harmony-connect-client.Api;
using harmony-connect-client.Client;
using harmony-connect-client.Model;
namespace Example
{
public class Example
{
public void main()
{
// Configure API key authorization: AppId
Configuration.Default.ApiKey.Add("app_id", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("app_id", "Bearer");
// Configure API key authorization: AppKey
Configuration.Default.ApiKey.Add("app_key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("app_key", "Bearer");
var apiInstance = new ChainsApi();
var chainId = 285904; // string | Chain identifier
try
{
// Get Chain Info
Chain result = apiInstance.GetChainByID(chainId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ChainsApi.GetChainByID: " + e.Message );
}
}
}
}
All URIs are relative to https://ephemeral.api.factom.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ChainsApi | GetChainByID | GET /chains/{chain_id} | Get Chain Info |
ChainsApi | GetChains | GET /chains | Get All Chains |
ChainsApi | PostChain | POST /chains | Create a Chain |
ChainsApi | PostChainSearch | POST /chains/search | Search Chains |
EntriesApi | GetEntriesByChainID | GET /chains/{chain_id}/entries | Get Chain's Entries |
EntriesApi | GetEntryByHash | GET /chains/{chain_id}/entries/{entry_hash} | Get Entry Info |
EntriesApi | GetFirstEntry | GET /chains/{chain_id}/entries/first | Get Chain's First Entry |
EntriesApi | GetLastEntry | GET /chains/{chain_id}/entries/last | Get Chain's Last Entry |
EntriesApi | PostEntriesSearch | POST /chains/{chain_id}/entries/search | Search Chain's Entries |
EntriesApi | PostEntryToChainID | POST /chains/{chain_id}/entries | Create an Entry |
IdentitiesApi | GetIdChainbyId | GET /identities/{identity_chain_id} | Get Identity Chain Info |
IdentitiesApi | GetKeybyEntryHash | GET /identities/{identity_chain_id}/keys/{key_string} | Get Key Info |
IdentitiesApi | GetKeysbyIdChainId | GET /identities/{identity_chain_id}/keys | Get Identity Chain's Keys |
IdentitiesApi | PostIdChain | POST /identities | Create Identity Chain |
IdentitiesApi | PostKeytoIdChainId | POST /identities/{identity_chain_id}/keys | Replace Identity Key |
InfoApi | GetApiInfo | GET / | API Info |
ProofsApi | GetAnchorbySearch | GET /anchors/{object_id} | Get Object's Anchors |
ProofsApi | GetReceiptsbyEntry | GET /receipts/{entry_hash} | Get Entry's Receipts |
ProofsApi | GetSearch | GET /search | Search |
- Model.ABlockEntry
- Model.ABlockEntryData
- Model.ABlockEntryLink
- Model.ABlockEntryList
- Model.ABlockList
- Model.ABlockLong
- Model.ABlockLongDblock
- Model.ABlockLongNext
- Model.ABlockLongPrev
- Model.ABlockShort
- Model.ABlockShortDblock
- Model.Address
- Model.AddressLink
- Model.AddressList
- Model.AllInfo
- Model.AllInfoLinks
- Model.AnchorLong
- Model.AnchorLongData
- Model.BitcoinAnchor
- Model.Chain
- Model.ChainCreate
- Model.ChainData
- Model.ChainDataDblock
- Model.ChainDataEblock
- Model.ChainDataEntries
- Model.ChainLink
- Model.ChainList
- Model.ChainListData
- Model.ChainShort
- Model.CommitLink
- Model.CommitLong
- Model.DBlockLink
- Model.DBlockList
- Model.DBlockLong
- Model.DBlockLongAblock
- Model.DBlockLongBtcAnchorEntry
- Model.DBlockLongBtcAnchorEntryChain
- Model.DBlockLongEblocks
- Model.DBlockLongEcblock
- Model.DBlockLongFblock
- Model.DBlockLongNext
- Model.DBlockLongPrev
- Model.DBlockShort
- Model.EBlockLink
- Model.EBlockLinkChain
- Model.EBlockList
- Model.EBlockLong
- Model.EBlockLongNext
- Model.EBlockLongPrev
- Model.EBlockShort
- Model.EBlockShortChain
- Model.EBlockShortDblock
- Model.ECBlockEntryList
- Model.ECBlockList
- Model.ECBlockLong
- Model.ECBlockLongDblock
- Model.ECBlockShort
- Model.Entry
- Model.EntryCreate
- Model.EntryData
- Model.EntryDataDblock
- Model.EntryDataEblock
- Model.EntryList
- Model.EntryListChain
- Model.EntryListData
- Model.EntrySearchResponse
- Model.EntrySearchResponseData
- Model.EntryShort
- Model.ErrorMessage
- Model.ErrorMessageErrors
- Model.EthereumAnchor
- Model.FBlockList
- Model.FBlockLong
- Model.FBlockLongNext
- Model.FBlockLongPrev
- Model.FBlockShort
- Model.FactomAnchor
- Model.IdentityChain
- Model.IdentityCreate
- Model.IdentityKey
- Model.IdentityKeyData
- Model.IdentityKeyReplace
- Model.IdentityKeyShort
- Model.IdentityKeyShortData
- Model.InlineResponse200
- Model.InlineResponse200Data
- Model.KeyList
- Model.MerkleNode
- Model.ReceiptLong
- Model.ReceiptLongData
- Model.SearchBody
- Model.SingleAnchor
- Model.Transaction
- Model.TransactionLink
- Model.TransactionLinkShort
- Model.TransactionList
- Model.TransactionShort
- Type: API key
- API key parameter name: app_id
- Location: HTTP header
- Type: API key
- API key parameter name: app_key
- Location: HTTP header