static int | Will only start new requests if there are less than this number If <= 0, then all requests will run immediately |
int | Timeout[Get] Timeout in seconds |
bool | IsPerforming[Get] If request is currently being performed |
bool | HasFirstResponse[Get] If first response has been received |
bool | IsStreamReady[Get] If the download handler incorporates IVRequestStreamable & IsStreamReady |
bool | IsComplete[Get] Whether or not the completion delegate has been called |
int | ResponseCode[Get] Response Code if applicable |
string | ResponseError[Get] Response error |
float | UploadProgress[Get] Current progress for get requests |
float | DownloadProgress[Get] Current progress for download |
delegate void | RequestProgressDelegate ( float progress ) |
delegate void | |
delegate void | |
VRequest ( RequestProgressDelegate onDownloadProgress, RequestFirstResponseDelegate onFirstResponse ) A constructor that takes in download progress delegate & first response delegate | |
string | |
void | Cancel ( ) |
bool | Initialize with a request and an on completion callback |
async Task< RequestCompleteResponse< TData > > | Initialize with a request and an on completion callback |
bool | Performs a header request on a uri |
async Task< RequestCompleteResponse< Dictionary< string, string > > > | RequestFileHeadersAsync ( Uri uri ) Performs a header request on a uri asynchronously |
bool | Performs a simple http header request |
async Task< RequestCompleteResponse< byte[]> > | RequestFileAsync ( Uri uri ) Performs a simple http header request |
async Task< RequestCompleteResponse< bool > > | RequestFileExistsAsync ( string checkPath ) Checks if a file exists at a specified location using async calls |
bool | Uses async method to check if file exists & return via the oncomplete method |
bool | RequestFileDownload ( string downloadPath, UnityWebRequest unityRequest, RequestCompleteDelegate< bool > onComplete ) Download a file using a unityrequest |
async Task< string > | Download a file using a unityrequest |
bool | RequestText ( UnityWebRequest unityRequest, RequestCompleteDelegate< string > onComplete, TextStreamHandler.TextStreamResponseDelegate onPartial ) Performs a text request & handles the resultant text |
async Task< RequestCompleteResponse< string > > | RequestTextAsync ( UnityWebRequest unityRequest, TextStreamHandler.TextStreamResponseDelegate onPartial ) Performs a text request async & returns the text along with any errors |
bool | RequestJson< TData > ( UnityWebRequest unityRequest, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) Performs a request for text & decodes it into json |
async Task< RequestCompleteResponse< TData > > | RequestJsonAsync< TData > ( UnityWebRequest unityRequest, RequestCompleteDelegate< TData > onPartial ) Performs a request for text and decodes it into json asynchronously |
bool | RequestJsonGet< TData > ( Uri uri, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) Perform a json get request with a specified uri |
async Task< RequestCompleteResponse< TData > > | Perform a json get request with a specified uri asynchronously |
bool | RequestJsonPost< TData > ( Uri uri, byte [] postData, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) Performs a json request by posting byte data |
async Task< RequestCompleteResponse< TData > > | RequestJsonPostAsync< TData > ( Uri uri, byte [] postData, RequestCompleteDelegate< TData > onPartial ) Performs a json request by posting byte data asynchronously |
bool | RequestJsonPost< TData > ( Uri uri, string postText, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) Performs a json request by posting a string |
async Task< RequestCompleteResponse< TData > > | RequestJsonPostAsync< TData > ( Uri uri, string postText, RequestCompleteDelegate< TData > onPartial ) Performs a json request by posting a string asynchronously |
bool | RequestJsonPut< TData > ( Uri uri, byte [] putData, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) Performs a json put request with byte data |
async Task< RequestCompleteResponse< TData > > | RequestJsonPutAsync< TData > ( Uri uri, byte [] putData, RequestCompleteDelegate< TData > onPartial ) Performs a json put request with byte data asynchronously |
bool | RequestJsonPut< TData > ( Uri uri, string putText, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) Performs a json put request with text |
async Task< RequestCompleteResponse< TData > > | RequestJsonPutAsync< TData > ( Uri uri, string putText, RequestCompleteDelegate< TData > onPartial ) Performs a json put request with text asynchronously |
Instantiate an audio decoder based on the audio type to allow for complex streaming scenarios | |
bool | RequestAudioStream ( Uri uri, AudioType audioType, bool includesJson, AudioSampleDecodeDelegate onSamplesDecoded, AudioJsonDecodeDelegate onJsonDecoded, RequestCompleteDelegate< bool > onComplete ) Request audio clip with uri, audio type, sample decoded delegate & completion delegate |
bool | RequestAudioStream ( UnityWebRequest unityRequest, AudioType audioType, bool includesJson, AudioSampleDecodeDelegate onSamplesDecoded, AudioJsonDecodeDelegate onJsonDecoded, RequestCompleteDelegate< bool > onComplete ) Request audio clip with web request, audio type, whether audio includes json data, callback delegates & completion delegate |
void | Setup ( UnityWebRequest unityRequest ) |
Dictionary< string, string > | GetHeaders ( ) |
void | Begin ( ) |
bool | |
void | Update ( ) |
void | Unload ( ) |
static string | GetSpecificRequestError ( UnityWebRequest request ) |
static string | GetAudioExtension ( AudioType audioType ) Get audio extension from audio type |
static string | Get audio extension from audio type |
static Type | GetAudioDecoderType ( AudioType audioType ) Returns the IAudioDecoder type that works best with the specified AudioType for the current platform. |
static bool | CanDecodeAudio ( AudioType audioType ) Whether or not a specific audio type can be decoded |
static bool | CanStreamAudio ( AudioType audioType ) Whether or not audio can be streamed for a specific audio type |
int Meta.WitAi.Requests.VRequest.MaxConcurrentRequests |
---|
Will only start new requests if there are less than this number If <= 0, then all requests will run immediately |
Uri Meta.WitAi.Requests.VRequest.uri |
---|
The URI of the current/last request. |
string Meta.WitAi.Requests.VRequest.payload |
---|
The data for PUT and POST requests. This will usually be set by child classes that have unencoded payloads. |
int Meta.WitAi.Requests.VRequest.Timeout |
---|
Timeout in seconds |
bool Meta.WitAi.Requests.VRequest.IsPerforming |
---|
If request is currently being performed |
bool Meta.WitAi.Requests.VRequest.HasFirstResponse |
---|
If first response has been received |
bool Meta.WitAi.Requests.VRequest.IsStreamReady |
---|
If the download handler incorporates IVRequestStreamable & IsStreamReady |
bool Meta.WitAi.Requests.VRequest.IsComplete |
---|
Whether or not the completion delegate has been called |
int Meta.WitAi.Requests.VRequest.ResponseCode |
---|
Response Code if applicable |
string Meta.WitAi.Requests.VRequest.ResponseError |
---|
Response error |
float Meta.WitAi.Requests.VRequest.UploadProgress |
---|
Current progress for get requests |
float Meta.WitAi.Requests.VRequest.DownloadProgress |
---|
Current progress for download |
delegate void Meta.WitAi.Requests.VRequest.RequestProgressDelegate ( float progress ) |
---|
No description available.
|
delegate void Meta.WitAi.Requests.VRequest.RequestFirstResponseDelegate ( ) |
---|
No description available.
|
delegate void Meta.WitAi.Requests.VRequest.RequestCompleteDelegate< TResult > ( TResult result, string error ) |
---|
No description available.
|
Meta.WitAi.Requests.VRequest.VRequest ( RequestProgressDelegate onDownloadProgress, RequestFirstResponseDelegate onFirstResponse ) |
---|
A constructor that takes in download progress delegate & first response delegate Parameters onDownloadProgress The callback for progress related to downloading onFirstResponseThe callback for the first response of data from a request |
virtual string Meta.WitAi.Requests.VRequest.CleanUrl ( string url ) |
---|
Adds 'file://' to url if no prefix is found |
virtual void Meta.WitAi.Requests.VRequest.Cancel ( ) |
---|
No description available.
|
virtual bool Meta.WitAi.Requests.VRequest.Request ( UnityWebRequest unityRequest, RequestCompleteDelegate< UnityWebRequest > onComplete ) |
---|
Initialize with a request and an on completion callback Parameters unityRequest The unity request to be performed onCompleteThe callback on completion, returns the request & error string Returns False if the request cannot be performed |
virtual async Task<RequestCompleteResponse<TData> > Meta.WitAi.Requests.VRequest.RequestAsync< TData > ( UnityWebRequest unityRequest, Func< UnityWebRequest, TData > onDecode ) |
---|
Initialize with a request and an on completion callback Parameters unityRequest The unity request to be performed onDecodeA function to be performed to async decode all request data Returns Any errors encountered during the request |
bool Meta.WitAi.Requests.VRequest.RequestFileHeaders ( Uri uri, RequestCompleteDelegate< Dictionary< string, string >> onComplete ) |
---|
Performs a header request on a uri Parameters uri The uri to perform the request on onCompleteA completion callback that includes the headers Returns |
async Task<RequestCompleteResponse<Dictionary<string, string> > > Meta.WitAi.Requests.VRequest.RequestFileHeadersAsync ( Uri uri ) |
---|
Performs a header request on a uri asynchronously Parameters uri The uri to perform the request on Returns Returns the header |
bool Meta.WitAi.Requests.VRequest.RequestFile ( Uri uri, RequestCompleteDelegate< byte[]> onComplete ) |
---|
Performs a simple http header request Parameters uri Uri to get a file onCompleteCalled once file data has been loaded Returns False if cannot begin request |
async Task<RequestCompleteResponse<byte[]> > Meta.WitAi.Requests.VRequest.RequestFileAsync ( Uri uri ) |
---|
Performs a simple http header request Parameters uri Uri to get a file Returns False if cannot begin request |
async Task<RequestCompleteResponse<bool> > Meta.WitAi.Requests.VRequest.RequestFileExistsAsync ( string checkPath ) |
---|
Checks if a file exists at a specified location using async calls Parameters checkPath The local file path to be checked Returns An error if found |
bool Meta.WitAi.Requests.VRequest.RequestFileExists ( string checkPath, RequestCompleteDelegate< bool > onComplete ) |
---|
Uses async method to check if file exists & return via the oncomplete method Parameters checkPath The local file path to be checked |
bool Meta.WitAi.Requests.VRequest.RequestFileDownload ( string downloadPath, UnityWebRequest unityRequest, RequestCompleteDelegate< bool > onComplete ) |
---|
Download a file using a unityrequest Parameters unityRequest The unity request to add a download handler to onCompleteCalled once download has completed |
async Task<string> Meta.WitAi.Requests.VRequest.RequestFileDownloadAsync ( string downloadPath, UnityWebRequest unityRequest ) |
---|
Download a file using a unityrequest Parameters unityRequest The unity request to add a download handler to |
bool Meta.WitAi.Requests.VRequest.RequestText ( UnityWebRequest unityRequest, RequestCompleteDelegate< string > onComplete, TextStreamHandler.TextStreamResponseDelegate onPartial ) |
---|
Performs a text request & handles the resultant text Parameters unityRequest The unity request performing the post or get onCompleteThe delegate upon completion |
async Task<RequestCompleteResponse<string> > Meta.WitAi.Requests.VRequest.RequestTextAsync ( UnityWebRequest unityRequest, TextStreamHandler.TextStreamResponseDelegate onPartial ) |
---|
Performs a text request async & returns the text along with any errors Parameters unityRequest The unity request performing the post or get |
bool Meta.WitAi.Requests.VRequest.RequestJson< TData > ( UnityWebRequest unityRequest, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a request for text & decodes it into json Parameters unityRequest The unity request performing the post or get onCompleteThe delegate upon completion Others TData The struct or class to be deserialized to Returns False if the request cannot be performed |
async Task<RequestCompleteResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonAsync< TData > ( UnityWebRequest unityRequest, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a request for text and decodes it into json asynchronously Parameters unityRequest The unity request performing the post or get Others TData The struct or class to be deserialized to Returns RequestCompleteResponse with parsed data & error if applicable |
bool Meta.WitAi.Requests.VRequest.RequestJsonGet< TData > ( Uri uri, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) |
---|
Perform a json get request with a specified uri Parameters uri The uri to be requested onCompleteThe delegate upon completion Others TData The struct or class to be deserialized to Returns False if the request cannot be performed |
async Task<RequestCompleteResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonGetAsync< TData > ( Uri uri, RequestCompleteDelegate< TData > onPartial ) |
---|
Perform a json get request with a specified uri asynchronously Parameters uri The uri to be requested Others TData The struct or class to be deserialized to Returns RequestCompleteResponse with parsed data & error if applicable |
bool Meta.WitAi.Requests.VRequest.RequestJsonPost< TData > ( Uri uri, byte [] postData, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a json request by posting byte data Parameters uri The uri to be requested postDataThe data to be uploaded onCompleteThe delegate upon completion Others TData The struct or class to be deserialized to Returns False if the request cannot be performed |
async Task<RequestCompleteResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPostAsync< TData > ( Uri uri, byte [] postData, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a json request by posting byte data asynchronously Parameters uri The uri to be requested postDataThe data to be uploaded Others TData The struct or class to be deserialized to Returns RequestCompleteResponse with parsed data & error if applicable |
bool Meta.WitAi.Requests.VRequest.RequestJsonPost< TData > ( Uri uri, string postText, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a json request by posting a string Parameters uri The uri to be requested postTextThe string to be uploaded onCompleteThe delegate upon completion Others TData The struct or class to be deserialized to Returns False if the request cannot be performed |
async Task<RequestCompleteResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPostAsync< TData > ( Uri uri, string postText, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a json request by posting a string asynchronously Parameters uri The uri to be requested postTextThe string to be uploaded Others TData The struct or class to be deserialized to Returns RequestCompleteResponse with parsed data & error if applicable |
bool Meta.WitAi.Requests.VRequest.RequestJsonPut< TData > ( Uri uri, byte [] putData, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a json put request with byte data Parameters uri The uri to be requested putDataThe data to be uploaded onCompleteThe delegate upon completion Others TData The struct or class to be deserialized to Returns False if the request cannot be performed |
async Task<RequestCompleteResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPutAsync< TData > ( Uri uri, byte [] putData, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a json put request with byte data asynchronously Parameters uri The uri to be requested putDataThe data to be uploaded Others TData The struct or class to be deserialized to Returns RequestCompleteResponse with parsed data & error if applicable |
bool Meta.WitAi.Requests.VRequest.RequestJsonPut< TData > ( Uri uri, string putText, RequestCompleteDelegate< TData > onComplete, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a json put request with text Parameters uri The uri to be requested putTextThe text to be uploaded onCompleteThe delegate upon completion Others TData The struct or class to be deserialized to Returns False if the request cannot be performed |
async Task<RequestCompleteResponse<TData> > Meta.WitAi.Requests.VRequest.RequestJsonPutAsync< TData > ( Uri uri, string putText, RequestCompleteDelegate< TData > onPartial ) |
---|
Performs a json put request with text asynchronously Parameters uri The uri to be requested putTextThe text to be uploaded Others TData The struct or class to be deserialized to Returns RequestCompleteResponse with parsed data & error if applicable |
virtual IAudioDecoder Meta.WitAi.Requests.VRequest.GetAudioDecoder ( AudioType audioType, bool includeJson, AudioJsonDecodeDelegate onJsonDecoded ) |
---|
Instantiate an audio decoder based on the audio type to allow for complex streaming scenarios Parameters audioType Audio decoder type allowed includeJsonWhether or not json will be returned within the stream onJsonDecodedThe json decode callback which will be called multiple times |
bool Meta.WitAi.Requests.VRequest.RequestAudioStream ( Uri uri, AudioType audioType, bool includesJson, AudioSampleDecodeDelegate onSamplesDecoded, AudioJsonDecodeDelegate onJsonDecoded, RequestCompleteDelegate< bool > onComplete ) |
---|
Request audio clip with uri, audio type, sample decoded delegate & completion delegate Parameters uri The url to be called audioTypeThe audio type requested (Wav, MP3, etc.) includesJsonWhether or not json will be embedded within the audio stream. onSamplesDecodedCalled one or more times as audio samples are decoded. onJsonDecodedCalled one or more times as json data is decoded. onCompleteCalled when the audio request has completed |
bool Meta.WitAi.Requests.VRequest.RequestAudioStream ( UnityWebRequest unityRequest, AudioType audioType, bool includesJson, AudioSampleDecodeDelegate onSamplesDecoded, AudioJsonDecodeDelegate onJsonDecoded, RequestCompleteDelegate< bool > onComplete ) |
---|
Request audio clip with web request, audio type, whether audio includes json data, callback delegates & completion delegate Parameters unityRequest The unity request to add a download handler to audioTypeThe audio type requested (Wav, MP3, etc.) includesJsonWhether or not json will be embedded within the audio stream. onSamplesDecodedCalled one or more times as audio samples are decoded. onJsonDecodedCalled one or more times as json data is decoded. onCompleteCalled when the audio request has completed |
virtual void Meta.WitAi.Requests.VRequest.Setup ( UnityWebRequest unityRequest ) |
---|
No description available.
|
virtual Dictionary<string, string> Meta.WitAi.Requests.VRequest.GetHeaders ( ) |
---|
No description available.
|
virtual void Meta.WitAi.Requests.VRequest.Begin ( ) |
---|
No description available.
|
virtual bool Meta.WitAi.Requests.VRequest.IsRequestComplete ( ) |
---|
No description available.
|
virtual void Meta.WitAi.Requests.VRequest.Update ( ) |
---|
No description available.
|
virtual void Meta.WitAi.Requests.VRequest.Unload ( ) |
---|
No description available.
|
static string Meta.WitAi.Requests.VRequest.GetSpecificRequestError ( UnityWebRequest request ) |
---|
No description available.
|
static string Meta.WitAi.Requests.VRequest.GetAudioExtension ( AudioType audioType ) |
---|
Get audio extension from audio type Parameters audioType The specified audio type Returns Audio extension without period. |
static string Meta.WitAi.Requests.VRequest.GetAudioExtension ( AudioType audioType, bool textStream ) |
---|
Get audio extension from audio type Parameters audioType The specified audio type textStreamWhether data includes text Returns Audio extension without period. |
static Type Meta.WitAi.Requests.VRequest.GetAudioDecoderType ( AudioType audioType ) |
---|
Returns the IAudioDecoder type that works best with the specified AudioType for the current platform. |
static bool Meta.WitAi.Requests.VRequest.CanDecodeAudio ( AudioType audioType ) |
---|
Whether or not a specific audio type can be decoded |
static bool Meta.WitAi.Requests.VRequest.CanStreamAudio ( AudioType audioType ) |
---|
Whether or not audio can be streamed for a specific audio type |