Grist4NET
Search Results for

    Show / Hide Table of Contents

    Class GristConnection

    Represents an API session to a single Grist instance. Start here.

    Inheritance
    object
    GristConnection
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Grist4NET
    Assembly: Grist4NET.dll
    Syntax
    public class GristConnection

    Constructors

    GristConnection(GristConnectionOptions)

    Declaration
    public GristConnection(GristConnectionOptions options)
    Parameters
    Type Name Description
    GristConnectionOptions options
    See Also
    GristConnectionOptions

    GristConnection(IOptions<GristConnectionOptions>)

    Used by dependency injection and options pattern.

    Declaration
    public GristConnection(IOptions<GristConnectionOptions> options)
    Parameters
    Type Name Description
    IOptions<GristConnectionOptions> options
    Examples
    var builder = Host.CreateApplicationBuilder(args);
    builder.Services.Configure<GristConnectionOptions>(builder.Configuration.GetSection("Grist"));
    builder.Services.AddSingleton<GristConnection>();
    var app = builder.Build();
    var grist = app.Services.GetRequiredService<GristConnection>();
    See Also
    https://learn.microsoft.com/en-us/dotnet/core/extensions/options

    GristConnection(string, Uri?)

    Declaration
    public GristConnection(string apiKey, Uri? baseUrl = null)
    Parameters
    Type Name Description
    string apiKey

    https://support.getgrist.com/rest-api/#api-keys

    Uri baseUrl

    Defaults to Grist's hosted SAAS

    Properties

    Api

    Raw Kiota client for API methods not covered by wrapper types

    Declaration
    public GristKiotaClient Api { get; }
    Property Value
    Type Description
    GristKiotaClient

    Methods

    GetDocument(string)

    Declaration
    public Task<GristDocument> GetDocument(string documentId)
    Parameters
    Type Name Description
    string documentId
    Returns
    Type Description
    Task<GristDocument>
    In this article
    Back to top Generated by DocFX