From 9e92d3d81475aaa363fbfb1a458337ec795360a0 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Tue, 24 Oct 2023 17:00:14 +0200
Subject: [PATCH] api doc
---
src/TL.Schema.cs | 59 ++++++++++++++++++++++++++++++++-----------
src/TL.SchemaFuncs.cs | 15 +++++++----
src/TL.Secret.cs | 2 +-
3 files changed, 55 insertions(+), 21 deletions(-)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 3b3a121..6efec45 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -311,7 +311,7 @@ namespace TL
public string title;
/// Physical address of the venue
public string address;
- /// Venue provider: currently only "foursquare" needs to be supported
+ /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported
public string provider;
/// Venue ID in the provider's database
public string venue_id;
@@ -1671,7 +1671,7 @@ namespace TL
pinned = 0x1000000,
/// Field has a value
has_ttl_period = 0x2000000,
- /// Whether this message is protected and thus cannot be forwarded
+ /// Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).
noforwards = 0x4000000,
}
@@ -1837,7 +1837,7 @@ namespace TL
public string title;
/// Address
public string address;
- /// Venue provider: currently only "foursquare" needs to be supported
+ /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported
public string provider;
/// Venue ID in the provider's database
public string venue_id;
@@ -5817,7 +5817,7 @@ namespace TL
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
- /// Privacy key See
+ /// Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a constructor, and its input counterpart . See
public enum InputPrivacyKey : uint
{
///Whether people will be able to see your exact last online timestamp
@@ -5842,7 +5842,7 @@ namespace TL
About = 0x3823CC40,
}
- /// Privacy key See
+ /// Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a constructor, and its input counterpart . See
public enum PrivacyKey : uint
{
///Whether we can see the last online timestamp of this user
@@ -5867,7 +5867,7 @@ namespace TL
About = 0xA486B761,
}
- /// Privacy rule See Derived classes: , , , , , , , ,
+ /// Privacy rules indicate who can or can't do something and are specified by a , and its input counterpart . See Derived classes: , , , , , , , ,
public abstract class InputPrivacyRule : IObject { }
/// Allow only contacts See
[TLDef(0x0D09E07B)]
@@ -5913,7 +5913,7 @@ namespace TL
[TLDef(0x2F453E49)]
public class InputPrivacyValueAllowCloseFriends : InputPrivacyRule { }
- /// Privacy rule See Derived classes: , , , , , , , ,
+ /// Privacy rules together with privacy indicate what can or can't someone do and are specified by a constructor, and its input counterpart . See Derived classes: , , , , , , , ,
public abstract class PrivacyRule : IObject { }
/// Allow all contacts See
[TLDef(0xFFFE1BAC)]
@@ -6963,7 +6963,7 @@ namespace TL
public KeyboardButtonRow[] rows;
}
- /// Message entities, representing styled text in a message See Derived classes: , , , , , , , , , , , , , , , , , , , ,
+ /// Message entities, representing styled text in a message See Derived classes: , , , , , , , , , , , , , , , , , , ,
public abstract partial class MessageEntity : IObject
{
/// Offset of message entity within message (in UTF-16 code units)
@@ -7533,7 +7533,7 @@ namespace TL
public string title;
/// Address
public string address;
- /// Venue provider: currently only "foursquare" needs to be supported
+ /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported
public string provider;
/// Venue ID in the provider's database
public string venue_id;
@@ -7822,7 +7822,7 @@ namespace TL
public string title;
/// Address
public string address;
- /// Venue provider: currently only "foursquare" needs to be supported
+ /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported
public string provider;
/// Venue ID in the provider's database
public string venue_id;
@@ -15125,22 +15125,29 @@ namespace TL
public override int ID => id;
}
- /// See
+ /// Represents a story. See
[TLDef(0x44C457CE)]
public class StoryItem : StoryItemBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// ID of the story.
public int id;
+ /// When was the story posted.
public DateTime date;
+ /// When does the story expire.
public DateTime expire_date;
+ /// Story caption.
[IfFlag(0)] public string caption;
/// Message entities for styled text
[IfFlag(1)] public MessageEntity[] entities;
+ /// Story media.
public MessageMedia media;
+ /// List of media areas, see here » for more info on media areas.
[IfFlag(14)] public MediaArea[] media_areas;
[IfFlag(2)] public PrivacyRule[] privacy;
[IfFlag(3)] public StoryViews views;
+ /// The reaction we sent.
[IfFlag(15)] public Reaction sent_reaction;
[Flags] public enum Flags : uint
@@ -15157,7 +15164,9 @@ namespace TL
public_ = 0x80,
close_friends = 0x100,
min = 0x200,
+ /// Whether this story is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).
noforwards = 0x400,
+ /// Indicates whether the story was edited.
edited = 0x800,
contacts = 0x1000,
selected_contacts = 0x2000,
@@ -15165,9 +15174,11 @@ namespace TL
has_media_areas = 0x4000,
/// Field has a value
has_sent_reaction = 0x8000,
+ /// indicates whether we sent this story.
out_ = 0x10000,
}
+ /// ID of the story.
public override int ID => id;
}
@@ -15317,29 +15328,41 @@ namespace TL
}
}
- /// See
+ /// Coordinates and size of a clicable rectangular area on top of a story. See
[TLDef(0x03D1EA4E)]
public class MediaAreaCoordinates : IObject
{
+ /// The abscissa of the rectangle's center, as a percentage of the media width (0-100).
public double x;
+ /// The ordinate of the rectangle's center, as a percentage of the media height (0-100).
public double y;
+ /// The width of the rectangle, as a percentage of the media width (0-100).
public double w;
+ /// The height of the rectangle, as a percentage of the media height (0-100).
public double h;
+ /// Clockwise rotation angle of the rectangle, in degrees (0-360).
public double rotation;
}
/// See Derived classes: , , ,
public abstract class MediaArea : IObject { }
- /// See
+ /// Represents a location tag attached to a story, with additional venue information. See
[TLDef(0xBE82DB9C)]
public class MediaAreaVenue : MediaArea
{
+ /// The size and location of the media area corresponding to the location sticker on top of the story media.
public MediaAreaCoordinates coordinates;
+ /// Coordinates of the venue
public GeoPoint geo;
+ /// Venue name
public string title;
+ /// Address
public string address;
+ /// Venue provider: currently only "foursquare" needs to be supported.
public string provider;
+ /// Venue ID in the provider's database
public string venue_id;
+ /// Venue type in the provider's database
public string venue_type;
}
/// See
@@ -15350,25 +15373,31 @@ namespace TL
public long query_id;
public string result_id;
}
- /// See
+ /// Represents a geolocation tag attached to a story. See
[TLDef(0xDF8B3B22)]
public class MediaAreaGeoPoint : MediaArea
{
+ /// The size and position of the media area corresponding to the location sticker on top of the story media.
public MediaAreaCoordinates coordinates;
+ /// Coordinates of the geolocation tag.
public GeoPoint geo;
}
- /// See
+ /// Represents a reaction bubble. See
[TLDef(0x14455871)]
public class MediaAreaSuggestedReaction : MediaArea
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// The coordinates of the media area corresponding to the reaction button.
public MediaAreaCoordinates coordinates;
+ /// The reaction that should be sent when this area is clicked.
public Reaction reaction;
[Flags] public enum Flags : uint
{
+ /// Whether the reaction bubble has a dark background.
dark = 0x1,
+ /// Whether the reaction bubble is mirrored (see here » for more info).
flipped = 0x2,
}
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 0b6743d..ca756c0 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -1328,7 +1328,7 @@ namespace TL
/// Telegram ID of the other user
/// First name
/// Last name
- /// User's phone number
+ /// User's phone number, may be omitted to simply add the user to the contact list, without a phone number.
public static Task Contacts_AddContact(this Client client, InputUserBase id, string first_name, string last_name, string phone, bool add_phone_privacy_exception = false)
=> client.Invoke(new Contacts_AddContact
{
@@ -2000,7 +2000,7 @@ namespace TL
is_admin = is_admin,
});
- /// ⚠ This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Turn a basic group into a supergroup See Possible codes: 400,403 (details)
+ /// ⚠ This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Turn a basic group into a supergroup See Possible codes: 400,403,500 (details)
/// Basic group to migrate
public static Task Messages_MigrateChat(this Client client, long chat_id)
=> client.Invoke(new Messages_MigrateChat
@@ -5643,12 +5643,16 @@ namespace TL
});
/// Uploads a Telegram Story. See Possible codes: 400 (details)
- /// If set, disables forwards and story download functionality.
+ /// Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info.
+ /// If set, disables forwards, screenshots, and downloads.
/// The peer to send the story as.
- /// The media file.
+ /// The story media.
+ /// Media areas associated to the story, see here » for more info.
/// Story caption.
/// Message entities for styled text
+ /// Privacy rules for the story, indicating who can or can't view the story.
/// Unique client message ID required to prevent message resending. You can use
+ /// Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
public static Task Stories_SendStory(this Client client, InputPeer peer, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, MediaArea[] media_areas = null, bool pinned = false, bool noforwards = false)
=> client.Invoke(new Stories_SendStory
{
@@ -5667,9 +5671,10 @@ namespace TL
/// Peer where the story was posted.
/// ID of story to edit.
/// If specified, replaces the story media.
+ /// Media areas associated to the story, see here » for more info.
/// If specified, replaces the story caption.
/// Message entities for styled text in the caption
- /// If specified, alters the privacy settings of the story.
+ /// If specified, alters the privacy settings » of the story, changing who can or can't view the story.
public static Task Stories_EditStory(this Client client, InputPeer peer, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null, MediaArea[] media_areas = null)
=> client.Invoke(new Stories_EditStory
{
diff --git a/src/TL.Secret.cs b/src/TL.Secret.cs
index effd431..3e31293 100644
--- a/src/TL.Secret.cs
+++ b/src/TL.Secret.cs
@@ -721,7 +721,7 @@ namespace TL
public string title;
/// Address
public string address;
- /// Venue provider: currently only "foursquare" needs to be supported
+ /// Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported
public string provider;
/// Venue ID in the provider's database
public string venue_id;