Back to project page gameapi-android.
The source code is released under:
MIT License
If you think the Android project gameapi-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.playtomic.android; //from ww w .j a va 2s.c o m import org.json.JSONObject; public class Newsletter { private static String SECTION = "newsletter"; private static String SUBSCRIBE = "subscribe"; /** * Subscribes a person to your newsletter * @param options JSONObject with email and other fields you configure * @param callback NewsletterSubscribeHandler for receiving the response */ public static void subscribe(JSONObject options, final NewsletterSubscribeHandler callback) { PRequest.load(SECTION, SUBSCRIBE, options, new PResponseHandler() { @Override public void onResponse(PResponse response, JSONObject data) { if(response.getSuccess()) { callback.onSuccess(response); } else { callback.onFailure(response); } } }); } }