Skip to content

Commit

Permalink
feat(GenericApi): resolve name #51
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed May 4, 2018
1 parent fce1343 commit cb19d3d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/CoreApi/IGenericApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,32 @@ public interface IGenericApi
/// A task that represents the asynchronous operation.
/// </returns>
Task ShutdownAsync();

/// <summary>
/// Resolve a name.
/// </summary>
/// <param name="name">
/// The name to resolve.
/// </param>
/// <param name="recursive">
/// Resolve until the result is an IPFS name. Defaults to <b>false</b>.
/// </param>
/// <param name="cancel">
/// Is used to stop the task. When cancelled, the <see cref="TaskCanceledException"/> is raised.
/// </param>
/// <returns>
/// A task that represents the asynchronous operation. The task's value is
/// the resolved path as a <see cref="string"/>.
/// </returns>
/// <remarks>
/// The <paramref name="name"/> can be <see cref="Cid"/> + [path], "/ipfs/..." or
/// "/ipns/...".
/// </remarks>
Task<string> ResolveAsync(
string name,
bool recursive = false,
CancellationToken cancel = default(CancellationToken)
);

}
}

0 comments on commit cb19d3d

Please sign in to comment.