gcm 2.0.0-alpha.2

Google Cloud Messaging (GCM) for D


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

gcm

Build Status Gitter

Google Cloud Messaging (GCM) for D

Usage

import gcm;

void main()
{
	auto gcm = new GCM("api key here");

	// simple
	{
		auto message = gcmessage("/topics/test");
		message.data = ["message": "This is a GCM Topic Message!"];
		message.dry_run = true;
		auto response = gcm.send(message);

		assert(response.message_id == "-1");
	}

	// user defined data types
	{
		static struct CustomData
		{
			string message;
		}

		auto custom_data = CustomData("This is a GCM Topic Message!");

		auto message = gcmessage("/topics/test", custom_data);
		message.dry_run = true;
		auto response = gcm.send(message);

		assert(response.message_id == "-1");
	}
}

Authors: sigod

Dependencies: none

Versions:
2.0.0-alpha.2 2015-Nov-06
2.0.0-alpha.1 2015-Oct-19
2.0.0-alpha 2015-Oct-19
1.2.0 2015-Aug-25
1.1.0 2015-Aug-23
Show all 7 versions
Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 131 downloads total