API reference

WitVRequest Class

Extends Meta.WitAi.Requests.VRequest, Meta.WitAi.Requests.IWitVRequest

Constructors

WitVRequest ( configuration , requestId , operationId , useServerToken )
Constructor that takes in a configuration interface
Signature
Meta.WitAi.Requests.WitVRequest.WitVRequest(IWitRequestConfiguration configuration, string requestId, string operationId=null, bool useServerToken=false)
Parameters
configuration: IWitRequestConfiguration  The configuration interface to be used
requestId: string  A unique identifier that can be used to track the request
operationId: string  The operation id used to pass data between multiple requests
useServerToken: bool  Editor only option to use server token instead of client token

Fields

RequestId : string
The unique identifier used by Wit to track requests
Signature
string Meta.WitAi.Requests.WitVRequest.RequestId

Static Fields

OnProvideCustomHeaders : Action< Dictionary< string, string > >
Header customization delegate
Signature
Action<Dictionary<string, string> > Meta.WitAi.Requests.WitVRequest.OnProvideCustomHeaders
OnProvideCustomUri : Func< UriBuilder, UriBuilder >
Uri customization delegate
Signature
Func<UriBuilder, UriBuilder> Meta.WitAi.Requests.WitVRequest.OnProvideCustomUri
OnProvideCustomUserAgent : Action< StringBuilder >
User agent customization delegate
Signature
Action<StringBuilder> Meta.WitAi.Requests.WitVRequest.OnProvideCustomUserAgent

Properties

Configuration : IWitRequestConfiguration
[Get]
The configuration used for voice requests
Signature
IWitRequestConfiguration Meta.WitAi.Requests.WitVRequest.Configuration
RequestOptions : WitRequestOptions
[Get]
The complete set of data needed to track requests
Signature
WitRequestOptions Meta.WitAi.Requests.WitVRequest.RequestOptions

Protected Methods

GetHeaders ()
Signature
override Dictionary<string, string> Meta.WitAi.Requests.WitVRequest.GetHeaders()
Returns
override Dictionary< string, string >
GetUri ()
Signature
override Uri Meta.WitAi.Requests.WitVRequest.GetUri()
Returns
override Uri
IsLocalFile ()
Signature
bool Meta.WitAi.Requests.WitVRequest.IsLocalFile()
Returns
bool

Methods

Request< TValue > ( decoder )
Override base class to ensure configuration is correct
Signature
override async Task<VRequestResponse<TValue> > Meta.WitAi.Requests.WitVRequest.Request< TValue >(VRequestDecodeDelegate< TValue > decoder)
Parameters
decoder: VRequestDecodeDelegate< TValue >
Returns
override async Task< VRequestResponse< TValue > >
RequestWitGet< TValue > ( endpoint , urlParameters , onPartial )
Get request to a wit endpoint
Signature
async Task<VRequestResponse<TValue> > Meta.WitAi.Requests.WitVRequest.RequestWitGet< TValue >(string endpoint, Dictionary< string, string > urlParameters=null, Action< TValue > onPartial=null)
Parameters
endpoint: string  The wit endpoint for the request. Ex. 'synthesize'
urlParameters: Dictionary< string, string >  Any parameters to be added to the url prior to request.
onPartial: Action< TValue >  If provided, this will call back for every incremental json chunk.
Returns
async Task< VRequestResponse< TValue > >  An awaitable task thar contains the final decoded json results
RequestWitPost< TValue > ( endpoint , urlParameters , payload , onPartial )
Post request to a wit endpoint
Signature
async Task<VRequestResponse<TValue> > Meta.WitAi.Requests.WitVRequest.RequestWitPost< TValue >(string endpoint, Dictionary< string, string > urlParameters, string payload, Action< TValue > onPartial=null)
Parameters
endpoint: string  The wit endpoint for the request. Ex. 'synthesize'
urlParameters: Dictionary< string, string >  Any parameters to be added to the url prior to request.
payload: string  Text data that will be uploaded via post.
onPartial: Action< TValue >  If provided, this will call back for every incremental json chunk.
Returns
async Task< VRequestResponse< TValue > >  An awaitable task thar contains the final decoded json results
RequestWitPut< TValue > ( endpoint , urlParameters , payload , onPartial )
Put request to a wit endpoint
Signature
async Task<VRequestResponse<TValue> > Meta.WitAi.Requests.WitVRequest.RequestWitPut< TValue >(string endpoint, Dictionary< string, string > urlParameters, string payload, Action< TValue > onPartial=null)
Parameters
endpoint: string  The wit endpoint for the request. Ex. 'synthesize'
urlParameters: Dictionary< string, string >  Any parameters to be added to the url prior to request.
payload: string  Text data that will be uploaded via put.
onPartial: Action< TValue >  If provided, this will call back for every incremental json chunk.
Returns
async Task< VRequestResponse< TValue > >  An awaitable task thar contains the final decoded json results