pub struct RegisterBody {
pub transport: Transport,
pub recipient: RecipientBody,
pub app_id: Option<String>,
pub app_version: Option<String>,
pub locale: Option<String>,
}Expand description
PUT /v1/notifications/subscriptions. There is deliberately no
account_id: it comes from the token.
Fields§
§transport: TransportWhich transport the client believes it is registering. Checked against the recipient, so a client that builds the wrong shape learns at registration rather than at the first silent non-send.
recipient: RecipientBody§app_id: Option<String>§app_version: Option<String>§locale: Option<String>The language this device is set to, as a BCP 47 tag (#190).
The most accurate signal there is for a push: it is what the person
holding the phone chose, and one account can have an English
browser and a Bahasa phone. Omit it and the Accept-Language
header is read instead — which is all a browser can offer — and
omitting both leaves the device with no language of its own, so the
account’s answer decides.
Anything that is not a language tag is dropped, not stored: see
device_locale.
Trait Implementations§
Source§impl Debug for RegisterBody
impl Debug for RegisterBody
Source§impl<'de> Deserialize<'de> for RegisterBody
impl<'de> Deserialize<'de> for RegisterBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for RegisterBody
impl JsonSchema for RegisterBody
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more