Financial Times API Documentation

CreateAccount

createAccount

Use this method to create a new Telegraph account. Most users only need one account, but this can be useful for channel administrators who would like to keep individual author names and profile links for each of their channels. On success, returns an Account object with the regular fields and an additional access_token field.


/createAccount

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/createAccount?short_name=&author_name=&author_url="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CreateAccountApi;

import java.io.File;
import java.util.*;

public class CreateAccountApiExample {

    public static void main(String[] args) {
        
        CreateAccountApi apiInstance = new CreateAccountApi();
        String apiecoKey = apiecoKey_example; // String | 
        String shortName = shortName_example; // String | Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.
        String authorName = authorName_example; // String | Default author name used when creating new articles.
        String authorUrl = authorUrl_example; // String | Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.
        try {
            inline_response_200 result = apiInstance.createAccount(apiecoKey, shortName, authorName, authorUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreateAccountApi#createAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CreateAccountApi;

public class CreateAccountApiExample {

    public static void main(String[] args) {
        CreateAccountApi apiInstance = new CreateAccountApi();
        String apiecoKey = apiecoKey_example; // String | 
        String shortName = shortName_example; // String | Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.
        String authorName = authorName_example; // String | Default author name used when creating new articles.
        String authorUrl = authorUrl_example; // String | Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.
        try {
            inline_response_200 result = apiInstance.createAccount(apiecoKey, shortName, authorName, authorUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreateAccountApi#createAccount");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *shortName = shortName_example; // Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.
String *authorName = authorName_example; // Default author name used when creating new articles. (optional)
String *authorUrl = authorUrl_example; // Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel. (optional)

CreateAccountApi *apiInstance = [[CreateAccountApi alloc] init];

[apiInstance createAccountWith:apiecoKey
    shortName:shortName
    authorName:authorName
    authorUrl:authorUrl
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.CreateAccountApi()

var apiecoKey = apiecoKey_example; // {String} 

var shortName = shortName_example; // {String} Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.

var opts = { 
  'authorName': authorName_example, // {String} Default author name used when creating new articles.
  'authorUrl': authorUrl_example // {String} Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createAccount(apiecoKey, shortName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createAccountExample
    {
        public void main()
        {
            
            var apiInstance = new CreateAccountApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var shortName = shortName_example;  // String | Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.
            var authorName = authorName_example;  // String | Default author name used when creating new articles. (optional) 
            var authorUrl = authorUrl_example;  // String | Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel. (optional) 

            try
            {
                inline_response_200 result = apiInstance.createAccount(apiecoKey, shortName, authorName, authorUrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CreateAccountApi.createAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CreateAccountApi();
$apiecoKey = apiecoKey_example; // String | 
$shortName = shortName_example; // String | Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.
$authorName = authorName_example; // String | Default author name used when creating new articles.
$authorUrl = authorUrl_example; // String | Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.

try {
    $result = $api_instance->createAccount($apiecoKey, $shortName, $authorName, $authorUrl);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CreateAccountApi->createAccount: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CreateAccountApi;

my $api_instance = WWW::SwaggerClient::CreateAccountApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $shortName = shortName_example; # String | Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.
my $authorName = authorName_example; # String | Default author name used when creating new articles.
my $authorUrl = authorUrl_example; # String | Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.

eval { 
    my $result = $api_instance->createAccount(apiecoKey => $apiecoKey, shortName => $shortName, authorName => $authorName, authorUrl => $authorUrl);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CreateAccountApi->createAccount: $@\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.CreateAccountApi()
apiecoKey = apiecoKey_example # String | 
shortName = shortName_example # String | Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.
authorName = authorName_example # String | Default author name used when creating new articles. (optional)
authorUrl = authorUrl_example # String | Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel. (optional)

try: 
    api_response = api_instance.create_account(apiecoKey, shortName, authorName=authorName, authorUrl=authorUrl)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreateAccountApi->createAccount: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
short_name*
String
Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the "Edit/Publish" button on Telegra.ph, other users don't see this name.
Required
author_name
String
Default author name used when creating new articles.
author_url
String
Default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.

Responses

Status: 200 - successful


CreatePage

createPage

Use this method to create a new Telegraph page. On success, returns a Page object.


/createPage

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/createPage?access_token=&title=&author_name=&author_url=&content="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CreatePageApi;

import java.io.File;
import java.util.*;

public class CreatePageApiExample {

    public static void main(String[] args) {
        
        CreatePageApi apiInstance = new CreatePageApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        String title = title_example; // String | Required. Page title.
        array[String] content = ; // array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
        String authorName = authorName_example; // String | Author name, displayed below the article's title.
        String authorUrl = authorUrl_example; // String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel
        try {
            inline_response_200_4 result = apiInstance.createPage(apiecoKey, accessToken, title, content, authorName, authorUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreatePageApi#createPage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CreatePageApi;

public class CreatePageApiExample {

    public static void main(String[] args) {
        CreatePageApi apiInstance = new CreatePageApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        String title = title_example; // String | Required. Page title.
        array[String] content = ; // array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
        String authorName = authorName_example; // String | Author name, displayed below the article's title.
        String authorUrl = authorUrl_example; // String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel
        try {
            inline_response_200_4 result = apiInstance.createPage(apiecoKey, accessToken, title, content, authorName, authorUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CreatePageApi#createPage");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *accessToken = accessToken_example; // Required. Access token of the Telegraph account.
String *title = title_example; // Required. Page title.
array[String] *content = ; // (Array of Node, up to 64 KB) Required. Content of the page.
String *authorName = authorName_example; // Author name, displayed below the article's title. (optional)
String *authorUrl = authorUrl_example; // Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel (optional)

CreatePageApi *apiInstance = [[CreatePageApi alloc] init];

[apiInstance createPageWith:apiecoKey
    accessToken:accessToken
    title:title
    content:content
    authorName:authorName
    authorUrl:authorUrl
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.CreatePageApi()

var apiecoKey = apiecoKey_example; // {String} 

var accessToken = accessToken_example; // {String} Required. Access token of the Telegraph account.

var title = title_example; // {String} Required. Page title.

var content = ; // {array[String]} (Array of Node, up to 64 KB) Required. Content of the page.

var opts = { 
  'authorName': authorName_example, // {String} Author name, displayed below the article's title.
  'authorUrl': authorUrl_example // {String} Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createPage(apiecoKey, accessToken, title, content, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createPageExample
    {
        public void main()
        {
            
            var apiInstance = new CreatePageApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var accessToken = accessToken_example;  // String | Required. Access token of the Telegraph account.
            var title = title_example;  // String | Required. Page title.
            var content = new array[String](); // array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
            var authorName = authorName_example;  // String | Author name, displayed below the article's title. (optional) 
            var authorUrl = authorUrl_example;  // String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel (optional) 

            try
            {
                inline_response_200_4 result = apiInstance.createPage(apiecoKey, accessToken, title, content, authorName, authorUrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CreatePageApi.createPage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CreatePageApi();
$apiecoKey = apiecoKey_example; // String | 
$accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
$title = title_example; // String | Required. Page title.
$content = ; // array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
$authorName = authorName_example; // String | Author name, displayed below the article's title.
$authorUrl = authorUrl_example; // String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel

try {
    $result = $api_instance->createPage($apiecoKey, $accessToken, $title, $content, $authorName, $authorUrl);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CreatePageApi->createPage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CreatePageApi;

my $api_instance = WWW::SwaggerClient::CreatePageApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $accessToken = accessToken_example; # String | Required. Access token of the Telegraph account.
my $title = title_example; # String | Required. Page title.
my $content = []; # array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
my $authorName = authorName_example; # String | Author name, displayed below the article's title.
my $authorUrl = authorUrl_example; # String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel

eval { 
    my $result = $api_instance->createPage(apiecoKey => $apiecoKey, accessToken => $accessToken, title => $title, content => $content, authorName => $authorName, authorUrl => $authorUrl);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CreatePageApi->createPage: $@\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.CreatePageApi()
apiecoKey = apiecoKey_example # String | 
accessToken = accessToken_example # String | Required. Access token of the Telegraph account.
title = title_example # String | Required. Page title.
content =  # array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
authorName = authorName_example # String | Author name, displayed below the article's title. (optional)
authorUrl = authorUrl_example # String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel (optional)

try: 
    api_response = api_instance.create_page(apiecoKey, accessToken, title, content, authorName=authorName, authorUrl=authorUrl)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CreatePageApi->createPage: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
access_token*
String
Required. Access token of the Telegraph account.
Required
title*
String
Required. Page title.
Required
author_name
String
Author name, displayed below the article's title.
author_url
String
Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel
content*
array[String]
(Array of Node, up to 64 KB) Required. Content of the page.
Required

Responses

Status: 200 - Successful


EditAccountInfo

editAccountInfo

Use this method to update information about a Telegraph account. Pass only the parameters that you want to edit. On success, returns an Account object with the default fields.


/editAccountInfo

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/editAccountInfo?access_token=&short_name=&author_name=&author_url="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EditAccountInfoApi;

import java.io.File;
import java.util.*;

public class EditAccountInfoApiExample {

    public static void main(String[] args) {
        
        EditAccountInfoApi apiInstance = new EditAccountInfoApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        String shortName = shortName_example; // String | New account name.
        String authorName = authorName_example; // String | New default author name used when creating new articles.
        String authorUrl = authorUrl_example; // String | New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.
        try {
            inline_response_200_1 result = apiInstance.editAccountInfo(apiecoKey, accessToken, shortName, authorName, authorUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EditAccountInfoApi#editAccountInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EditAccountInfoApi;

public class EditAccountInfoApiExample {

    public static void main(String[] args) {
        EditAccountInfoApi apiInstance = new EditAccountInfoApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        String shortName = shortName_example; // String | New account name.
        String authorName = authorName_example; // String | New default author name used when creating new articles.
        String authorUrl = authorUrl_example; // String | New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.
        try {
            inline_response_200_1 result = apiInstance.editAccountInfo(apiecoKey, accessToken, shortName, authorName, authorUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EditAccountInfoApi#editAccountInfo");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *accessToken = accessToken_example; // Required. Access token of the Telegraph account.
String *shortName = shortName_example; // New account name.
String *authorName = authorName_example; // New default author name used when creating new articles. (optional)
String *authorUrl = authorUrl_example; // New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel. (optional)

EditAccountInfoApi *apiInstance = [[EditAccountInfoApi alloc] init];

[apiInstance editAccountInfoWith:apiecoKey
    accessToken:accessToken
    shortName:shortName
    authorName:authorName
    authorUrl:authorUrl
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.EditAccountInfoApi()

var apiecoKey = apiecoKey_example; // {String} 

var accessToken = accessToken_example; // {String} Required. Access token of the Telegraph account.

var shortName = shortName_example; // {String} New account name.

var opts = { 
  'authorName': authorName_example, // {String} New default author name used when creating new articles.
  'authorUrl': authorUrl_example // {String} New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.editAccountInfo(apiecoKey, accessToken, shortName, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class editAccountInfoExample
    {
        public void main()
        {
            
            var apiInstance = new EditAccountInfoApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var accessToken = accessToken_example;  // String | Required. Access token of the Telegraph account.
            var shortName = shortName_example;  // String | New account name.
            var authorName = authorName_example;  // String | New default author name used when creating new articles. (optional) 
            var authorUrl = authorUrl_example;  // String | New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel. (optional) 

            try
            {
                inline_response_200_1 result = apiInstance.editAccountInfo(apiecoKey, accessToken, shortName, authorName, authorUrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EditAccountInfoApi.editAccountInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\EditAccountInfoApi();
$apiecoKey = apiecoKey_example; // String | 
$accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
$shortName = shortName_example; // String | New account name.
$authorName = authorName_example; // String | New default author name used when creating new articles.
$authorUrl = authorUrl_example; // String | New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.

try {
    $result = $api_instance->editAccountInfo($apiecoKey, $accessToken, $shortName, $authorName, $authorUrl);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EditAccountInfoApi->editAccountInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EditAccountInfoApi;

my $api_instance = WWW::SwaggerClient::EditAccountInfoApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $accessToken = accessToken_example; # String | Required. Access token of the Telegraph account.
my $shortName = shortName_example; # String | New account name.
my $authorName = authorName_example; # String | New default author name used when creating new articles.
my $authorUrl = authorUrl_example; # String | New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.

eval { 
    my $result = $api_instance->editAccountInfo(apiecoKey => $apiecoKey, accessToken => $accessToken, shortName => $shortName, authorName => $authorName, authorUrl => $authorUrl);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EditAccountInfoApi->editAccountInfo: $@\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.EditAccountInfoApi()
apiecoKey = apiecoKey_example # String | 
accessToken = accessToken_example # String | Required. Access token of the Telegraph account.
shortName = shortName_example # String | New account name.
authorName = authorName_example # String | New default author name used when creating new articles. (optional)
authorUrl = authorUrl_example # String | New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel. (optional)

try: 
    api_response = api_instance.edit_account_info(apiecoKey, accessToken, shortName, authorName=authorName, authorUrl=authorUrl)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EditAccountInfoApi->editAccountInfo: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
access_token*
String
Required. Access token of the Telegraph account.
Required
short_name*
String
New account name.
Required
author_name
String
New default author name used when creating new articles.
author_url
String
New default profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel.

Responses

Status: 200 - Successful


EditPage

editPage

Use this method to edit an existing Telegraph page. On success, returns a Page object.


/editPage

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/editPage?access_token=&title=&author_name=&author_url=&content="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EditPageApi;

import java.io.File;
import java.util.*;

public class EditPageApiExample {

    public static void main(String[] args) {
        
        EditPageApi apiInstance = new EditPageApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        String title = title_example; // String | Required. Page title.
        array[String] content = ; // array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
        String authorName = authorName_example; // String | Author name, displayed below the article's title.
        String authorUrl = authorUrl_example; // String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel
        try {
            inline_response_200_4 result = apiInstance.editPage(apiecoKey, accessToken, title, content, authorName, authorUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EditPageApi#editPage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EditPageApi;

public class EditPageApiExample {

    public static void main(String[] args) {
        EditPageApi apiInstance = new EditPageApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        String title = title_example; // String | Required. Page title.
        array[String] content = ; // array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
        String authorName = authorName_example; // String | Author name, displayed below the article's title.
        String authorUrl = authorUrl_example; // String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel
        try {
            inline_response_200_4 result = apiInstance.editPage(apiecoKey, accessToken, title, content, authorName, authorUrl);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EditPageApi#editPage");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *accessToken = accessToken_example; // Required. Access token of the Telegraph account.
String *title = title_example; // Required. Page title.
array[String] *content = ; // (Array of Node, up to 64 KB) Required. Content of the page.
String *authorName = authorName_example; // Author name, displayed below the article's title. (optional)
String *authorUrl = authorUrl_example; // Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel (optional)

EditPageApi *apiInstance = [[EditPageApi alloc] init];

[apiInstance editPageWith:apiecoKey
    accessToken:accessToken
    title:title
    content:content
    authorName:authorName
    authorUrl:authorUrl
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.EditPageApi()

var apiecoKey = apiecoKey_example; // {String} 

var accessToken = accessToken_example; // {String} Required. Access token of the Telegraph account.

var title = title_example; // {String} Required. Page title.

var content = ; // {array[String]} (Array of Node, up to 64 KB) Required. Content of the page.

var opts = { 
  'authorName': authorName_example, // {String} Author name, displayed below the article's title.
  'authorUrl': authorUrl_example // {String} Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.editPage(apiecoKey, accessToken, title, content, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class editPageExample
    {
        public void main()
        {
            
            var apiInstance = new EditPageApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var accessToken = accessToken_example;  // String | Required. Access token of the Telegraph account.
            var title = title_example;  // String | Required. Page title.
            var content = new array[String](); // array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
            var authorName = authorName_example;  // String | Author name, displayed below the article's title. (optional) 
            var authorUrl = authorUrl_example;  // String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel (optional) 

            try
            {
                inline_response_200_4 result = apiInstance.editPage(apiecoKey, accessToken, title, content, authorName, authorUrl);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EditPageApi.editPage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\EditPageApi();
$apiecoKey = apiecoKey_example; // String | 
$accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
$title = title_example; // String | Required. Page title.
$content = ; // array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
$authorName = authorName_example; // String | Author name, displayed below the article's title.
$authorUrl = authorUrl_example; // String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel

try {
    $result = $api_instance->editPage($apiecoKey, $accessToken, $title, $content, $authorName, $authorUrl);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EditPageApi->editPage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EditPageApi;

my $api_instance = WWW::SwaggerClient::EditPageApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $accessToken = accessToken_example; # String | Required. Access token of the Telegraph account.
my $title = title_example; # String | Required. Page title.
my $content = []; # array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
my $authorName = authorName_example; # String | Author name, displayed below the article's title.
my $authorUrl = authorUrl_example; # String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel

eval { 
    my $result = $api_instance->editPage(apiecoKey => $apiecoKey, accessToken => $accessToken, title => $title, content => $content, authorName => $authorName, authorUrl => $authorUrl);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EditPageApi->editPage: $@\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.EditPageApi()
apiecoKey = apiecoKey_example # String | 
accessToken = accessToken_example # String | Required. Access token of the Telegraph account.
title = title_example # String | Required. Page title.
content =  # array[String] | (Array of Node, up to 64 KB) Required. Content of the page.
authorName = authorName_example # String | Author name, displayed below the article's title. (optional)
authorUrl = authorUrl_example # String | Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel (optional)

try: 
    api_response = api_instance.edit_page(apiecoKey, accessToken, title, content, authorName=authorName, authorUrl=authorUrl)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EditPageApi->editPage: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
access_token*
String
Required. Access token of the Telegraph account.
Required
title*
String
Required. Page title.
Required
author_name
String
Author name, displayed below the article's title.
author_url
String
Profile link, opened when users click on the author's name below the title. Can be any link, not necessarily to a Telegram profile or channel
content*
array[String]
(Array of Node, up to 64 KB) Required. Content of the page.
Required

Responses

Status: 200 - Successful


GetAccountInfo

getAccountInfo

Use this method to get information about a Telegraph account. Returns an Account object on success.


/getAccountInfo

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/getAccountInfo?access_token=&fields="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GetAccountInfoApi;

import java.io.File;
import java.util.*;

public class GetAccountInfoApiExample {

    public static void main(String[] args) {
        
        GetAccountInfoApi apiInstance = new GetAccountInfoApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        array[String] fields = ; // array[String] | (Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.
        try {
            inline_response_200_2 result = apiInstance.getAccountInfo(apiecoKey, accessToken, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GetAccountInfoApi#getAccountInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GetAccountInfoApi;

public class GetAccountInfoApiExample {

    public static void main(String[] args) {
        GetAccountInfoApi apiInstance = new GetAccountInfoApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        array[String] fields = ; // array[String] | (Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.
        try {
            inline_response_200_2 result = apiInstance.getAccountInfo(apiecoKey, accessToken, fields);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GetAccountInfoApi#getAccountInfo");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *accessToken = accessToken_example; // Required. Access token of the Telegraph account.
array[String] *fields = ; // (Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.

GetAccountInfoApi *apiInstance = [[GetAccountInfoApi alloc] init];

[apiInstance getAccountInfoWith:apiecoKey
    accessToken:accessToken
    fields:fields
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.GetAccountInfoApi()

var apiecoKey = apiecoKey_example; // {String} 

var accessToken = accessToken_example; // {String} Required. Access token of the Telegraph account.

var fields = ; // {array[String]} (Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccountInfo(apiecoKey, accessToken, fields, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAccountInfoExample
    {
        public void main()
        {
            
            var apiInstance = new GetAccountInfoApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var accessToken = accessToken_example;  // String | Required. Access token of the Telegraph account.
            var fields = new array[String](); // array[String] | (Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.

            try
            {
                inline_response_200_2 result = apiInstance.getAccountInfo(apiecoKey, accessToken, fields);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GetAccountInfoApi.getAccountInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\GetAccountInfoApi();
$apiecoKey = apiecoKey_example; // String | 
$accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
$fields = ; // array[String] | (Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.

try {
    $result = $api_instance->getAccountInfo($apiecoKey, $accessToken, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GetAccountInfoApi->getAccountInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GetAccountInfoApi;

my $api_instance = WWW::SwaggerClient::GetAccountInfoApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $accessToken = accessToken_example; # String | Required. Access token of the Telegraph account.
my $fields = []; # array[String] | (Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.

eval { 
    my $result = $api_instance->getAccountInfo(apiecoKey => $apiecoKey, accessToken => $accessToken, fields => $fields);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GetAccountInfoApi->getAccountInfo: $@\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.GetAccountInfoApi()
apiecoKey = apiecoKey_example # String | 
accessToken = accessToken_example # String | Required. Access token of the Telegraph account.
fields =  # array[String] | (Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.

try: 
    api_response = api_instance.get_account_info(apiecoKey, accessToken, fields)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GetAccountInfoApi->getAccountInfo: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
access_token*
String
Required. Access token of the Telegraph account.
Required
fields*
array[String]
(Array of String, default = [“short_name”,“author_name”,“author_url”]) List of account fields to return. Available fields: short_name, author_name, author_url, auth_url, page_count.
Required

Responses

Status: 200 - Successful


GetPage

getPage

Use this method to get a Telegraph page. Returns a Page object on success.


/getPage/{path}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/getPage/{path}?return_content="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GetPageApi;

import java.io.File;
import java.util.*;

public class GetPageApiExample {

    public static void main(String[] args) {
        
        GetPageApi apiInstance = new GetPageApi();
        String apiecoKey = apiecoKey_example; // String | 
        String path = path_example; // String | Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).
        Boolean returnContent = true; // Boolean | If true, content field will be returned in Page object.
        try {
            inline_response_200_4 result = apiInstance.getPage(apiecoKey, path, returnContent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GetPageApi#getPage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GetPageApi;

public class GetPageApiExample {

    public static void main(String[] args) {
        GetPageApi apiInstance = new GetPageApi();
        String apiecoKey = apiecoKey_example; // String | 
        String path = path_example; // String | Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).
        Boolean returnContent = true; // Boolean | If true, content field will be returned in Page object.
        try {
            inline_response_200_4 result = apiInstance.getPage(apiecoKey, path, returnContent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GetPageApi#getPage");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *path = path_example; // Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).
Boolean *returnContent = true; // If true, content field will be returned in Page object. (optional) (default to false)

GetPageApi *apiInstance = [[GetPageApi alloc] init];

[apiInstance getPageWith:apiecoKey
    path:path
    returnContent:returnContent
              completionHandler: ^(inline_response_200_4 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.GetPageApi()

var apiecoKey = apiecoKey_example; // {String} 

var path = path_example; // {String} Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).

var opts = { 
  'returnContent': true // {Boolean} If true, content field will be returned in Page object.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPage(apiecoKey, path, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPageExample
    {
        public void main()
        {
            
            var apiInstance = new GetPageApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var path = path_example;  // String | Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).
            var returnContent = true;  // Boolean | If true, content field will be returned in Page object. (optional)  (default to false)

            try
            {
                inline_response_200_4 result = apiInstance.getPage(apiecoKey, path, returnContent);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GetPageApi.getPage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\GetPageApi();
$apiecoKey = apiecoKey_example; // String | 
$path = path_example; // String | Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).
$returnContent = true; // Boolean | If true, content field will be returned in Page object.

try {
    $result = $api_instance->getPage($apiecoKey, $path, $returnContent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GetPageApi->getPage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GetPageApi;

my $api_instance = WWW::SwaggerClient::GetPageApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $path = path_example; # String | Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).
my $returnContent = true; # Boolean | If true, content field will be returned in Page object.

eval { 
    my $result = $api_instance->getPage(apiecoKey => $apiecoKey, path => $path, returnContent => $returnContent);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GetPageApi->getPage: $@\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.GetPageApi()
apiecoKey = apiecoKey_example # String | 
path = path_example # String | Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).
returnContent = true # Boolean | If true, content field will be returned in Page object. (optional) (default to false)

try: 
    api_response = api_instance.get_page(apiecoKey, path, returnContent=returnContent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GetPageApi->getPage: %s\n" % e)

Parameters

Path parameters
Name Description
path*
String
Required. Path to the Telegraph page (in the format Title-12-31, i.e. everything that comes after http://telegra.ph/).
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
return_content
Boolean
If true, content field will be returned in Page object.

Responses

Status: 200 - Successful


GetPageList

getPageList

Use this method to get a list of pages belonging to a Telegraph account. Returns a PageList object, sorted by most recently created pages first.


/getPageList

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/getPageList?access_token=&offset=&limit="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GetPageListApi;

import java.io.File;
import java.util.*;

public class GetPageListApiExample {

    public static void main(String[] args) {
        
        GetPageListApi apiInstance = new GetPageListApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        Integer offset = 56; // Integer | Sequential number of the first page to be returned.
        Integer limit = 56; // Integer | Limits the number of pages to be retrieved.
        try {
            inline_response_200_5 result = apiInstance.getPageList(apiecoKey, accessToken, offset, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GetPageListApi#getPageList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GetPageListApi;

public class GetPageListApiExample {

    public static void main(String[] args) {
        GetPageListApi apiInstance = new GetPageListApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        Integer offset = 56; // Integer | Sequential number of the first page to be returned.
        Integer limit = 56; // Integer | Limits the number of pages to be retrieved.
        try {
            inline_response_200_5 result = apiInstance.getPageList(apiecoKey, accessToken, offset, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GetPageListApi#getPageList");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *accessToken = accessToken_example; // Required. Access token of the Telegraph account.
Integer *offset = 56; // Sequential number of the first page to be returned. (optional)
Integer *limit = 56; // Limits the number of pages to be retrieved. (optional)

GetPageListApi *apiInstance = [[GetPageListApi alloc] init];

[apiInstance getPageListWith:apiecoKey
    accessToken:accessToken
    offset:offset
    limit:limit
              completionHandler: ^(inline_response_200_5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.GetPageListApi()

var apiecoKey = apiecoKey_example; // {String} 

var accessToken = accessToken_example; // {String} Required. Access token of the Telegraph account.

var opts = { 
  'offset': 56, // {Integer} Sequential number of the first page to be returned.
  'limit': 56 // {Integer} Limits the number of pages to be retrieved.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPageList(apiecoKey, accessToken, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPageListExample
    {
        public void main()
        {
            
            var apiInstance = new GetPageListApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var accessToken = accessToken_example;  // String | Required. Access token of the Telegraph account.
            var offset = 56;  // Integer | Sequential number of the first page to be returned. (optional) 
            var limit = 56;  // Integer | Limits the number of pages to be retrieved. (optional) 

            try
            {
                inline_response_200_5 result = apiInstance.getPageList(apiecoKey, accessToken, offset, limit);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GetPageListApi.getPageList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\GetPageListApi();
$apiecoKey = apiecoKey_example; // String | 
$accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
$offset = 56; // Integer | Sequential number of the first page to be returned.
$limit = 56; // Integer | Limits the number of pages to be retrieved.

try {
    $result = $api_instance->getPageList($apiecoKey, $accessToken, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GetPageListApi->getPageList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GetPageListApi;

my $api_instance = WWW::SwaggerClient::GetPageListApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $accessToken = accessToken_example; # String | Required. Access token of the Telegraph account.
my $offset = 56; # Integer | Sequential number of the first page to be returned.
my $limit = 56; # Integer | Limits the number of pages to be retrieved.

eval { 
    my $result = $api_instance->getPageList(apiecoKey => $apiecoKey, accessToken => $accessToken, offset => $offset, limit => $limit);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GetPageListApi->getPageList: $@\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.GetPageListApi()
apiecoKey = apiecoKey_example # String | 
accessToken = accessToken_example # String | Required. Access token of the Telegraph account.
offset = 56 # Integer | Sequential number of the first page to be returned. (optional)
limit = 56 # Integer | Limits the number of pages to be retrieved. (optional)

try: 
    api_response = api_instance.get_page_list(apiecoKey, accessToken, offset=offset, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GetPageListApi->getPageList: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
access_token*
String
Required. Access token of the Telegraph account.
Required
offset
Integer
Sequential number of the first page to be returned.
limit
Integer
Limits the number of pages to be retrieved.

Responses

Status: 200 - Successful


GetViews

getViews

Use this method to get the number of views for a Telegraph article. Returns a PageViews object on success. By default, the total number of page views will be returned.


/getViews/{path}

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/getViews/{path}?year=&month=&day=&hour="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GetViewsApi;

import java.io.File;
import java.util.*;

public class GetViewsApiExample {

    public static void main(String[] args) {
        
        GetViewsApi apiInstance = new GetViewsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String path = path_example; // String | Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
        Integer year = 56; // Integer | Required if month is passed. If passed, the number of page views for the requested year will be returned.
        Integer month = 56; // Integer | Required if day is passed. If passed, the number of page views for the requested month will be returned.
        Integer day = 56; // Integer | Required if hour is passed. If passed, the number of page views for the requested day will be returned.
        Integer hour = 56; // Integer | If passed, the number of page views for the requested hour will be returned.
        try {
            inline_response_200_6 result = apiInstance.getViews(apiecoKey, path, year, month, day, hour);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GetViewsApi#getViews");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GetViewsApi;

public class GetViewsApiExample {

    public static void main(String[] args) {
        GetViewsApi apiInstance = new GetViewsApi();
        String apiecoKey = apiecoKey_example; // String | 
        String path = path_example; // String | Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
        Integer year = 56; // Integer | Required if month is passed. If passed, the number of page views for the requested year will be returned.
        Integer month = 56; // Integer | Required if day is passed. If passed, the number of page views for the requested month will be returned.
        Integer day = 56; // Integer | Required if hour is passed. If passed, the number of page views for the requested day will be returned.
        Integer hour = 56; // Integer | If passed, the number of page views for the requested hour will be returned.
        try {
            inline_response_200_6 result = apiInstance.getViews(apiecoKey, path, year, month, day, hour);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GetViewsApi#getViews");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *path = path_example; // Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
Integer *year = 56; // Required if month is passed. If passed, the number of page views for the requested year will be returned. (optional)
Integer *month = 56; // Required if day is passed. If passed, the number of page views for the requested month will be returned. (optional)
Integer *day = 56; // Required if hour is passed. If passed, the number of page views for the requested day will be returned. (optional)
Integer *hour = 56; // If passed, the number of page views for the requested hour will be returned. (optional)

GetViewsApi *apiInstance = [[GetViewsApi alloc] init];

[apiInstance getViewsWith:apiecoKey
    path:path
    year:year
    month:month
    day:day
    hour:hour
              completionHandler: ^(inline_response_200_6 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.GetViewsApi()

var apiecoKey = apiecoKey_example; // {String} 

var path = path_example; // {String} Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).

var opts = { 
  'year': 56, // {Integer} Required if month is passed. If passed, the number of page views for the requested year will be returned.
  'month': 56, // {Integer} Required if day is passed. If passed, the number of page views for the requested month will be returned.
  'day': 56, // {Integer} Required if hour is passed. If passed, the number of page views for the requested day will be returned.
  'hour': 56 // {Integer} If passed, the number of page views for the requested hour will be returned.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getViews(apiecoKey, path, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getViewsExample
    {
        public void main()
        {
            
            var apiInstance = new GetViewsApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var path = path_example;  // String | Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
            var year = 56;  // Integer | Required if month is passed. If passed, the number of page views for the requested year will be returned. (optional) 
            var month = 56;  // Integer | Required if day is passed. If passed, the number of page views for the requested month will be returned. (optional) 
            var day = 56;  // Integer | Required if hour is passed. If passed, the number of page views for the requested day will be returned. (optional) 
            var hour = 56;  // Integer | If passed, the number of page views for the requested hour will be returned. (optional) 

            try
            {
                inline_response_200_6 result = apiInstance.getViews(apiecoKey, path, year, month, day, hour);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GetViewsApi.getViews: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\GetViewsApi();
$apiecoKey = apiecoKey_example; // String | 
$path = path_example; // String | Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
$year = 56; // Integer | Required if month is passed. If passed, the number of page views for the requested year will be returned.
$month = 56; // Integer | Required if day is passed. If passed, the number of page views for the requested month will be returned.
$day = 56; // Integer | Required if hour is passed. If passed, the number of page views for the requested day will be returned.
$hour = 56; // Integer | If passed, the number of page views for the requested hour will be returned.

try {
    $result = $api_instance->getViews($apiecoKey, $path, $year, $month, $day, $hour);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GetViewsApi->getViews: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GetViewsApi;

my $api_instance = WWW::SwaggerClient::GetViewsApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $path = path_example; # String | Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
my $year = 56; # Integer | Required if month is passed. If passed, the number of page views for the requested year will be returned.
my $month = 56; # Integer | Required if day is passed. If passed, the number of page views for the requested month will be returned.
my $day = 56; # Integer | Required if hour is passed. If passed, the number of page views for the requested day will be returned.
my $hour = 56; # Integer | If passed, the number of page views for the requested hour will be returned.

eval { 
    my $result = $api_instance->getViews(apiecoKey => $apiecoKey, path => $path, year => $year, month => $month, day => $day, hour => $hour);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GetViewsApi->getViews: $@\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.GetViewsApi()
apiecoKey = apiecoKey_example # String | 
path = path_example # String | Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
year = 56 # Integer | Required if month is passed. If passed, the number of page views for the requested year will be returned. (optional)
month = 56 # Integer | Required if day is passed. If passed, the number of page views for the requested month will be returned. (optional)
day = 56 # Integer | Required if hour is passed. If passed, the number of page views for the requested day will be returned. (optional)
hour = 56 # Integer | If passed, the number of page views for the requested hour will be returned. (optional)

try: 
    api_response = api_instance.get_views(apiecoKey, path, year=year, month=month, day=day, hour=hour)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GetViewsApi->getViews: %s\n" % e)

Parameters

Path parameters
Name Description
path*
String
Required. Path to the Telegraph page (in the format Title-12-31, where 12 is the month and 31 the day the article was first published).
Required
Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
year
Integer
Required if month is passed. If passed, the number of page views for the requested year will be returned.
month
Integer
Required if day is passed. If passed, the number of page views for the requested month will be returned.
day
Integer
Required if hour is passed. If passed, the number of page views for the requested day will be returned.
hour
Integer
If passed, the number of page views for the requested hour will be returned.

Responses

Status: 200 - Successful


RevokeAccessToken

revokeAccessToken

Use this method to revoke access_token and generate a new one, for example, if the user would like to reset all connected sessions, or you have reasons to believe the token was compromised. On success, returns an Account object with new access_token and auth_url fields.


/revokeAccessToken

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/telegraph/revokeAccessToken?access_token="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RevokeAccessTokenApi;

import java.io.File;
import java.util.*;

public class RevokeAccessTokenApiExample {

    public static void main(String[] args) {
        
        RevokeAccessTokenApi apiInstance = new RevokeAccessTokenApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        try {
            inline_response_200_3 result = apiInstance.revokeAccessToken(apiecoKey, accessToken);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RevokeAccessTokenApi#revokeAccessToken");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RevokeAccessTokenApi;

public class RevokeAccessTokenApiExample {

    public static void main(String[] args) {
        RevokeAccessTokenApi apiInstance = new RevokeAccessTokenApi();
        String apiecoKey = apiecoKey_example; // String | 
        String accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.
        try {
            inline_response_200_3 result = apiInstance.revokeAccessToken(apiecoKey, accessToken);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RevokeAccessTokenApi#revokeAccessToken");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *accessToken = accessToken_example; // Required. Access token of the Telegraph account.

RevokeAccessTokenApi *apiInstance = [[RevokeAccessTokenApi alloc] init];

[apiInstance revokeAccessTokenWith:apiecoKey
    accessToken:accessToken
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FinancialTimesApiDocumentation = require('financial_times_api_documentation');

var api = new FinancialTimesApiDocumentation.RevokeAccessTokenApi()

var apiecoKey = apiecoKey_example; // {String} 

var accessToken = accessToken_example; // {String} Required. Access token of the Telegraph account.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.revokeAccessToken(apiecoKey, accessToken, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class revokeAccessTokenExample
    {
        public void main()
        {
            
            var apiInstance = new RevokeAccessTokenApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var accessToken = accessToken_example;  // String | Required. Access token of the Telegraph account.

            try
            {
                inline_response_200_3 result = apiInstance.revokeAccessToken(apiecoKey, accessToken);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RevokeAccessTokenApi.revokeAccessToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\RevokeAccessTokenApi();
$apiecoKey = apiecoKey_example; // String | 
$accessToken = accessToken_example; // String | Required. Access token of the Telegraph account.

try {
    $result = $api_instance->revokeAccessToken($apiecoKey, $accessToken);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RevokeAccessTokenApi->revokeAccessToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RevokeAccessTokenApi;

my $api_instance = WWW::SwaggerClient::RevokeAccessTokenApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $accessToken = accessToken_example; # String | Required. Access token of the Telegraph account.

eval { 
    my $result = $api_instance->revokeAccessToken(apiecoKey => $apiecoKey, accessToken => $accessToken);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RevokeAccessTokenApi->revokeAccessToken: $@\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.RevokeAccessTokenApi()
apiecoKey = apiecoKey_example # String | 
accessToken = accessToken_example # String | Required. Access token of the Telegraph account.

try: 
    api_response = api_instance.revoke_access_token(apiecoKey, accessToken)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RevokeAccessTokenApi->revokeAccessToken: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
access_token*
String
Required. Access token of the Telegraph account.
Required

Responses

Status: 200 - Successful