Struct expo_server_sdk::PushNotifier[][src]

pub struct PushNotifier {
    pub url: String,
    pub pushes_per_request: usize,
    pub gzip_policy: GzipPolicy,
    // some fields omitted
}

The PushNotifier takes one or more PushMessage to send to the push notification server

Example:

extern crate expo_server_sdk;
use expo_server_sdk::*;
use std::str::FromStr;

let token = PushToken::from_str("ExpoPushToken[my-token]").unwrap();
let mut msg = PushMessage::new(token).body("test notification");

let push_notifier = PushNotifier::new().gzip_policy(GzipPolicy::Always);
let result = push_notifier.send_push_notification(&msg);

Fields

Methods

impl PushNotifier
[src]

Specify the URL to the push notification server Default is the Expo push notification server.

Specify the number of push notifications to group together into one request Default is 100.

Specify when gzip'ping the request body occurrs Default policy is to gzip when the request body exceeds 1024 bytes.

Sends a vector of PushMessage to the push notification server.

Sends a single PushMessage to the push notification server.

Auto Trait Implementations