Search Results for

    Show / Hide Table of Contents

    Class NovaRazorExternalApi

    A proxy for a Noxum.Nova.Data.Cache.CachedExternalApi to be used in Razor Views

    Inheritance
    object
    NovaRazorObject
    NovaRazorObject<CachedExternalApi>
    NovaRazorExternalApi
    Implements
    IReadOnlyCollection<NovaRazorValue>
    IEnumerable<NovaRazorValue>
    IEnumerable
    Inherited Members
    NovaRazorObject<CachedExternalApi>.GetDisplayIconUrlAsync()
    NovaRazorObject<CachedExternalApi>.GetDisplayNameAsync(ObjId)
    NovaRazorObject<CachedExternalApi>.GetDescriptionAsync(ObjId)
    NovaRazorObject.Id
    NovaRazorObject.Guid
    NovaRazorObject.ApiIdentifier
    NovaRazorObject.Type
    NovaRazorObject.Props
    NovaRazorObject.CreateHyperRefAsync()
    NovaRazorObject.GetValue(ObjId, ObjId, ObjId)
    NovaRazorObject.GetValue(NovaRazorAttribute, NovaRazorObject, NovaRazorLanguage)
    NovaRazorObject.GetValue(string, string, string)
    NovaRazorObject.GetValue(ScopedAttributeKey)
    NovaRazorObject.GetVirtualValueAsync(ObjId, ObjId, ObjId)
    NovaRazorObject.GetVirtualValueAsync(NovaRazorAttribute, NovaRazorObject, NovaRazorLanguage)
    NovaRazorObject.GetVirtualValueAsync(string, string, string)
    NovaRazorObject.GetVirtualValueAsync(ScopedAttributeKey)
    NovaRazorObject.IsBinaryProxy
    NovaRazorObject.GetExternalBinaryThumbnailUrlAsync()
    NovaRazorObject.GetExternalBinaryUrlAsync()
    NovaRazorObject.GetChildKeys(ObjId)
    NovaRazorObject.GetChildKeys(string)
    NovaRazorObject.GetChildKeys(CachedTreeDefinition)
    NovaRazorObject.GetUsageByAttributeAsync(ScopedAttributeKey)
    NovaRazorObject.GetUsageByAttributeAsync(ObjId, ObjId, ObjId)
    NovaRazorObject.GetUsageByAttributeAsync(NovaRazorAttribute, NovaRazorObject, NovaRazorLanguage)
    NovaRazorObject.GetUsageByAttributeAsync(string, string, string)
    NovaRazorObject.Count
    NovaRazorObject.GetEnumerator()
    NovaRazorObject.ToString()
    NovaRazorObject.ConditionIsTrueAsync(string, bool)
    NovaRazorObject.ConditionsAreTrueAsync(IEnumerable<string>, bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Noxum.Nova.Razor.Model
    Assembly: Noxum.Nova.Razor.Model.dll
    Syntax
    public sealed class NovaRazorExternalApi : NovaRazorObject<CachedExternalApi>, IReadOnlyCollection<NovaRazorValue>, IEnumerable<NovaRazorValue>, IEnumerable

    Methods

    GetAsync(string)

    Send a GET request to the external API. The JSON response will be deserialized to a dynamic object.

    Declaration
    public Task<ExpandoObject> GetAsync(string pathAndQuery)
    Parameters
    Type Name Description
    string pathAndQuery
    Returns
    Type Description
    Task<ExpandoObject>

    GetAsync<T>(string)

    Send a GET request to the external API. The JSON response will be deserialized to a dynamic object.

    Declaration
    public Task<T> GetAsync<T>(string pathAndQuery) where T : class
    Parameters
    Type Name Description
    string pathAndQuery
    Returns
    Type Description
    Task<T>
    Type Parameters
    Name Description
    T

    PostAsync(string, object)

    Post a dynamic object as JSON payload to the external API. The JSON response will be deserialized to a dynamic object.

    Declaration
    public Task<ExpandoObject> PostAsync(string path, object payload)
    Parameters
    Type Name Description
    string path
    object payload
    Returns
    Type Description
    Task<ExpandoObject>

    PostAsync<T>(string, object)

    Post a dynamic object as JSON payload to the external API. The JSON response will be deserialized to a dynamic object.

    Declaration
    public Task<T> PostAsync<T>(string path, object payload) where T : class
    Parameters
    Type Name Description
    string path
    object payload
    Returns
    Type Description
    Task<T>
    Type Parameters
    Name Description
    T

    RenderAsync(string, string, object)

    Send a GET request to the external API. The result will be returned as IHtmlContent so that it can be output directly into a Razor page.

    Declaration
    public Task<IHtmlContent> RenderAsync(string pathAndQuery, string method = "Get", object payload = null)
    Parameters
    Type Name Description
    string pathAndQuery

    Path and Query of the request

    string method

    The method type ("Get" or "Post")

    object payload

    The payload the is posted as JSON

    Returns
    Type Description
    Task<IHtmlContent>

    HTML that can be rendered directly by Razor Views

    Implements

    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable
    In this article
    Back to top Version 6.1.0.7rc