fcm-d

Firebase Cloud Messaging library written on D language


Keywords
library, network, dlang, fcm, firebase, requests
License
MIT
Install
dub fetch fcm-d --version 0.2.0

Documentation

FCM Service

Firebase Cloud Messaging library written on D language

How to use

import std.json;
import std.stdio;

import fcm;

void main {
	FCMService fcm = FCMService.newInstance("api key");

	auto request = FCMRequest();
	request.registrationIds ~= "device token";

	JSONValue json;
	json["field1"] = "foo";
	json["field2"] = 42.0;
	json["field3"] = true;

	request.data = json;

	FCMResponse response = fcm.request(request);

	writeln("response: ", response);
}

TODO

[0.2.0]

  • Changed API, now use FCMService.newInstance("api key") to get FCM instance

[0.1.0]

[Backlog]

  • add unit tests
  • add screens
  • add documentation
  • add RxD sample
  • XMPP protocol