Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

sigod/gcm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gcm

Build Status Gitter

Google Cloud Messaging (GCM) for D

Usage

import gcm;

void main()
{
	immutable GCM_KEY = ".. key ..";

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

		auto response = GCM_KEY.sendTopic("/topics/test", message);
		assert(response.message_id == -1);
	}

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

		auto message = gcmessage(CustomData("This is a GCM Topic Message!"));
		message.dry_run = true;

		auto response = GCM_KEY.sendTopic("/topics/test", message);
		assert(response.message_id == -1);
	}
}

About

Google Cloud Messaging (GCM) for D

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages