Search Results for

    Show / Hide Table of Contents

    Interface IApiQueryBuilder

    Namespace: LemonEdge.ApiConnector
    Assembly: LemonEdge.ApiConnector.dll
    Syntax
    public interface IApiQueryBuilder

    Methods

    BuildQuery(string, List<ApiParameter>, HttpMethod)

    Creates an ApiQuery model providing a valid System.Uri and ApiQueryRequestType.

    Replaces all tokens within the rawQueryUrl with the associated ApiParameter supplied by parameters

    Declaration
    ApiQuery BuildQuery(string rawQueryUrl, List<ApiParameter> parameters, HttpMethod requestType)
    Parameters
    Type Name Description
    string rawQueryUrl

    The raw tokenized raw query url. Tokens are supplied by surrounding a parameter name with curly braces. I.e. https://www.someapi.com/parameter={myParameter}

    List<ApiParameter> parameters

    A collection of ApiParameter

    HttpMethod requestType

    HttpMethod

    Returns
    Type Description
    ApiQuery

    An ApiQuery model

    Exceptions
    Type Condition
    Exception

    Thrown when the rawQueryUrl is null, empty, or contains only whitespace

    NullReferenceException

    Thrown when an ApiParameter key is null

    NullReferenceException

    Thrown when an ApiParameter value is null

    Exception

    Thrown when a given ApiParameter is not found within the rawQueryUrl

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.