Interface PollService


  • public interface PollService
    • Method Detail

      • get

        @GET("polls/{poll_id}")
        @NotNull
        @NotNull retrofit2.Call<Poll.PollGetResponse> get​(@NotNull @Path("poll_id")
                                                          @NotNull java.lang.String pollId)
      • delete

        @DELETE("polls/{poll_id}")
        @NotNull
        @NotNull retrofit2.Call<Poll.PollDeleteResponse> delete​(@NotNull @Path("poll_id")
                                                                @NotNull java.lang.String pollId,
                                                                @Nullable @Query("user_id")
                                                                @Nullable java.lang.String userId)
      • getOption

        @GET("polls/{poll_id}/options/{option_id}")
        @NotNull
        @NotNull retrofit2.Call<Poll.PollOptionGetResponse> getOption​(@NotNull @Path("poll_id")
                                                                      @NotNull java.lang.String pollId,
                                                                      @NotNull @Path("option_id")
                                                                      @NotNull java.lang.String optionId)
      • deleteOption

        @DELETE("polls/{poll_id}/options/{option_id}")
        @NotNull
        @NotNull retrofit2.Call<Poll.PollOptionDeleteResponse> deleteOption​(@NotNull @Path("poll_id")
                                                                            @NotNull java.lang.String pollId,
                                                                            @NotNull @Path("option_id")
                                                                            @NotNull java.lang.String optionId,
                                                                            @Nullable @Query("user_id")
                                                                            @Nullable java.lang.String userId)
      • queryVotes

        @POST("polls/{poll_id}/votes")
        @NotNull
        @NotNull retrofit2.Call<Poll.PollVoteQueryResponse> queryVotes​(@NotNull @Path("poll_id")
                                                                       @NotNull java.lang.String pollId,
                                                                       @NotNull @Body
                                                                       @NotNull Poll.PollVoteQueryRequestData pollVoteQueryRequestData,
                                                                       @Nullable @Query("user_id")
                                                                       @Nullable java.lang.String userId)
      • castVote

        @POST("messages/{message_id}/polls/{poll_id}/vote")
        @NotNull
        @NotNull retrofit2.Call<Poll.PollVoteCastResponse> castVote​(@NotNull @Path("message_id")
                                                                    @NotNull java.lang.String messageId,
                                                                    @NotNull @Path("poll_id")
                                                                    @NotNull java.lang.String pollId,
                                                                    @NotNull @Body
                                                                    @NotNull Poll.PollVoteCastRequestData pollVoteCastRequestData)
      • deleteVote

        @DELETE("messages/{message_id}/polls/{poll_id}/vote/{vote_id}")
        @NotNull
        @NotNull retrofit2.Call<Poll.PollVoteDeleteResponse> deleteVote​(@NotNull @Path("message_id")
                                                                        @NotNull java.lang.String messageId,
                                                                        @NotNull @Path("poll_id")
                                                                        @NotNull java.lang.String pollId,
                                                                        @NotNull @Path("vote_id")
                                                                        @NotNull java.lang.String voteId)