|
87 | 87 | //!
|
88 | 88 | //! #### GET `/v5/channel/:id/validator-messages`
|
89 | 89 | //!
|
| 90 | +//! Retrieve the latest validator [`MessageTypes`] for a given [`Channel`]. |
| 91 | +//! |
| 92 | +//! The query `limit` parameter is constraint to a maximum of [`Config.msgs_find_limit`], |
| 93 | +//! if a large value is passed it will use the [`Config.msgs_find_limit`] instead. |
| 94 | +//! |
| 95 | +//! |
| 96 | +//! **Sub-routes** with additional filtering: |
| 97 | +//! |
90 | 98 | //! - GET `/v5/channel/:id/validator-messages/:addr` - filter by the given [`ValidatorId`]
|
91 | 99 | //! - GET `/v5/channel/:id/validator-messages/:addr/:validator_messages` - filters by the given [`ValidatorId`] and
|
92 |
| -//! Validator [`MessageTypes`]. |
| 100 | +//! validator [`MessageTypes`]. |
93 | 101 | //! - `:validator_messages` - url encoded list of Validator [`MessageTypes`] separated by a `+`.
|
94 | 102 | //!
|
95 | 103 | //! E.g. `NewState+ApproveState` becomes `NewState%2BApproveState`
|
|
116 | 124 | //!
|
117 | 125 | //! #### POST `/v5/channel/:id/validator-messages` (auth required)
|
118 | 126 | //!
|
| 127 | +//! Create new validator [`MessageTypes`] for the given [`Channel`], |
| 128 | +//! used when propagating messages from the validator worker. |
| 129 | +//! |
| 130 | +//! **Authentication is required** to validate that the [`Auth.uid`] is either |
| 131 | +//! the [`Channel.leader`] or [`Channel.follower`]. |
| 132 | +//! |
119 | 133 | //! The route is handled by [`channel::validator_message::create_validator_messages()`].
|
120 | 134 | //!
|
121 | 135 | //! Request body (json): [`ValidatorMessagesCreateRequest`](primitives::sentry::ValidatorMessagesCreateRequest)
|
|
238 | 252 | //!
|
239 | 253 | //! #### POST `/v5/campaign` (auth required)
|
240 | 254 | //!
|
241 |
| -//! Create a new Campaign. Request must be sent by the [`Campaign.creator`](primitives::Campaign::creator). |
| 255 | +//! Create a new Campaign. Request must be sent by the [`Campaign.creator`]. |
242 | 256 | //!
|
243 |
| -//! **Authentication is required** to validate [`Campaign.creator`](primitives::Campaign::creator) == [`Auth.uid`](crate::Auth::uid) |
| 257 | +//! **Authentication is required** to validate [`Campaign.creator`] == [`Auth.uid`] |
244 | 258 | //!
|
245 | 259 | //! It will make sure the `Channel` is created if new and it will update
|
246 | 260 | //! the spendable amount using the [`Adapter.get_deposit()`](adapter::client::Locked::get_deposit).
|
|
259 | 273 | //!
|
260 | 274 | //! #### POST `/v5/campaign/:id` (auth required)
|
261 | 275 | //!
|
262 |
| -//! Modify the [`Campaign`]. Request must be sent by the [`Campaign.creator`](primitives::Campaign::creator). |
| 276 | +//! Modify the [`Campaign`]. Request must be sent by the [`Campaign.creator`]. |
263 | 277 | //!
|
264 |
| -//! **Authentication is required** to validate [`Campaign.creator`](primitives::Campaign::creator) == [`Auth.uid`](crate::Auth::uid) |
| 278 | +//! **Authentication is required** to validate [`Campaign.creator`] == [`Auth.uid`] |
265 | 279 | //!
|
266 | 280 | //! The route is handled by [`campaign::update_campaign::handle_route()`].
|
267 | 281 | //!
|
|
292 | 306 | //!
|
293 | 307 | //! The route is handled by [`campaign::close_campaign()`].
|
294 | 308 | //!
|
295 |
| -//! Request must be sent by the [`Campaign.creator`](primitives::Campaign::creator). |
| 309 | +//! Request must be sent by the [`Campaign.creator`]. |
296 | 310 | //!
|
297 |
| -//! **Authentication is required** to validate [`Campaign.creator`](primitives::Campaign::creator) == [`Auth.uid`](crate::Auth::uid) |
| 311 | +//! **Authentication is required** to validate [`Campaign.creator`] == [`Auth.uid`] |
298 | 312 | //!
|
299 | 313 | //! Closes the campaign by setting [`Campaign.budget`](primitives::Campaign::budget) so that `remaining budget = 0`.
|
300 | 314 | //!
|
|
326 | 340 | //!
|
327 | 341 | //! #### GET `/v5/analytics/for-publisher` (auth required)
|
328 | 342 | //!
|
329 |
| -//! Returns all analytics where the currently authenticated address [`Auth.uid`](crate::Auth::uid) is a **publisher**. |
| 343 | +//! Returns all analytics where the currently authenticated address [`Auth.uid`] is a **publisher**. |
330 | 344 | //!
|
331 | 345 | //! All [`ALLOWED_KEYS`] are allowed for this route.
|
332 | 346 | //!
|
|
342 | 356 | //!
|
343 | 357 | //! #### GET `/v5/analytics/for-advertiser` (auth required)
|
344 | 358 | //!
|
345 |
| -//! Returns all analytics where the currently authenticated address [`Auth.uid`](crate::Auth::uid) is an **advertiser**. |
| 359 | +//! Returns all analytics where the currently authenticated address [`Auth.uid`] is an **advertiser**. |
346 | 360 | //!
|
347 | 361 | //! All [`ALLOWED_KEYS`] are allowed for this route.
|
348 | 362 | //!
|
|
381 | 395 | //! [`ApproveState`]: primitives::validator::ApproveState
|
382 | 396 | //! [`Accounting`]: crate::db::accounting::Accounting
|
383 | 397 | //! [`AccountingResponse`]: primitives::sentry::AccountingResponse
|
| 398 | +//! [`Auth.uid`]: crate::Auth::uid |
384 | 399 | //! [`Campaign`]: primitives::Campaign
|
| 400 | +//! [`Campaign.creator`]: primitives::Campaign::creator |
385 | 401 | //! [`CampaignId`]: primitives::CampaignId
|
386 | 402 | //! [`ChannelId`]: primitives::ChannelId
|
387 | 403 | //! [`Channel`]: primitives::Channel
|
| 404 | +//! [`Channel.leader`]: primitives::Channel::leader |
| 405 | +//! [`Channel.follower`]: primitives::Channel::follower |
| 406 | +//! [`Config.msgs_find_limit`]: primitives::Config::msgs_find_limit |
388 | 407 | //! [`MessageTypes`]: primitives::validator::MessageTypes
|
389 | 408 | //! [`NewState`]: primitives::validator::NewState
|
390 | 409 | //! [`Event`]: primitives::sentry::Event
|
|
0 commit comments