
com.pubnub.api.endpoints.pubsub.PubSubService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pubnub Show documentation
Show all versions of pubnub Show documentation
PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of
broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter
second!
package com.pubnub.api.endpoints.pubsub;
import com.pubnub.api.models.server.SubscribeEnvelope;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import retrofit2.http.Headers;
import retrofit2.http.Body;
import java.util.List;
import java.util.Map;
public interface PubSubService {
@GET("v2/subscribe/{subKey}/{channel}/0")
Call subscribe(@Path("subKey") String subKey,
@Path("channel") String channel,
@QueryMap(encoded = true) Map options);
@GET("publish/{pubKey}/{subKey}/0/{channel}/0/{message}")
Call> publish(@Path("pubKey") String pubKey,
@Path("subKey") String subKey,
@Path("channel") String channel,
@Path(value = "message", encoded = true) String message,
@QueryMap(encoded = true) Map options);
@POST("publish/{pubKey}/{subKey}/0/{channel}/0")
@Headers("Content-Type: application/json; charset=UTF-8")
Call> publishWithPost(@Path("pubKey") String pubKey,
@Path("subKey") String subKey,
@Path("channel") String channel,
@Body Object body,
@QueryMap(encoded = true) Map options);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy