lichess-api 1.0.0

A client library for the Lichess API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Sending private messages to other Lichess players.
//!
//! [`LichessApi::send_message`] posts a message to a user's inbox, on behalf
//! of the authenticated account. It requires the `msg:write` OAuth scope.

use crate::client::LichessApi;
use crate::error::Result;
use crate::model::messaging::*;

impl LichessApi<reqwest::Client> {
    pub async fn send_message(&self, request: impl Into<inbox::PostRequest>) -> Result<bool> {
        self.get_ok(request.into()).await
    }
}