pub struct CreateAccount {
pub short_name: ShortName,
pub author_name: Option<AuthorName>,
pub author_url: Option<AuthorUrl>,
}Expand description
Use this method to create a new Telegraph account. Most users only need one account, but this can be useful for channel administrators who would like to keep individual author names and profile links for each of their channels. On success, returns an Account object with the regular fields and an additional access_token field.
- short_name (String, 1-32 characters) Required. Account name, helps users with several accounts remember which they are currently using. Displayed to the user above the “Edit/Publish” button on Telegra.ph, other users don’t see this name.
- author_name (String, 0-128 characters) Default author name used when creating new articles.
- author_url (String, 0-512 characters) Default profile link, opened when users click on the author’s name below the title. Can be any link, not necessarily to a Telegram profile or channel.
- Sample request https://api.telegra.ph/createAccount?short_name=Sandbox&author_name=Anonymous
Fields§
§short_name: ShortNameImplementations§
Source§impl CreateAccount
impl CreateAccount
pub fn new(short_name: String) -> Self
pub fn with_raw( short_name: String, author_name: Option<String>, author_url: Option<String>, ) -> Self
pub async fn run( &mut self, f: Box<dyn for<'a> Fn(&'a mut CreateAccount) -> Pin<Box<dyn Future<Output = Ret<Account>> + 'a>>>, ) -> Ret<Account>
Auto Trait Implementations§
impl Freeze for CreateAccount
impl RefUnwindSafe for CreateAccount
impl Send for CreateAccount
impl Sync for CreateAccount
impl Unpin for CreateAccount
impl UnsafeUnpin for CreateAccount
impl UnwindSafe for CreateAccount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more