getFile
/bot{token}/getFile
Usage and SDK Samples
curl -X GET "https://api.apieco.ir/bale/bot{token}/getFile?file_id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;
import java.io.File;
import java.util.*;
public class AttachmentsApiExample {
public static void main(String[] args) {
AttachmentsApi apiInstance = new AttachmentsApi();
String token = token_example; // String | bot's token to authorize the request
String fileId = fileId_example; // String |
try {
inline_response_200_1 result = apiInstance.getFile(token, fileId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#getFile");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AttachmentsApi;
public class AttachmentsApiExample {
public static void main(String[] args) {
AttachmentsApi apiInstance = new AttachmentsApi();
String token = token_example; // String | bot's token to authorize the request
String fileId = fileId_example; // String |
try {
inline_response_200_1 result = apiInstance.getFile(token, fileId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AttachmentsApi#getFile");
e.printStackTrace();
}
}
}
String *token = token_example; // bot's token to authorize the request
String *fileId = fileId_example; //
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
[apiInstance getFileWith:token
fileId:fileId
completionHandler: ^(inline_response_200_1 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var BaleBotApi = require('bale_bot_api');
var api = new BaleBotApi.AttachmentsApi()
var token = token_example; // {{String}} bot's token to authorize the request
var fileId = fileId_example; // {{String}}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getFile(token, fileId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getFileExample
{
public void main()
{
var apiInstance = new AttachmentsApi();
var token = token_example; // String | bot's token to authorize the request
var fileId = fileId_example; // String |
try
{
inline_response_200_1 result = apiInstance.getFile(token, fileId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AttachmentsApi.getFile: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAttachmentsApi();
$token = token_example; // String | bot's token to authorize the request
$fileId = fileId_example; // String |
try {
$result = $api_instance->getFile($token, $fileId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AttachmentsApi->getFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;
my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $token = token_example; # String | bot's token to authorize the request
my $fileId = fileId_example; # String |
eval {
my $result = $api_instance->getFile(token => $token, fileId => $fileId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AttachmentsApi->getFile: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
token = token_example # String | bot's token to authorize the request
fileId = fileId_example # String |
try:
api_response = api_instance.get_file(token, fileId)
pprint(api_response)
except ApiException as e:
print("Exception when calling AttachmentsApi->getFile: %s\n" % e)
Parameters
Name | Description |
---|---|
token* |
String
bot's token to authorize the request
Required
|
Name | Description |
---|---|
file_id* |
String
Required
|