Kvyk.Telegraph
1.0.0
See the version list below for details.
dotnet add package Kvyk.Telegraph --version 1.0.0
NuGet\Install-Package Kvyk.Telegraph -Version 1.0.0
<PackageReference Include="Kvyk.Telegraph" Version="1.0.0" />
paket add Kvyk.Telegraph --version 1.0.0
#r "nuget: Kvyk.Telegraph, 1.0.0"
// Install Kvyk.Telegraph as a Cake Addin #addin nuget:?package=Kvyk.Telegraph&version=1.0.0 // Install Kvyk.Telegraph as a Cake Tool #tool nuget:?package=Kvyk.Telegraph&version=1.0.0
Kvyk.Telegraph
Simple to use api-client for Telegra.ph.
C# .NET 5.0
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
{
new Node()
{
Tag = TagEnum.H3,
Children = new List<Node>()
{
new Node()
{
Value = "Test header"
}
}
},
new Node()
{
Tag = TagEnum.P,
Children = new List<Node>()
{
new Node()
{
Value = "Hello, World!"
}
}
},
new Node()
{
Tag = TagEnum.Img,
Artibutes = new TagAttributes()
{
Src = "https://telegra.ph/images/logo.png"
}
}
};
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-07-22
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: kvykmarko@gmail.com
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net5.0
- Newtonsoft.Json (>= 13.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Kvyk.Telegraph:
Package | Downloads |
---|---|
Kvyk.Telegraph.Parsers
HTML and Markdown parser for Telegraph library Kvyk.Telegraph You can find all documentation on Wiki (https://github.com/MarkoKvyk/Telegraph/wiki) |
GitHub repositories
This package is not used by any popular GitHub repositories.