GithubHelp home page GithubHelp logo

dannysotzny / nettelegrambotapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from justdmitry/nettelegrambotapi

0.0 2.0 0.0 183 KB

C# client library for building Telegram bot

C# 56.41% HTML 43.50% Batchfile 0.09%

nettelegrambotapi's Introduction

NetTelegramBotApi

C# client library for building Telegram bot (https://core.telegram.org/bots/api)

Contains strongly-types request and response classes, and transport class for sending requests and receiving results.

Usage

var bot = new TelegramBot(accessToken);
var me = await bot.MakeRequestAsync(new GetMe());
if (me != null)
{
   Console.WriteLine("Me: {0} (@{1})", me.FirstName, me.Username);
}

See TelegramBotDemo project for more samples.

Installation

Install as nuget package:

Install-Package NetTelegramBotApi

Dependencies: Newtonsoft.Json

Version history

3.5.50818 - API changes 'August 15, 2015'

Changes in Telegram API defined as August 15, 2015 implemented (issue #13).

All real changes were already implemented in 3.5.50816, only some documenation/comments are updated in this version.

3.5.50816 - API changes

  • Changes in Telegram API defined as July 2015 implemented (issue #7):
  • The Caption field has been removed from the Video object and added to the Message object instead.
  • Caption and Duration optional fields have been added to the SendVideo request.
  • UserId type in the Contact object changed to Long (was String - typo in API docs)
  • Changes, not [yet?] announced in Telegram API changlog:
  • Performer and Title optional fields have been added to Audio object
  • Duration, Performer and Title optional fields have been added to the SendAudio request
  • Object Voice added (to Message class)
  • SendVoice request added

3.4.50815 - Webhooks support, bugfixes

Improvements for working via webhooks:

  • SetWebhook request added (Issue #3)
  • DeserializeUpdate method added to convert webhook POST json value to Update object

Fixed issue #6 with sending files with non-latin characters in name.

3.3.50701 - DateTimeOffset instead of long

Message properties Date and ForwardDate are now DateTimeOffset (converted to local time).

3.2.50628 - With sending files

Methods for sending files (SendPhoto, SendVideo, etc) implemented.

3.1.50627 - Using HttpClient

Switched to HttpClient (instead of HttpRequest):

  • no more System.Web dependency;
  • MakeRequest method is now async only, use .Result or .Wait() for synchronous calls

2.1.50626 - Requests hierarchy

Refactored to new request model - base RequestBase class and one (and one async) MakeRequest method.

Major version increased to "2", patch version set to current date.

1.0.1 - Initial release

Response class hierarchy (Types), first requests. It works!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.