Exemplo n.º 1
0
 /// <summary>
 /// Gets information about the specified file asynchronously.
 /// </summary>
 /// <param name="token">The API token.</param>
 /// <param name="callback">The callback action.</param>
 /// <param name="roomId">The chat room id.</param>
 /// <param name="fileId">The file id.</param>
 /// <param name="parameters">The file condition parameters.</param>
 public static async void GetRoomFileAsync(
     string token,
     Action <ResponseData <DataType> > callback,
     long roomId,
     long fileId,
     ParametersType parameters = null)
 {
     var path = string.Format(CultureInfo.InvariantCulture, Path.RoomFile, roomId, fileId);
     await APICommunicator.CreateGetTask(token, callback, path, parameters)
     .ConfigureAwait(false);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Gets information about the specified file.
        /// </summary>
        /// <param name="roomId">The chat room id.</param>
        /// <param name="fileId">The file id.</param>
        /// <param name="parameters">The file condition parameters.</param>
        /// <returns>Response data.</returns>
        public ResponseData <DataType> GetRoomFile(long roomId, long fileId, ParametersType parameters = null)
        {
            var path = string.Format(CultureInfo.InvariantCulture, Path.RoomFile, roomId, fileId);

            return(Communicator.Get <DataType, ParametersType>(path, parameters));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets information about the specified file asynchronously.
        /// </summary>
        /// <param name="token">The API token.</param>
        /// <param name="roomId">The chat room id.</param>
        /// <param name="fileId">The file id.</param>
        /// <param name="parameters">The file condition parameters.</param>
        /// <returns>The response data.</returns>
        public static async Task <ResponseData <DataType> > GetRoomFileAsync(string token, long roomId, long fileId, ParametersType parameters = null)
        {
            var path = string.Format(CultureInfo.InvariantCulture, Path.RoomFile, roomId, fileId);

            return(await APICommunicator.CreateGetTask <DataType, ParametersType>(token, path, parameters)
                   .ConfigureAwait(false));
        }