1.2.9 • Published 1 year ago

telegram-api-vue v1.2.9

Weekly downloads
61
License
GPL-3.0
Repository
github
Last release
1 year ago

Telegram Api for Vuejs

Based on TelegramApiJs

Getting started

1) Install package via npm

npm install telegram-api-vue

2) Import in your main.js

import telegramApi from './plugins/telegram';

3) Create file telegram.js in plugins folder

4) Put config in created file telegram.js

/* You should register your application on https://my.telegram.org/ */

import * as telegramApi from 'telegram-api-vue/dist/telegramApi.min';

telegramApi.setConfig({
  app: {
    id: 1167695, /* App ID */
    hash: 'b5fbdce2ae649419c889c1eb970407bc', /* App hash */
    version: '1.0.0' /* App version */
  },
  server: {
    test: [
      {
        id: 2, /* DC ID */
        host: '149.154.167.40',
        port: 443
      }
    ],
    production: [
      {
        id: 2, /* DC ID */
        host: '149.154.167.50',
        port: 443
      }
    ]
  }
});

export default telegramApi;

5) Check your status

telegramApi.getUserInfo().then(function(user) {
    if (user.id) {
        // You have already signed in
    } else {
        // Log in
    }
});

API documentation

1.2.9

1 year ago

1.2.8

3 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.0

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago