Skip to content

Commit

Permalink
Update docs descriptions (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans authored Apr 17, 2024
1 parent d2e68b2 commit fbfde39
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/src/routes/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ pub async fn get_bulk(
Ok(Json(joined))
}

/// /sse/a
///
/// Here is an example of a valid request that looks up multiple addresses.
/// ```url
/// /sse/a?addresses[]=0x225f137127d9067788314bc7fcc1f36746a3c3B5&addresses[]=0xd577D1322cB22eB6EAC1a008F62b18807921EFBc&addresses[]=0x8F8f07b6D61806Ec38febd15B07528dCF2903Ae7&addresses[]=0x8e8Db5CcEF88cca9d624701Db544989C996E3216&addresses[]=0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5&addresses[]=0xF1F78f308F08fDCAC933124ee8B52A376ff542B4
/// ```
#[utoipa::path(
get,
tag = "Stream Profiles",
Expand Down
6 changes: 6 additions & 0 deletions server/src/routes/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ pub async fn get_bulk(
Ok(Json(joined))
}

/// /sse/n
///
/// Here is an example of a valid request that looks up multiple names.
/// ```url
/// /sse/n?names[]=luc.eth&names[]=nick.eth&names[]=helgesson.eth&names[]=irc.eth&names[]=khori.eth&names[]=v3x.eth
/// ```
#[utoipa::path(
get,
tag = "Stream Profiles",
Expand Down
20 changes: 20 additions & 0 deletions server/src/routes/universal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ use crate::models::bulk::{BulkResponse, ListResponse};
use crate::models::sse::SSEResponse;
use crate::routes::{profile_http_error_mapper, validate_bulk_input, FreshQuery, Qs, RouteError};

/// /u/{name_or_address}
///
/// The Universal Endpoint supports looking up both names and addresses.
///
/// You can also use the [useProfile](https://github.com/v3xlabs/use-enstate/blob/master/src/hooks/useProfile.ts) hook from [use-enstate](https://github.com/v3xlabs/use-enstate).
#[utoipa::path(
get,
tag = "Single Profile",
Expand Down Expand Up @@ -63,6 +68,11 @@ pub struct UniversalGetBulkQuery {
fresh: FreshQuery,
}

/// /bulk/u
///
/// The Universal Endpoint supports looking up both names and addresses.
///
/// You can also use the [useBulkProfile](https://github.com/v3xlabs/use-enstate/blob/master/src/hooks/useBulkProfile.ts) hook from [use-enstate](https://github.com/v3xlabs/use-enstate).
#[utoipa::path(
get,
tag = "Bulk Profiles",
Expand Down Expand Up @@ -94,6 +104,16 @@ pub async fn get_bulk(
Ok(Json(joined))
}

/// /sse/u
///
/// The Universal Endpoint supports looking up both names and addresses.
///
/// Here is an example of a valid request that looks up multiple names.
/// ```url
/// /sse/u?queries[]=luc.eth&queries[]=nick.eth&queries[]=helgesson.eth&queries[]=irc.eth&queries[]=khori.eth&queries[]=v3x.eth
/// ```
///
/// You can also use the [useSSEProfiles](https://github.com/v3xlabs/use-enstate/blob/master/src/hooks/useSSEProfiles.ts) hook from [use-enstate](https://github.com/v3xlabs/use-enstate).
#[utoipa::path(
get,
tag = "Stream Profiles",
Expand Down

0 comments on commit fbfde39

Please sign in to comment.