Caelestis.Telegraph
1.2.0
File upload no longer supported by Telegraph
dotnet add package Caelestis.Telegraph --version 1.2.0
NuGet\Install-Package Caelestis.Telegraph -Version 1.2.0
<PackageReference Include="Caelestis.Telegraph" Version="1.2.0" />
paket add Caelestis.Telegraph --version 1.2.0
#r "nuget: Caelestis.Telegraph, 1.2.0"
// Install Caelestis.Telegraph as a Cake Addin #addin nuget:?package=Caelestis.Telegraph&version=1.2.0 // Install Caelestis.Telegraph as a Cake Tool #tool nuget:?package=Caelestis.Telegraph&version=1.2.0
Caelestis.Telegraph
Forked from MarkoKvyk/Telegraph
This client was forked to update the dependencies and target .NET 7.0 An interface for TelegraphClient was added to allow for mocking in unit tests if needed.
Simple to use api-client for Telegra.ph.
C# .NET 7.0
Installation
Install last varsion
Install-Package Kvyk.Telegraph
Package Name | Release | Version |
---|---|---|
Caelestis.Telegraph |
NuGet | 1.2.0 |
How to use
You can find all documentation on Wiki
Quick start
Add using
to the top of your file
using Caelestis.Telegraph;
using Caelestis.Telegraph.Models;
Let's create an account first
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?
If you want to help me, you can create an issue or a pull request.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.2.0 | 146 | 11/15/2023 |
- Fixed uploaded image url
- Added Interface for mocking
- Updated dependencies and Targeted Framework to 7.0