Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lukabratos/push-notifications-rust

Pusher Beams Rust Server SDK
https://github.com/lukabratos/push-notifications-rust

crate rust rust-crate rust-lang rust-language rust-library rustlang

Last synced: about 2 months ago
JSON representation

Pusher Beams Rust Server SDK

Awesome Lists containing this project

README

        

# Pusher Beams Rust Server SDK

[![Build Status](https://travis-ci.org/lukabratos/push-notifications-rust.svg?branch=master)](https://travis-ci.org/lukabratos/push-notifications-rust)

```toml
[dependencies]
beams = "0.1.0"
```

## Usage

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