gcm ~master
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
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);
}
}
- ~master released 8 years ago
- sigod/gcm
- github.com/sigod/gcm
- MIT
- Copyright © 2016, sigod
- Authors:
- 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 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
147 downloads total
-
- Score:
- 0.0
- Short URL:
- gcm.dub.pm