gcm 2.0.0-alpha

Google Cloud Messaging (GCM) for D


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

gcm

Build Status

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
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 147 downloads total

Score:
0.0
Short URL:
gcm.dub.pm