Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
Adapt documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marot committed Jul 10, 2021
1 parent dc4568f commit 794efe0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
13 changes: 8 additions & 5 deletions src/default_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ impl<A: ClientAdapter + Sync + Send> Client for DefaultClient<A> {
/// Authenticate a user with Apple Game Center
///
/// See [Game center](https://heroiclabs.com/docs/authentication/#game-center) on how to set up authentication using the Apple Game Center.
/// todo! The documentation doesn't help here
///
/// See [Authentication](index.html#authentication) for a description of the `username`, `create` and `vars` parameters.
///
Expand Down Expand Up @@ -1170,7 +1169,6 @@ impl<A: ClientAdapter + Sync + Send> Client for DefaultClient<A> {
/// Link a Game Center profile to the social profiles on the current user's account.
///
/// See [Game center](https://heroiclabs.com/docs/authentication/#game-center) on how to set up authentication using the Apple Game Center.
/// todo! The documentation doesn't help here
///
/// # Example
/// ```
Expand Down Expand Up @@ -1270,7 +1268,7 @@ impl<A: ClientAdapter + Sync + Send> Client for DefaultClient<A> {
///
/// The chat channel id can be retrieved by using [`Socket::join_chat`].
///
/// TODO: How does forward work?
/// Specify `forward` to set the direction of the pagination.
///
/// See [Limit and cursor](index.html#limit-and-cursor) for a description on how to use the `limit` and `cursor` parameters.
///
Expand Down Expand Up @@ -1683,9 +1681,14 @@ impl<A: ClientAdapter + Sync + Send> Client for DefaultClient<A> {
self.send(request).await
}

/// List current or upcoming
/// List current or upcoming tournaments
///
/// TODO: Document all
/// Use `category_start` and `category_end` to filter based on the category that is set on the server on tournament creation. The category value is between 0 and 127.
///
/// Omitting the start and end time parameters returns the ongoing and future tournaments.
/// Setting the end time parameter to 0 only includes tournaments with no end time set in the results.
/// Setting end time to a > 0 unix timestamp acts as an upper bound and only returns tournaments that end prior to it (excluding tournaments with no end time).
/// Setting the start time to a > 0 unix timestamp returns any tournaments that start at a later time than it.
///
/// See [Limit and cursor](index.html#limit-and-cursor) for a description on how to use the `limit` and `cursor`.
///
Expand Down
14 changes: 12 additions & 2 deletions src/web_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@ impl<A: SocketAdapter + Send> Socket for WebSocket<A> {

/// Connect to the server.
///
/// TODO: Document parameters.
/// If `appear_online` is false, no status updates will be sent to other clients.
///
/// # Example
/// ```
/// # #![feature(async_closure)]
Expand Down Expand Up @@ -813,9 +814,18 @@ impl<A: SocketAdapter + Send> Socket for WebSocket<A> {
let result_envelope = self.wait_response(cid).await?;
Ok(result_envelope.status.unwrap())
}

/// Join a chat channel on the server.
///
/// TODO: Documentation
/// There are three channel types. Room (1), DirectMessage (2) and Group (3).
/// The `room_name` is the user id for a direct message, the group id for a group message and the room name otherwise.
///
/// Set `persistence` to `false` to only receive messages while online.
/// Otherwise messages sent through channels are saved to the database and available in the message history later.
///
/// Set `hidden` to `true` to hide your channel presence when connecting, so you will not generate join/leave notifications
/// and will not appear in listings of channel members. You can still send and receive messages.
///
/// # Example
/// ```
/// # #![feature(async_closure)]
Expand Down

0 comments on commit 794efe0

Please sign in to comment.