Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 793 Bytes

README.md

File metadata and controls

41 lines (33 loc) · 793 Bytes

Pusher Beams Rust Server SDK

Build Status

[dependencies]
beams = "0.1.0"

Usage

extern crate beams;

use beams::publish;

pub fn main() {
    let interests = vec![String::from("pizza"), String::from("avocado")];

    let publish_request = r#"{
        "apns": {
            "aps": {
                "alert": "Hello!"
            }
        },
        "fcm": {
            "notification": {
                "title": "Hello!",
                "body": "Hello, world!"
            }
        }
    }"#;

    publish(
        String::from("id"),
        String::from("key"),
        interests,
        publish_request,
    );
}