Giter VIP home page Giter VIP logo

telegraph's Introduction

Kvyk.Telegraph

Simple to use api-client for Telegra.ph. (Adapted for .net Core 2.1)

C# .NET Core 2.1

Installation

Install last varsion

Install-Package Kvyk.Telegraph
Package Name Release Version
Kvyk.Telegraph NuGet 1.0.2

How to use

You can find all documentation on Wiki

Quick start

Add using to the top of your file

using Kvyk.Telegraph;
using Kvyk.Telegraph.Models;

Let's create first account

var client = new TelegraphClient();
Account account = await client.CreateAccount(
  "MyFirstAccount",     //Short name
  "I am",               //Author name
  "https://example.com" //Author link
);
client.Token = account.AccessToken; //Your token. Save it to use your account in the future

Now we can create your first page

var nodes = new List<Node>  //Page is an array of nodes
{
  Node.H3("Test header"),
  Node.P("Hello, World!"),
  Node.ImageFigure("https://telegra.ph/images/logo.png", "Logo"),
};

var page = await client.CreatePage(
  "Test page", //Page title
  nodes
);

var url = page.Url; //Here is your page url

The example of the created page: https://telegra.ph/Test-page-06-11

How to help?

This is my first NuGet package, so I'm waiting for a feedback!

Please, tell me about any things I've missed or skiped, any features about code and comments, project description and design of repo. I will be happy to get any feedback.

Use issues or just send me email: [email protected]

telegraph's People

Contributors

markokvyk avatar nigrimmist avatar thelamed avatar

Watchers

 avatar

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.