Skip to content

lukabratos/push-notifications-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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,
    );
}