Пример #1
0
        /// <summary>
        /// Sends the data.
        /// </summary>
        /// <param name="stream">
        /// Stream.
        /// </param>
        /// <param name="data">
        /// Data.
        /// </param>
        /// <param name="dataSize">
        /// Data size.
        /// </param>
        /// <param name="method">
        /// Method.
        /// </param>
        /// <param name="callback">
        /// Callback.
        /// </param>
        protected IEnumerator SendData(string stream, string data, int dataSize = 1,
                                       HttpMethod method = HttpMethod.POST,
                                       Action <ironsource.Response> callback = null,
                                       bool isRetry = false, float timeout = 0)
        {
            if (isRetry)
            {
                yield return(new WaitForSeconds(timeout));
            }

            if (dataSize == 1)
            {
                api_.PutEvent(stream, data, method, callback);
            }
            else if (dataSize > 1)
            {
                api_.PutEvents(stream, data, callback);
            }
        }
Пример #2
0
 public void OnPostClick()
 {
     api_.PutEvent("ibtest", "{\"test\": \"data 1\"}",
                   ironsource.HttpMethod.POST, "ApiCallbackStr");
 }