2427 lines
115 KiB
Java
2427 lines
115 KiB
Java
package com.discord.utilities.rest;
|
|
|
|
import android.content.Context;
|
|
import android.util.Base64;
|
|
import c0.g0.c;
|
|
import c0.t.n;
|
|
import c0.z.d.m;
|
|
import com.discord.BuildConfig;
|
|
import com.discord.api.activity.ActivityActionConfirmation;
|
|
import com.discord.api.activity.ActivityMetadata;
|
|
import com.discord.api.application.Application;
|
|
import com.discord.api.auth.RegisterResponse;
|
|
import com.discord.api.auth.mfa.DisableMfaRequestBody;
|
|
import com.discord.api.auth.mfa.DisableMfaResponse;
|
|
import com.discord.api.auth.mfa.EnableMfaResponse;
|
|
import com.discord.api.auth.mfa.GetBackupCodesRequestBody;
|
|
import com.discord.api.auth.mfa.GetBackupCodesResponse;
|
|
import com.discord.api.bugreport.BugReportConfig;
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.api.commands.ApplicationCommand;
|
|
import com.discord.api.commands.ApplicationCommandData;
|
|
import com.discord.api.directory.DirectoryEntry;
|
|
import com.discord.api.fingerprint.FingerprintResponse;
|
|
import com.discord.api.friendsuggestions.BulkAddFriendsResponse;
|
|
import com.discord.api.friendsuggestions.BulkFriendSuggestions;
|
|
import com.discord.api.friendsuggestions.FriendSuggestion;
|
|
import com.discord.api.guild.Guild;
|
|
import com.discord.api.guild.PruneCountResponse;
|
|
import com.discord.api.guild.VanityUrlResponse;
|
|
import com.discord.api.guild.preview.GuildPreview;
|
|
import com.discord.api.guild.welcome.GuildWelcomeScreen;
|
|
import com.discord.api.guildmember.PatchGuildMemberBody;
|
|
import com.discord.api.guildrolesubscription.GuildRoleSubscriptionGroupListing;
|
|
import com.discord.api.guildrolesubscription.GuildRoleSubscriptionTierListing;
|
|
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
|
|
import com.discord.api.guildscheduledevent.GuildScheduledEventUser;
|
|
import com.discord.api.hubs.EmailVerification;
|
|
import com.discord.api.hubs.EmailVerificationCode;
|
|
import com.discord.api.hubs.WaitlistSignup;
|
|
import com.discord.api.message.Message;
|
|
import com.discord.api.message.activity.MessageActivityType;
|
|
import com.discord.api.premium.ClaimedOutboundPromotion;
|
|
import com.discord.api.premium.OutboundPromotion;
|
|
import com.discord.api.report.MenuAPIResponse;
|
|
import com.discord.api.report.ReportReason;
|
|
import com.discord.api.report.ReportSubmissionBody;
|
|
import com.discord.api.role.GuildRole;
|
|
import com.discord.api.science.Science;
|
|
import com.discord.api.stageinstance.RecommendedStageInstance;
|
|
import com.discord.api.stageinstance.StageInstance;
|
|
import com.discord.api.sticker.Sticker;
|
|
import com.discord.api.thread.ThreadListing;
|
|
import com.discord.api.thread.ThreadMember;
|
|
import com.discord.api.user.PatchUserBody;
|
|
import com.discord.api.user.UserSurveyFetchResponse;
|
|
import com.discord.api.utcdatetime.UtcDateTime;
|
|
import com.discord.app.AppLog;
|
|
import com.discord.models.domain.Consents;
|
|
import com.discord.models.domain.Harvest;
|
|
import com.discord.models.domain.ModelApplicationStreamPreview;
|
|
import com.discord.models.domain.ModelAuditLog;
|
|
import com.discord.models.domain.ModelAuditLogEntry;
|
|
import com.discord.models.domain.ModelBan;
|
|
import com.discord.models.domain.ModelCall;
|
|
import com.discord.models.domain.ModelChannelFollowerStatsDto;
|
|
import com.discord.models.domain.ModelConnectedAccount;
|
|
import com.discord.models.domain.ModelConnectionAccessToken;
|
|
import com.discord.models.domain.ModelConnectionState;
|
|
import com.discord.models.domain.ModelEntitlement;
|
|
import com.discord.models.domain.ModelGift;
|
|
import com.discord.models.domain.ModelGuildIntegration;
|
|
import com.discord.models.domain.ModelGuildTemplate;
|
|
import com.discord.models.domain.ModelInvite;
|
|
import com.discord.models.domain.ModelLibraryApplication;
|
|
import com.discord.models.domain.ModelLocationMetadata;
|
|
import com.discord.models.domain.ModelMemberVerificationForm;
|
|
import com.discord.models.domain.ModelMemberVerificationFormResponse;
|
|
import com.discord.models.domain.ModelNotificationSettings;
|
|
import com.discord.models.domain.ModelOAuth2Token;
|
|
import com.discord.models.domain.ModelPhoneVerificationToken;
|
|
import com.discord.models.domain.ModelPremiumGuildSubscription;
|
|
import com.discord.models.domain.ModelPremiumGuildSubscriptionSlot;
|
|
import com.discord.models.domain.ModelRemoteAuthHandshake;
|
|
import com.discord.models.domain.ModelRtcLatencyRegion;
|
|
import com.discord.models.domain.ModelSearchResponse;
|
|
import com.discord.models.domain.ModelSubscription;
|
|
import com.discord.models.domain.ModelTypingResponse;
|
|
import com.discord.models.domain.ModelUrl;
|
|
import com.discord.models.domain.ModelUserAffinities;
|
|
import com.discord.models.domain.ModelUserNote;
|
|
import com.discord.models.domain.ModelUserProfile;
|
|
import com.discord.models.domain.ModelUserRelationship;
|
|
import com.discord.models.domain.ModelUserSettings;
|
|
import com.discord.models.domain.ModelVoiceRegion;
|
|
import com.discord.models.domain.PatchPaymentSourceRaw;
|
|
import com.discord.models.domain.PaymentSourceRaw;
|
|
import com.discord.models.domain.auth.ModelLoginResult;
|
|
import com.discord.models.domain.billing.ModelInvoicePreview;
|
|
import com.discord.models.domain.emoji.ModelEmojiGuild;
|
|
import com.discord.models.domain.spotify.ModelSpotifyTrack;
|
|
import com.discord.models.experiments.dto.UnauthenticatedUserExperimentsDto;
|
|
import com.discord.models.gifpicker.dto.GifDto;
|
|
import com.discord.models.gifpicker.dto.TrendingGifCategoriesResponseDto;
|
|
import com.discord.models.sticker.dto.ModelStickerPack;
|
|
import com.discord.models.sticker.dto.ModelStickerStoreDirectory;
|
|
import com.discord.models.user.User;
|
|
import com.discord.restapi.BreadcrumbInterceptor;
|
|
import com.discord.restapi.PayloadJSON;
|
|
import com.discord.restapi.RequiredHeadersInterceptor;
|
|
import com.discord.restapi.RestAPIBuilder;
|
|
import com.discord.restapi.RestAPIInterface;
|
|
import com.discord.restapi.RestAPIParams;
|
|
import com.discord.restapi.SpotifyTokenInterceptor;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.utilities.analytics.ChatInputComponentTypes;
|
|
import com.discord.utilities.auth.GoogleSmartLockManager;
|
|
import com.discord.utilities.logging.Logger;
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
import com.discord.utilities.systemlog.SystemLogUtils;
|
|
import com.discord.utilities.time.Clock;
|
|
import com.discord.utilities.time.ClockFactory;
|
|
import com.franmontiel.persistentcookiejar.PersistentCookieJar;
|
|
import com.franmontiel.persistentcookiejar.cache.SetCookieCache;
|
|
import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor;
|
|
import e0.f0.a;
|
|
import h0.f0.b;
|
|
import h0.f0.f;
|
|
import h0.f0.h;
|
|
import h0.f0.i;
|
|
import h0.f0.l;
|
|
import h0.f0.o;
|
|
import h0.f0.p;
|
|
import h0.f0.q;
|
|
import h0.f0.s;
|
|
import h0.f0.t;
|
|
import java.nio.charset.Charset;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Objects;
|
|
import java.util.Set;
|
|
import kotlin.Pair;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import okhttp3.Interceptor;
|
|
import okhttp3.MultipartBody;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
import retrofit2.Response;
|
|
import rx.Observable;
|
|
/* compiled from: RestAPI.kt */
|
|
public final class RestAPI implements RestAPIInterface {
|
|
public static final Companion Companion = new Companion(null);
|
|
public static RestAPI api;
|
|
public static RestAPIInterface.Dynamic apiClientVersions;
|
|
public static RestAPIInterface.Files apiFiles;
|
|
public static RestAPIInterface.RtcLatency apiRtcLatency;
|
|
public static RestAPI apiSerializeNulls;
|
|
public static RestAPI apiSpotify;
|
|
private final RestAPIInterface _api;
|
|
|
|
/* compiled from: RestAPI.kt */
|
|
public static final class AppHeadersProvider implements RequiredHeadersInterceptor.HeadersProvider {
|
|
public static final AppHeadersProvider INSTANCE = new AppHeadersProvider();
|
|
public static Function0<String> authTokenProvider = RestAPI$AppHeadersProvider$authTokenProvider$1.INSTANCE;
|
|
public static Function0<String> fingerprintProvider = RestAPI$AppHeadersProvider$fingerprintProvider$1.INSTANCE;
|
|
public static Function0<String> localeProvider = RestAPI$AppHeadersProvider$localeProvider$1.INSTANCE;
|
|
public static Function0<String> spotifyTokenProvider = RestAPI$AppHeadersProvider$spotifyTokenProvider$1.INSTANCE;
|
|
|
|
private AppHeadersProvider() {
|
|
}
|
|
|
|
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
|
|
public String getAuthToken() {
|
|
return authTokenProvider.mo17invoke();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
|
|
public String getFingerprint() {
|
|
return fingerprintProvider.mo17invoke();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
|
|
public String getLocale() {
|
|
return localeProvider.mo17invoke();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
|
|
public String getSpotifyToken() {
|
|
return spotifyTokenProvider.mo17invoke();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
|
|
public String getUserAgent() {
|
|
return BuildConfig.USER_AGENT;
|
|
}
|
|
}
|
|
|
|
/* compiled from: RestAPI.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public static /* synthetic */ void getApi$annotations() {
|
|
}
|
|
|
|
public static /* synthetic */ void getApiSerializeNulls$annotations() {
|
|
}
|
|
|
|
public static /* synthetic */ void getApiSpotify$annotations() {
|
|
}
|
|
|
|
public final Interceptor buildAnalyticsInterceptor() {
|
|
int i = Interceptor.a;
|
|
return new RestAPI$Companion$buildAnalyticsInterceptor$$inlined$invoke$1();
|
|
}
|
|
|
|
public final Interceptor buildLoggingInterceptor() {
|
|
a aVar = new a(new RestAPI$Companion$buildLoggingInterceptor$1());
|
|
a.EnumC0314a aVar2 = a.EnumC0314a.BASIC;
|
|
m.checkParameterIsNotNull(aVar2, "<set-?>");
|
|
aVar.f3009c = aVar2;
|
|
return aVar;
|
|
}
|
|
|
|
public final RestAPI getApi() {
|
|
RestAPI access$getApi$cp = RestAPI.access$getApi$cp();
|
|
if (access$getApi$cp == null) {
|
|
m.throwUninitializedPropertyAccessException("api");
|
|
}
|
|
return access$getApi$cp;
|
|
}
|
|
|
|
public final RestAPIInterface.Dynamic getApiClientVersions() {
|
|
RestAPIInterface.Dynamic access$getApiClientVersions$cp = RestAPI.access$getApiClientVersions$cp();
|
|
if (access$getApiClientVersions$cp == null) {
|
|
m.throwUninitializedPropertyAccessException("apiClientVersions");
|
|
}
|
|
return access$getApiClientVersions$cp;
|
|
}
|
|
|
|
public final RestAPIInterface.Files getApiFiles() {
|
|
RestAPIInterface.Files access$getApiFiles$cp = RestAPI.access$getApiFiles$cp();
|
|
if (access$getApiFiles$cp == null) {
|
|
m.throwUninitializedPropertyAccessException("apiFiles");
|
|
}
|
|
return access$getApiFiles$cp;
|
|
}
|
|
|
|
public final RestAPIInterface.RtcLatency getApiRtcLatency() {
|
|
RestAPIInterface.RtcLatency access$getApiRtcLatency$cp = RestAPI.access$getApiRtcLatency$cp();
|
|
if (access$getApiRtcLatency$cp == null) {
|
|
m.throwUninitializedPropertyAccessException("apiRtcLatency");
|
|
}
|
|
return access$getApiRtcLatency$cp;
|
|
}
|
|
|
|
public final RestAPI getApiSerializeNulls() {
|
|
RestAPI access$getApiSerializeNulls$cp = RestAPI.access$getApiSerializeNulls$cp();
|
|
if (access$getApiSerializeNulls$cp == null) {
|
|
m.throwUninitializedPropertyAccessException("apiSerializeNulls");
|
|
}
|
|
return access$getApiSerializeNulls$cp;
|
|
}
|
|
|
|
public final RestAPI getApiSpotify() {
|
|
RestAPI access$getApiSpotify$cp = RestAPI.access$getApiSpotify$cp();
|
|
if (access$getApiSpotify$cp == null) {
|
|
m.throwUninitializedPropertyAccessException("apiSpotify");
|
|
}
|
|
return access$getApiSpotify$cp;
|
|
}
|
|
|
|
public final void init(Context context) {
|
|
m.checkNotNullParameter(context, "context");
|
|
AppHeadersProvider appHeadersProvider = AppHeadersProvider.INSTANCE;
|
|
RequiredHeadersInterceptor requiredHeadersInterceptor = new RequiredHeadersInterceptor(appHeadersProvider);
|
|
BreadcrumbInterceptor breadcrumbInterceptor = new BreadcrumbInterceptor(AppLog.g);
|
|
Interceptor buildAnalyticsInterceptor = buildAnalyticsInterceptor();
|
|
Interceptor buildLoggingInterceptor = buildLoggingInterceptor();
|
|
List mutableListOf = n.mutableListOf(requiredHeadersInterceptor, buildAnalyticsInterceptor, buildLoggingInterceptor(), breadcrumbInterceptor);
|
|
List listOf = n.listOf((Object[]) new Interceptor[]{buildLoggingInterceptor, breadcrumbInterceptor});
|
|
PersistentCookieJar persistentCookieJar = new PersistentCookieJar(new SetCookieCache(), new SharedPrefsCookiePersistor(context));
|
|
RestAPIBuilder restAPIBuilder = new RestAPIBuilder(BuildConfig.HOST_API, persistentCookieJar);
|
|
setApi(new RestAPI((RestAPIInterface) RestAPIBuilder.build$default(restAPIBuilder, RestAPIInterface.class, false, 0, mutableListOf, "client_base", false, null, 102, null)));
|
|
setApiSerializeNulls(new RestAPI((RestAPIInterface) RestAPIBuilder.build$default(restAPIBuilder, RestAPIInterface.class, true, 0, mutableListOf, "client_serialize_nulls", false, null, 100, null)));
|
|
setApiClientVersions((RestAPIInterface.Dynamic) RestAPIBuilder.build$default(restAPIBuilder, RestAPIInterface.Dynamic.class, false, 0, listOf, "client_dynamic", false, null, 102, null));
|
|
setApiRtcLatency((RestAPIInterface.RtcLatency) RestAPIBuilder.build$default(restAPIBuilder, RestAPIInterface.RtcLatency.class, false, 0, listOf, "client_rtc_latency", false, null, 102, null));
|
|
setApiSpotify(new RestAPI((RestAPIInterface) RestAPIBuilder.build$default(new RestAPIBuilder("https://api.spotify.com/v1/", persistentCookieJar), RestAPIInterface.class, false, 0, n.listOf((Object[]) new Interceptor[]{buildLoggingInterceptor, new SpotifyTokenInterceptor(appHeadersProvider)}), "client_spotify", false, null, 70, null)));
|
|
setApiFiles((RestAPIInterface.Files) RestAPIBuilder.build$default(restAPIBuilder, RestAPIInterface.Files.class, false, 0, c0.t.m.listOf(buildLoggingInterceptor), "client_files", false, null, 102, null));
|
|
}
|
|
|
|
public final void setApi(RestAPI restAPI) {
|
|
m.checkNotNullParameter(restAPI, "<set-?>");
|
|
RestAPI.access$setApi$cp(restAPI);
|
|
}
|
|
|
|
public final void setApiClientVersions(RestAPIInterface.Dynamic dynamic) {
|
|
m.checkNotNullParameter(dynamic, "<set-?>");
|
|
RestAPI.access$setApiClientVersions$cp(dynamic);
|
|
}
|
|
|
|
public final void setApiFiles(RestAPIInterface.Files files) {
|
|
m.checkNotNullParameter(files, "<set-?>");
|
|
RestAPI.access$setApiFiles$cp(files);
|
|
}
|
|
|
|
public final void setApiRtcLatency(RestAPIInterface.RtcLatency rtcLatency) {
|
|
m.checkNotNullParameter(rtcLatency, "<set-?>");
|
|
RestAPI.access$setApiRtcLatency$cp(rtcLatency);
|
|
}
|
|
|
|
public final void setApiSerializeNulls(RestAPI restAPI) {
|
|
m.checkNotNullParameter(restAPI, "<set-?>");
|
|
RestAPI.access$setApiSerializeNulls$cp(restAPI);
|
|
}
|
|
|
|
public final void setApiSpotify(RestAPI restAPI) {
|
|
m.checkNotNullParameter(restAPI, "<set-?>");
|
|
RestAPI.access$setApiSpotify$cp(restAPI);
|
|
}
|
|
|
|
public final Observable<Void> uploadSystemLog() {
|
|
return ObservableExtensionsKt.restSubscribeOn$default(getApi().uploadLog("android_system_log.txt", SystemLogUtils.INSTANCE.fetch()), false, 1, null);
|
|
}
|
|
}
|
|
|
|
/* compiled from: RestAPI.kt */
|
|
public static abstract class HarvestState {
|
|
|
|
/* compiled from: RestAPI.kt */
|
|
public static final class LastRequested extends HarvestState {
|
|
private final Harvest data;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public LastRequested(Harvest harvest) {
|
|
super(null);
|
|
m.checkNotNullParameter(harvest, "data");
|
|
this.data = harvest;
|
|
}
|
|
|
|
public final Harvest getData() {
|
|
return this.data;
|
|
}
|
|
}
|
|
|
|
/* compiled from: RestAPI.kt */
|
|
public static final class NeverRequested extends HarvestState {
|
|
public NeverRequested() {
|
|
super(null);
|
|
}
|
|
}
|
|
|
|
private HarvestState() {
|
|
}
|
|
|
|
public /* synthetic */ HarvestState(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
}
|
|
|
|
public RestAPI(RestAPIInterface restAPIInterface) {
|
|
m.checkNotNullParameter(restAPIInterface, "_api");
|
|
this._api = restAPIInterface;
|
|
}
|
|
|
|
public static final /* synthetic */ RestAPI access$getApi$cp() {
|
|
return api;
|
|
}
|
|
|
|
public static final /* synthetic */ RestAPIInterface.Dynamic access$getApiClientVersions$cp() {
|
|
return apiClientVersions;
|
|
}
|
|
|
|
public static final /* synthetic */ RestAPIInterface.Files access$getApiFiles$cp() {
|
|
return apiFiles;
|
|
}
|
|
|
|
public static final /* synthetic */ RestAPIInterface.RtcLatency access$getApiRtcLatency$cp() {
|
|
return apiRtcLatency;
|
|
}
|
|
|
|
public static final /* synthetic */ RestAPI access$getApiSerializeNulls$cp() {
|
|
return apiSerializeNulls;
|
|
}
|
|
|
|
public static final /* synthetic */ RestAPI access$getApiSpotify$cp() {
|
|
return apiSpotify;
|
|
}
|
|
|
|
public static final /* synthetic */ RestAPIInterface access$get_api$p(RestAPI restAPI) {
|
|
return restAPI._api;
|
|
}
|
|
|
|
public static final /* synthetic */ void access$setApi$cp(RestAPI restAPI) {
|
|
api = restAPI;
|
|
}
|
|
|
|
public static final /* synthetic */ void access$setApiClientVersions$cp(RestAPIInterface.Dynamic dynamic) {
|
|
apiClientVersions = dynamic;
|
|
}
|
|
|
|
public static final /* synthetic */ void access$setApiFiles$cp(RestAPIInterface.Files files) {
|
|
apiFiles = files;
|
|
}
|
|
|
|
public static final /* synthetic */ void access$setApiRtcLatency$cp(RestAPIInterface.RtcLatency rtcLatency) {
|
|
apiRtcLatency = rtcLatency;
|
|
}
|
|
|
|
public static final /* synthetic */ void access$setApiSerializeNulls$cp(RestAPI restAPI) {
|
|
apiSerializeNulls = restAPI;
|
|
}
|
|
|
|
public static final /* synthetic */ void access$setApiSpotify$cp(RestAPI restAPI) {
|
|
apiSpotify = restAPI;
|
|
}
|
|
|
|
public static /* synthetic */ Observable addRelationship$default(RestAPI restAPI, String str, long j, Integer num, String str2, int i, Object obj) {
|
|
return restAPI.addRelationship(str, j, (i & 4) != 0 ? null : num, (i & 8) != 0 ? null : str2);
|
|
}
|
|
|
|
public static final Interceptor buildAnalyticsInterceptor() {
|
|
return Companion.buildAnalyticsInterceptor();
|
|
}
|
|
|
|
public static final Interceptor buildLoggingInterceptor() {
|
|
return Companion.buildLoggingInterceptor();
|
|
}
|
|
|
|
public static /* synthetic */ Observable editTextChannel$default(RestAPI restAPI, long j, String str, Integer num, String str2, Boolean bool, Integer num2, Integer num3, int i, Object obj) {
|
|
return restAPI.editTextChannel(j, (i & 2) != 0 ? null : str, (i & 4) != 0 ? null : num, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : bool, (i & 32) != 0 ? null : num2, (i & 64) != 0 ? null : num3);
|
|
}
|
|
|
|
public static /* synthetic */ Observable editVoiceChannel$default(RestAPI restAPI, long j, String str, String str2, Integer num, Integer num2, Integer num3, String str3, int i, Object obj) {
|
|
return restAPI.editVoiceChannel(j, (i & 2) != 0 ? null : str, (i & 4) != 0 ? null : str2, (i & 8) != 0 ? null : num, (i & 16) != 0 ? null : num2, (i & 32) != 0 ? null : num3, (i & 64) != 0 ? null : str3);
|
|
}
|
|
|
|
public static final RestAPI getApi() {
|
|
RestAPI restAPI = api;
|
|
if (restAPI == null) {
|
|
m.throwUninitializedPropertyAccessException("api");
|
|
}
|
|
return restAPI;
|
|
}
|
|
|
|
public static final RestAPI getApiSerializeNulls() {
|
|
RestAPI restAPI = apiSerializeNulls;
|
|
if (restAPI == null) {
|
|
m.throwUninitializedPropertyAccessException("apiSerializeNulls");
|
|
}
|
|
return restAPI;
|
|
}
|
|
|
|
public static final RestAPI getApiSpotify() {
|
|
RestAPI restAPI = apiSpotify;
|
|
if (restAPI == null) {
|
|
m.throwUninitializedPropertyAccessException("apiSpotify");
|
|
}
|
|
return restAPI;
|
|
}
|
|
|
|
public static /* synthetic */ Observable getAuditLogs$default(RestAPI restAPI, long j, Long l, Long l2, Integer num, int i, Object obj) {
|
|
return restAPI.getAuditLogs(j, (i & 2) != 0 ? null : l, (i & 4) != 0 ? null : l2, (i & 8) != 0 ? null : num);
|
|
}
|
|
|
|
public static /* synthetic */ Observable inviteUserToSpeak$default(RestAPI restAPI, Channel channel, long j, Clock clock, int i, Object obj) {
|
|
if ((i & 4) != 0) {
|
|
clock = ClockFactory.get();
|
|
}
|
|
return restAPI.inviteUserToSpeak(channel, j, clock);
|
|
}
|
|
|
|
private final String jsonObjectOf(Pair<String, ? extends Object>... pairArr) {
|
|
JSONObject jSONObject = new JSONObject();
|
|
for (Pair<String, ? extends Object> pair : pairArr) {
|
|
try {
|
|
jSONObject.put(pair.component1(), pair.component2());
|
|
} catch (JSONException e) {
|
|
Logger.e$default(AppLog.g, "RestAPI", "Unable to serialize context property.", e, null, 8, null);
|
|
}
|
|
}
|
|
String jSONObject2 = jSONObject.toString();
|
|
m.checkNotNullExpressionValue(jSONObject2, "it.toString()");
|
|
Charset charset = c.a;
|
|
Objects.requireNonNull(jSONObject2, "null cannot be cast to non-null type java.lang.String");
|
|
byte[] bytes = jSONObject2.getBytes(charset);
|
|
m.checkNotNullExpressionValue(bytes, "(this as java.lang.String).getBytes(charset)");
|
|
String encodeToString = Base64.encodeToString(bytes, 2);
|
|
m.checkNotNullExpressionValue(encodeToString, "JSONObject().apply {\n …toByteArray(), NO_WRAP) }");
|
|
return encodeToString;
|
|
}
|
|
|
|
public static /* synthetic */ Observable postInviteCode$default(RestAPI restAPI, ModelInvite modelInvite, String str, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
str = "mobile";
|
|
}
|
|
return restAPI.postInviteCode(modelInvite, str);
|
|
}
|
|
|
|
public static /* synthetic */ Observable requestToSpeak$default(RestAPI restAPI, Channel channel, Clock clock, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
clock = ClockFactory.get();
|
|
}
|
|
return restAPI.requestToSpeak(channel, clock);
|
|
}
|
|
|
|
public static final void setApi(RestAPI restAPI) {
|
|
api = restAPI;
|
|
}
|
|
|
|
public static final void setApiSerializeNulls(RestAPI restAPI) {
|
|
apiSerializeNulls = restAPI;
|
|
}
|
|
|
|
public static final void setApiSpotify(RestAPI restAPI) {
|
|
apiSpotify = restAPI;
|
|
}
|
|
|
|
private final Observable<Void> setConsent(String str, String str2) {
|
|
List list;
|
|
List list2;
|
|
if (str == null || (list = c0.t.m.listOf(str)) == null) {
|
|
list = n.emptyList();
|
|
}
|
|
if (str2 == null || (list2 = c0.t.m.listOf(str2)) == null) {
|
|
list2 = n.emptyList();
|
|
}
|
|
return ObservableExtensionsKt.restSubscribeOn$default(this._api.setConsents(new RestAPIParams.Consents(list, list2)), false, 1, null);
|
|
}
|
|
|
|
public static /* synthetic */ Observable setConsent$default(RestAPI restAPI, String str, String str2, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
str = null;
|
|
}
|
|
if ((i & 2) != 0) {
|
|
str2 = null;
|
|
}
|
|
return restAPI.setConsent(str, str2);
|
|
}
|
|
|
|
public static /* synthetic */ Observable userActivityActionJoin$default(RestAPI restAPI, long j, long j2, String str, Long l, Long l2, int i, Object obj) {
|
|
return restAPI.userActivityActionJoin(j, j2, str, (i & 8) != 0 ? null : l, (i & 16) != 0 ? null : l2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("entitlements/gift-codes/{code}/redeem")
|
|
public Observable<Void> acceptGift(@s("code") String str) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_CODE);
|
|
return this._api.acceptGift(str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/ack")
|
|
public Observable<Void> ackGuild(@s("guildId") long j) {
|
|
return this._api.ackGuild(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("channels/{channelId}/pins/{messageId}")
|
|
public Observable<Void> addChannelPin(@s("channelId") long j, @s("messageId") long j2) {
|
|
return this._api.addChannelPin(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("channels/{channelId}/recipients/{recipientId}")
|
|
public Observable<Void> addChannelRecipient(@s("channelId") long j, @s("recipientId") long j2) {
|
|
return this._api.addChannelRecipient(j, j2);
|
|
}
|
|
|
|
public final Observable<Channel> addGroupRecipients(long j, List<? extends User> list) {
|
|
m.checkNotNullParameter(list, "recipients");
|
|
Observable<Channel> x2 = StoreStream.Companion.getChannels().observePrivateChannel(j).x(RestAPI$addGroupRecipients$1.INSTANCE);
|
|
m.checkNotNullExpressionValue(x2, "StoreStream\n .g…nnel -> channel != null }");
|
|
Observable Y = ObservableExtensionsKt.takeSingleUntilTimeout$default(x2, 0, false, 3, null).Y(new RestAPI$addGroupRecipients$2(this, j, list)).Y(new RestAPI$addGroupRecipients$3(this, j, list)).Y(RestAPI$addGroupRecipients$4.INSTANCE);
|
|
m.checkNotNullExpressionValue(Y, "StoreStream\n .g….filterNull()\n }");
|
|
return ObservableExtensionsKt.takeSingleUntilTimeout$default(Y, 0, false, 3, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("channels/{channelId}/messages/{messageId}/reactions/{reaction}/@me")
|
|
public Observable<Void> addReaction(@s("channelId") long j, @s("messageId") long j2, @s(encoded = true, value = "reaction") String str) {
|
|
m.checkNotNullParameter(str, "reaction");
|
|
return this._api.addReaction(j, j2, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("users/@me/relationships/{userId}")
|
|
public Observable<Void> addRelationship(@s("userId") long j, @h0.f0.a RestAPIParams.UserRelationship userRelationship, @i("X-Context-Properties") String str) {
|
|
m.checkNotNullParameter(userRelationship, "relationship");
|
|
m.checkNotNullParameter(str, "context");
|
|
return this._api.addRelationship(j, userRelationship, str);
|
|
}
|
|
|
|
public final Observable<Void> addRelationship(String str, long j, Integer num, String str2) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION);
|
|
return ObservableExtensionsKt.restSubscribeOn$default(this._api.addRelationship(j, new RestAPIParams.UserRelationship(num, str2), jsonObjectOf(c0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/directory-entry/{guildId}")
|
|
public Observable<Response<DirectoryEntry>> addServerToHub(@s("channelId") long j, @s("guildId") long j2, @h0.f0.a RestAPIParams.AddServerBody addServerBody) {
|
|
m.checkNotNullParameter(addServerBody, "body");
|
|
return this._api.addServerToHub(j, j2, addServerBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("connections/{connection}/authorize")
|
|
public Observable<ModelUrl> authorizeConnection(@s("connection") String str) {
|
|
m.checkNotNullParameter(str, "connection");
|
|
return this._api.authorizeConnection(str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/authorize-ip")
|
|
public Observable<Response<Void>> authorizeIP(@h0.f0.a RestAPIParams.AuthorizeIP authorizeIP) {
|
|
m.checkNotNullParameter(authorizeIP, "body");
|
|
return this._api.authorizeIP(authorizeIP);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("guilds/{guildId}/bans/{userId}")
|
|
public Observable<Void> banGuildMember(@s("guildId") long j, @s("userId") long j2, @h0.f0.a RestAPIParams.BanGuildMember banGuildMember, @i("X-Audit-Log-Reason") String str) {
|
|
m.checkNotNullParameter(banGuildMember, "body");
|
|
return this._api.banGuildMember(j, j2, banGuildMember, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/roles")
|
|
public Observable<Void> batchUpdateRole(@s("guildId") long j, @h0.f0.a List<RestAPIParams.Role> list) {
|
|
m.checkNotNullParameter(list, "body");
|
|
return this._api.batchUpdateRole(j, list);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/relationships/bulk")
|
|
public Observable<Response<BulkAddFriendsResponse>> bulkAddRelationships(@h0.f0.a RestAPIParams.UserBulkRelationship userBulkRelationship) {
|
|
m.checkNotNullParameter(userBulkRelationship, "body");
|
|
return this._api.bulkAddRelationships(userBulkRelationship);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/call")
|
|
public Observable<ModelCall.Ringable> call(@s("channelId") long j) {
|
|
return this._api.call(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("guilds/{guildId}/requests/@me")
|
|
public Observable<Void> cancelGuildJoinRequest(@s("guildId") long j) {
|
|
return this._api.cancelGuildJoinRequest(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/guilds/premium/subscription-slots/{subscriptionSlotId}/cancel")
|
|
public Observable<ModelPremiumGuildSubscriptionSlot> cancelSubscriptionSlot(@s("subscriptionSlotId") long j) {
|
|
return this._api.cancelSubscriptionSlot(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/members/{userId}")
|
|
public Observable<Void> changeGuildMember(@s("guildId") long j, @s("userId") long j2, @h0.f0.a RestAPIParams.GuildMember guildMember) {
|
|
m.checkNotNullParameter(guildMember, "body");
|
|
return this._api.changeGuildMember(j, j2, guildMember);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/members/@me/nick")
|
|
public Observable<Void> changeGuildNickname(@s("guildId") long j, @h0.f0.a RestAPIParams.Nick nick) {
|
|
m.checkNotNullParameter(nick, "body");
|
|
return this._api.changeGuildNickname(j, nick);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("outbound-promotions/{promotionId}/claim")
|
|
public Observable<ClaimedOutboundPromotion> claimOutboundPromotion(@s("promotionId") long j) {
|
|
return this._api.claimOutboundPromotion(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("store/skus/{skuId}/purchase")
|
|
public Observable<Unit> claimSku(@s("skuId") long j, @h0.f0.a RestAPIParams.EmptyBody emptyBody) {
|
|
m.checkNotNullParameter(emptyBody, "emptyBody");
|
|
return this._api.claimSku(j, emptyBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("channels/{channelId}/recipients/{recipientId}")
|
|
public Observable<Channel> convertDMToGroup(@s("channelId") long j, @s("recipientId") long j2) {
|
|
return this._api.convertDMToGroup(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/followers")
|
|
public Observable<Void> createChannelFollower(@s("channelId") long j, @h0.f0.a RestAPIParams.ChannelFollowerPost channelFollowerPost) {
|
|
m.checkNotNullParameter(channelFollowerPost, "body");
|
|
return this._api.createChannelFollower(j, channelFollowerPost);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("users/@me/connections/contacts/@me")
|
|
public Observable<ModelConnectedAccount> createConnectionContacts(@h0.f0.a RestAPIParams.ConnectedAccountContacts connectedAccountContacts) {
|
|
m.checkNotNullParameter(connectedAccountContacts, "connectedAccountContacts");
|
|
return this._api.createConnectionContacts(connectedAccountContacts);
|
|
}
|
|
|
|
public final Observable<Channel> createGroupDM(List<Long> list) {
|
|
m.checkNotNullParameter(list, "userIds");
|
|
Observable<Channel> t = ObservableExtensionsKt.restSubscribeOn$default(this._api.userCreateChannel(new RestAPIParams.CreateChannel(list)), false, 1, null).t(RestAPI$createGroupDM$1.INSTANCE);
|
|
m.checkNotNullExpressionValue(t, "_api\n .userCreateCh…pCreated(channel)\n }");
|
|
return t;
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds")
|
|
public Observable<Response<Guild>> createGuild(@h0.f0.a RestAPIParams.CreateGuild createGuild) {
|
|
m.checkNotNullParameter(createGuild, "body");
|
|
return this._api.createGuild(createGuild);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/channels")
|
|
public Observable<Response<Channel>> createGuildChannel(@s("guildId") long j, @h0.f0.a RestAPIParams.CreateGuildChannel createGuildChannel) {
|
|
m.checkNotNullParameter(createGuildChannel, "body");
|
|
return this._api.createGuildChannel(j, createGuildChannel);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/templates/{guildTemplateCode}")
|
|
public Observable<Guild> createGuildFromTemplate(@s("guildTemplateCode") String str, @h0.f0.a RestAPIParams.CreateGuildFromTemplate createGuildFromTemplate) {
|
|
m.checkNotNullParameter(str, "guildTemplateCode");
|
|
m.checkNotNullParameter(createGuildFromTemplate, "body");
|
|
return this._api.createGuildFromTemplate(str, createGuildFromTemplate);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("guilds/{guildId}/requests/@me")
|
|
public Observable<ModelMemberVerificationFormResponse> createGuildJoinRequest(@s("guildId") long j, @h0.f0.a RestAPIParams.MemberVerificationForm memberVerificationForm) {
|
|
m.checkNotNullParameter(memberVerificationForm, "body");
|
|
return this._api.createGuildJoinRequest(j, memberVerificationForm);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/role-subscriptions/group-listings")
|
|
public Observable<GuildRoleSubscriptionGroupListing> createGuildRoleSubscriptionGroupListing(@s("guildId") long j, @h0.f0.a RestAPIParams.CreateGuildRoleSubscriptionGroupListing createGuildRoleSubscriptionGroupListing) {
|
|
m.checkNotNullParameter(createGuildRoleSubscriptionGroupListing, "body");
|
|
return this._api.createGuildRoleSubscriptionGroupListing(j, createGuildRoleSubscriptionGroupListing);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/role-subscriptions/group-listings/{groupListingId}/subscription-listings")
|
|
public Observable<GuildRoleSubscriptionTierListing> createGuildRoleSubscriptionTier(@s("guildId") long j, @s("groupListingId") long j2, @h0.f0.a RestAPIParams.CreateGuildRoleSubscriptionTierListing createGuildRoleSubscriptionTierListing) {
|
|
m.checkNotNullParameter(createGuildRoleSubscriptionTierListing, "body");
|
|
return this._api.createGuildRoleSubscriptionTier(j, j2, createGuildRoleSubscriptionTierListing);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/events")
|
|
public Observable<GuildScheduledEvent> createGuildScheduledEvent(@s("guildId") long j, @h0.f0.a RestAPIParams.CreateGuildScheduledEventBody createGuildScheduledEventBody) {
|
|
m.checkNotNullParameter(createGuildScheduledEventBody, "event");
|
|
return this._api.createGuildScheduledEvent(j, createGuildScheduledEventBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/guild-events/{eventId}")
|
|
public Observable<Unit> createGuildScheduledEventRsvp(@s("eventId") long j) {
|
|
return this._api.createGuildScheduledEventRsvp(j);
|
|
}
|
|
|
|
public final Observable<Channel> createOrFetchDM(long j) {
|
|
Observable<Channel> Y = ObservableExtensionsKt.takeSingleUntilTimeout$default(StoreStream.Companion.getChannels().observePrivateChannels(), 0, false, 3, null).Y(new RestAPI$createOrFetchDM$1(this, j));
|
|
m.checkNotNullExpressionValue(Y, "StoreStream\n .g… }\n }");
|
|
return Y;
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("google-play/purchase-metadata")
|
|
public Observable<Unit> createPurchaseMetadata(@h0.f0.a RestAPIParams.PurchaseMetadataBody purchaseMetadataBody) {
|
|
m.checkNotNullParameter(purchaseMetadataBody, "purchaseMetadataBody");
|
|
return this._api.createPurchaseMetadata(purchaseMetadataBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/roles")
|
|
public Observable<GuildRole> createRole(@s("guildId") long j) {
|
|
return this._api.createRole(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/threads")
|
|
public Observable<Channel> createThread(@s("channelId") long j, @t("location") String str, @h0.f0.a RestAPIParams.ThreadCreationSettings threadCreationSettings) {
|
|
m.checkNotNullParameter(threadCreationSettings, "body");
|
|
return this._api.createThread(j, str, threadCreationSettings);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/messages/{messageId}/threads")
|
|
public Observable<Channel> createThreadFromMessage(@s("channelId") long j, @s("messageId") long j2, @t("location") String str, @h0.f0.a RestAPIParams.ThreadCreationSettings threadCreationSettings) {
|
|
m.checkNotNullParameter(threadCreationSettings, "body");
|
|
return this._api.createThreadFromMessage(j, j2, str, threadCreationSettings);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/messages/{messageId}/crosspost")
|
|
public Observable<Void> crosspostMessage(@s("channelId") long j, @s("messageId") Long l) {
|
|
return this._api.crosspostMessage(j, l);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/delete")
|
|
public Observable<Void> deleteAccount(@h0.f0.a RestAPIParams.DisableAccount disableAccount) {
|
|
m.checkNotNullParameter(disableAccount, "body");
|
|
return this._api.deleteAccount(disableAccount);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}")
|
|
public Observable<Channel> deleteChannel(@s("channelId") long j) {
|
|
return this._api.deleteChannel(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}/pins/{messageId}")
|
|
public Observable<Void> deleteChannelPin(@s("channelId") long j, @s("messageId") long j2) {
|
|
return this._api.deleteChannelPin(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("users/@me/connections/{connection}/{connectionId}")
|
|
public Observable<Response<Void>> deleteConnection(@s("connection") String str, @s("connectionId") String str2) {
|
|
m.checkNotNullParameter(str, "connection");
|
|
m.checkNotNullParameter(str2, "connectionId");
|
|
return this._api.deleteConnection(str, str2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/delete")
|
|
public Observable<Void> deleteGuild(@s("guildId") long j, @h0.f0.a RestAPIParams.DeleteGuild deleteGuild) {
|
|
m.checkNotNullParameter(deleteGuild, "body");
|
|
return this._api.deleteGuild(j, deleteGuild);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("guilds/{guildId}/emojis/{emojiId}")
|
|
public Observable<Void> deleteGuildEmoji(@s("guildId") long j, @s("emojiId") long j2) {
|
|
return this._api.deleteGuildEmoji(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("guilds/{guildId}/integrations/{integrationId}")
|
|
public Observable<Void> deleteGuildIntegration(@s("guildId") long j, @s("integrationId") long j2) {
|
|
return this._api.deleteGuildIntegration(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("guild-events/{eventId}")
|
|
public Observable<Void> deleteGuildScheduledEvent(@s("eventId") long j) {
|
|
return this._api.deleteGuildScheduledEvent(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("users/@me/guild-events/{eventId}")
|
|
public Observable<Void> deleteGuildScheduledEventRsvp(@s("eventId") long j) {
|
|
return this._api.deleteGuildScheduledEventRsvp(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channel_id}/messages/{message_id}")
|
|
public Observable<Void> deleteMessage(@s("channel_id") long j, @s("message_id") long j2) {
|
|
return this._api.deleteMessage(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("oauth2/tokens/{oauthId}")
|
|
public Observable<Void> deleteOAuthToken(@s("oauthId") long j) {
|
|
return this._api.deleteOAuthToken(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("users/@me/billing/payment-sources/{paymentSourceId}")
|
|
public Observable<Void> deletePaymentSource(@s("paymentSourceId") String str) {
|
|
m.checkNotNullParameter(str, "paymentSourceId");
|
|
return this._api.deletePaymentSource(str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}/permissions/{targetId}")
|
|
public Observable<Void> deletePermissionOverwrites(@s("channelId") long j, @s("targetId") long j2) {
|
|
return this._api.deletePermissionOverwrites(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("guilds/{guildId}/roles/{roleId}")
|
|
public Observable<Void> deleteRole(@s("guildId") long j, @s("roleId") long j2) {
|
|
return this._api.deleteRole(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("users/@me/billing/subscriptions/{subscriptionId}")
|
|
public Observable<Void> deleteSubscription(@s("subscriptionId") String str) {
|
|
m.checkNotNullParameter(str, "subscriptionId");
|
|
return this._api.deleteSubscription(str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/disable")
|
|
public Observable<Void> disableAccount(@h0.f0.a RestAPIParams.DisableAccount disableAccount) {
|
|
m.checkNotNullParameter(disableAccount, "body");
|
|
return this._api.disableAccount(disableAccount);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/mfa/totp/disable")
|
|
public Observable<DisableMfaResponse> disableMFA(@h0.f0.a DisableMfaRequestBody disableMfaRequestBody) {
|
|
m.checkNotNullParameter(disableMfaRequestBody, "body");
|
|
return this._api.disableMFA(disableMfaRequestBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/mfa/sms/disable")
|
|
public Observable<Void> disableMfaSMS(@h0.f0.a RestAPIParams.ActivateMfaSMS activateMfaSMS) {
|
|
m.checkNotNullParameter(activateMfaSMS, "body");
|
|
return this._api.disableMfaSMS(activateMfaSMS);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/members/{userId}")
|
|
public Observable<Void> disconnectGuildMember(@s("guildId") long j, @s("userId") long j2, @h0.f0.a RestAPIParams.GuildMemberDisconnect guildMemberDisconnect) {
|
|
m.checkNotNullParameter(guildMemberDisconnect, "body");
|
|
return this._api.disconnectGuildMember(j, j2, guildMemberDisconnect);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("google-play/downgrade-subscription")
|
|
public Observable<Object> downgradeSubscription(@h0.f0.a RestAPIParams.DowngradeSubscriptionBody downgradeSubscriptionBody) {
|
|
m.checkNotNullParameter(downgradeSubscriptionBody, "downgradeSubscriptionBody");
|
|
return this._api.downgradeSubscription(downgradeSubscriptionBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("channels/{channelId}")
|
|
public Observable<Channel> editGroupDM(@s("channelId") long j, @h0.f0.a RestAPIParams.GroupDM groupDM) {
|
|
m.checkNotNullParameter(groupDM, "body");
|
|
return this._api.editGroupDM(j, groupDM);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("channels/{channel_id}/messages/{message_id}")
|
|
public Observable<Message> editMessage(@s("channel_id") long j, @s("message_id") long j2, @h0.f0.a RestAPIParams.Message message) {
|
|
m.checkNotNullParameter(message, "message");
|
|
return this._api.editMessage(j, j2, message);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("channels/{channelId}")
|
|
public Observable<Channel> editTextChannel(@s("channelId") long j, @h0.f0.a RestAPIParams.TextChannel textChannel) {
|
|
m.checkNotNullParameter(textChannel, "body");
|
|
return this._api.editTextChannel(j, textChannel);
|
|
}
|
|
|
|
public final Observable<Channel> editTextChannel(long j, String str, Integer num, String str2, Boolean bool, Integer num2, Integer num3) {
|
|
return ObservableExtensionsKt.restSubscribeOn$default(this._api.editTextChannel(j, new RestAPIParams.TextChannel(str, num, str2, bool, num2, num3)), false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("channels/{channelId}")
|
|
public Observable<Channel> editThread(@s("channelId") long j, @h0.f0.a RestAPIParams.ThreadSettings threadSettings) {
|
|
m.checkNotNullParameter(threadSettings, "body");
|
|
return this._api.editThread(j, threadSettings);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("channels/{channelId}")
|
|
public Observable<Channel> editTopicalChannel(@s("channelId") long j, @h0.f0.a RestAPIParams.TopicalChannel topicalChannel) {
|
|
m.checkNotNullParameter(topicalChannel, "body");
|
|
return this._api.editTopicalChannel(j, topicalChannel);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("channels/{channelId}")
|
|
public Observable<Channel> editVoiceChannel(@s("channelId") long j, @h0.f0.a RestAPIParams.VoiceChannel voiceChannel) {
|
|
m.checkNotNullParameter(voiceChannel, "body");
|
|
return this._api.editVoiceChannel(j, voiceChannel);
|
|
}
|
|
|
|
public final Observable<Channel> editVoiceChannel(long j, String str, String str2, Integer num, Integer num2, Integer num3, String str3) {
|
|
return ObservableExtensionsKt.restSubscribeOn$default(this._api.editVoiceChannel(j, new RestAPIParams.VoiceChannel(str, str2, num, num3, num2, str3)), false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/integrations")
|
|
public Observable<Void> enableIntegration(@s("guildId") long j, @h0.f0.a RestAPIParams.EnableIntegration enableIntegration) {
|
|
m.checkNotNullParameter(enableIntegration, "body");
|
|
return this._api.enableIntegration(j, enableIntegration);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/mfa/totp/enable")
|
|
public Observable<EnableMfaResponse> enableMFA(@h0.f0.a RestAPIParams.EnableMFA enableMFA) {
|
|
m.checkNotNullParameter(enableMFA, "body");
|
|
return this._api.enableMFA(enableMFA);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/mfa/sms/enable")
|
|
public Observable<Void> enableMfaSMS(@h0.f0.a RestAPIParams.ActivateMfaSMS activateMfaSMS) {
|
|
m.checkNotNullParameter(activateMfaSMS, "body");
|
|
return this._api.enableMfaSMS(activateMfaSMS);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("stage-instances/{channelId}")
|
|
public Observable<Unit> endStageInstance(@s("channelId") long j) {
|
|
return this._api.endStageInstance(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/forgot")
|
|
public Observable<Response<Void>> forgotPassword(@h0.f0.a RestAPIParams.ForgotPassword forgotPassword) {
|
|
m.checkNotNullParameter(forgotPassword, "body");
|
|
return this._api.forgotPassword(forgotPassword);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/entitlements/gift-codes")
|
|
public Observable<ModelGift> generateGiftCode(@h0.f0.a RestAPIParams.GenerateGiftCode generateGiftCode) {
|
|
m.checkNotNullParameter(generateGiftCode, "body");
|
|
return this._api.generateGiftCode(generateGiftCode);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/{userId}/sessions/{sessionId}/activities/{applicationId}/metadata")
|
|
public Observable<ActivityMetadata> getActivityMetadata(@s("userId") long j, @s("sessionId") String str, @s("applicationId") long j2) {
|
|
m.checkNotNullParameter(str, "sessionId");
|
|
return this._api.getActivityMetadata(j, str, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("outbound-promotions")
|
|
public Observable<List<OutboundPromotion>> getAllActiveOutboundPromotions() {
|
|
return this._api.getAllActiveOutboundPromotions();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("outbound-promotions/preview")
|
|
public Observable<List<OutboundPromotion>> getAllPreviewPromotions() {
|
|
return this._api.getAllPreviewPromotions();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/threads/archived/private")
|
|
public Observable<ThreadListing> getAllPrivateArchivedThreads(@s("channelId") long j, @t("before") String str) {
|
|
return this._api.getAllPrivateArchivedThreads(j, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/threads/archived/public")
|
|
public Observable<ThreadListing> getAllPublicArchivedThreads(@s("channelId") long j, @t("before") String str) {
|
|
return this._api.getAllPublicArchivedThreads(j, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("applications/{botId}/commands")
|
|
public Observable<List<ApplicationCommand>> getApplicationCommands(@s("botId") long j) {
|
|
return this._api.getApplicationCommands(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("applications/public")
|
|
public Observable<List<Application>> getApplications(@t("application_ids") long j) {
|
|
return this._api.getApplications(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/audit-logs")
|
|
public Observable<ModelAuditLog> getAuditLogs(@s("guildId") long j, @t("limit") int i, @t("before") Long l, @t("user_id") Long l2, @t("action_type") Integer num) {
|
|
return this._api.getAuditLogs(j, i, l, l2, num);
|
|
}
|
|
|
|
public final Observable<ModelAuditLog> getAuditLogs(long j, Long l, Long l2, Integer num) {
|
|
Integer num2;
|
|
RestAPI restAPI;
|
|
Long l3 = (l2 != null && l2.longValue() == 0) ? null : l2;
|
|
if (num != null && num.intValue() == 0) {
|
|
num2 = null;
|
|
restAPI = this;
|
|
} else {
|
|
restAPI = this;
|
|
num2 = num;
|
|
}
|
|
return restAPI._api.getAuditLogs(j, 50, l, l3, num2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/mfa/codes")
|
|
public Observable<GetBackupCodesResponse> getBackupCodes(@h0.f0.a GetBackupCodesRequestBody getBackupCodesRequestBody) {
|
|
m.checkNotNullParameter(getBackupCodesRequestBody, "body");
|
|
return this._api.getBackupCodes(getBackupCodesRequestBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/bans")
|
|
public Observable<List<ModelBan>> getBans(@s("guildId") long j) {
|
|
return this._api.getBans(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("private/bug-reports")
|
|
public Observable<BugReportConfig> getBugReportConfig() {
|
|
return this._api.getBugReportConfig();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/follower-stats")
|
|
public Observable<ModelChannelFollowerStatsDto> getChannelFollowerStats(@s("channelId") long j) {
|
|
return this._api.getChannelFollowerStats(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/messages")
|
|
public Observable<List<Message>> getChannelMessages(@s("channelId") long j, @t("before") Long l, @t("after") Long l2, @t("limit") Integer num) {
|
|
return this._api.getChannelMessages(j, l, l2, num);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/messages")
|
|
public Observable<List<Message>> getChannelMessagesAround(@s("channelId") long j, @t("limit") int i, @t("around") long j2) {
|
|
return this._api.getChannelMessagesAround(j, i, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/pins")
|
|
public Observable<List<Message>> getChannelPins(@s("channelId") long j) {
|
|
return this._api.getChannelPins(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/outbound-promotions/codes")
|
|
public Observable<List<ClaimedOutboundPromotion>> getClaimedOutboundPromotions() {
|
|
return this._api.getClaimedOutboundPromotions();
|
|
}
|
|
|
|
public final Observable<Integer> getClientVersion() {
|
|
RestAPIInterface.Dynamic dynamic = apiClientVersions;
|
|
if (dynamic == null) {
|
|
m.throwUninitializedPropertyAccessException("apiClientVersions");
|
|
}
|
|
Observable<R> F = dynamic.get("https://dl.discordapp.net/apps/android/versions.json").F(RestAPI$getClientVersion$1.INSTANCE);
|
|
m.checkNotNullExpressionValue(F, "apiClientVersions\n …n_version\")?.asInt ?: 0 }");
|
|
return ObservableExtensionsKt.restSubscribeOn$default(F, false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/connections/{platformType}/{accountId}/access-token")
|
|
public Observable<ModelConnectionAccessToken> getConnectionAccessToken(@s("platformType") String str, @s("accountId") String str2) {
|
|
m.checkNotNullParameter(str, "platformType");
|
|
m.checkNotNullParameter(str2, "accountId");
|
|
return this._api.getConnectionAccessToken(str, str2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("connections/{connection}/callback-continuation/{pinNumber}")
|
|
public Observable<ModelConnectionState> getConnectionState(@s("connection") String str, @s("pinNumber") String str2) {
|
|
m.checkNotNullParameter(str, "connection");
|
|
m.checkNotNullParameter(str2, "pinNumber");
|
|
return this._api.getConnectionState(str, str2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/connections")
|
|
public Observable<List<ModelConnectedAccount>> getConnections() {
|
|
return this._api.getConnections();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/consent")
|
|
public Observable<Consents> getConsents() {
|
|
return this._api.getConsents();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/directory-entries")
|
|
public Observable<List<DirectoryEntry>> getDirectoryEntries(@s("channelId") long j) {
|
|
return this._api.getDirectoryEntries(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("emojis/{emojiId}/guild")
|
|
public Observable<Guild> getEmojiGuild(@s("emojiId") long j) {
|
|
return this._api.getEmojiGuild(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/directory-entries/counts")
|
|
public Observable<Map<Integer, Integer>> getEntryCounts(@s("channelId") long j) {
|
|
return this._api.getEntryCounts(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("experiments")
|
|
public Observable<UnauthenticatedUserExperimentsDto> getExperiments() {
|
|
return this._api.getExperiments();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("friend-suggestions")
|
|
public Observable<List<FriendSuggestion>> getFriendSuggestions() {
|
|
return this._api.getFriendSuggestions();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("gifs/search")
|
|
public Observable<List<GifDto>> getGifSearchResults(@t("q") String str, @t("provider") String str2, @t("locale") String str3, @t("media_format") String str4, @t("limit") int i) {
|
|
m.checkNotNullParameter(str, "query");
|
|
m.checkNotNullParameter(str2, "provider");
|
|
m.checkNotNullParameter(str3, "locale");
|
|
m.checkNotNullParameter(str4, "mediaFormat");
|
|
return this._api.getGifSearchResults(str, str2, str3, str4, i);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("gifs/suggest")
|
|
public Observable<List<String>> getGifSuggestedSearchTerms(@t("provider") String str, @t("q") String str2, @t("locale") String str3, @t("limit") int i) {
|
|
c.d.b.a.a.l0(str, "provider", str2, "query", str3, "locale");
|
|
return this._api.getGifSuggestedSearchTerms(str, str2, str3, i);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("gifs/trending-search")
|
|
public Observable<List<String>> getGifTrendingSearchTerms(@t("provider") String str, @t("locale") String str2, @t("limit") int i) {
|
|
m.checkNotNullParameter(str, "provider");
|
|
m.checkNotNullParameter(str2, "locale");
|
|
return this._api.getGifTrendingSearchTerms(str, str2, i);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/entitlements/gifts")
|
|
public Observable<List<ModelEntitlement>> getGifts() {
|
|
return this._api.getGifts();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/emojis")
|
|
public Observable<List<ModelEmojiGuild>> getGuildEmojis(@s("guildId") long j) {
|
|
return this._api.getGuildEmojis(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/integrations")
|
|
public Observable<List<ModelGuildIntegration>> getGuildIntegrations(@s("guildId") long j) {
|
|
return this._api.getGuildIntegrations(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/invites")
|
|
public Observable<List<ModelInvite>> getGuildInvites(@s("guildId") long j) {
|
|
return this._api.getGuildInvites(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/member-verification")
|
|
public Observable<ModelMemberVerificationForm> getGuildMemberVerificationForm(@s("guildId") long j) {
|
|
return this._api.getGuildMemberVerificationForm(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/preview")
|
|
public Observable<GuildPreview> getGuildPreview(@s("guildId") long j) {
|
|
return this._api.getGuildPreview(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/roles/{roleId}/member-ids")
|
|
public Observable<List<Long>> getGuildRoleMemberIds(@s("guildId") long j, @s("roleId") long j2) {
|
|
return this._api.getGuildRoleMemberIds(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/role-subscriptions/group-listings/{groupListingId}")
|
|
public Observable<GuildRoleSubscriptionGroupListing> getGuildRoleSubscriptionGroupListing(@s("guildId") long j, @s("groupListingId") long j2) {
|
|
return this._api.getGuildRoleSubscriptionGroupListing(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/role-subscriptions/group-listings")
|
|
public Observable<List<GuildRoleSubscriptionGroupListing>> getGuildRoleSubscriptionGroupListings(@s("guildId") long j) {
|
|
return this._api.getGuildRoleSubscriptionGroupListings(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guild-events/{eventId}")
|
|
public Observable<GuildScheduledEvent> getGuildScheduledEvent(@s("eventId") long j) {
|
|
return this._api.getGuildScheduledEvent(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/events")
|
|
public Observable<List<GuildScheduledEvent>> getGuildScheduledEvents(@s("guildId") long j, @t("with_user_count") boolean z2) {
|
|
return this._api.getGuildScheduledEvents(j, z2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/templates/{guildTemplateCode}")
|
|
public Observable<ModelGuildTemplate> getGuildTemplateCode(@s("guildTemplateCode") String str) {
|
|
m.checkNotNullParameter(str, "guildTemplateCode");
|
|
return this._api.getGuildTemplateCode(str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/regions")
|
|
public Observable<List<ModelVoiceRegion>> getGuildVoiceRegions(@s("guildId") long j) {
|
|
return this._api.getGuildVoiceRegions(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/welcome-screen")
|
|
public Observable<GuildWelcomeScreen> getGuildWelcomeScreen(@s("guildId") long j) {
|
|
return this._api.getGuildWelcomeScreen(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/harvest")
|
|
public Observable<Harvest> getHarvestStatus() {
|
|
return this._api.getHarvestStatus();
|
|
}
|
|
|
|
public final Observable<HarvestState> getHarvestStatusGuarded() {
|
|
Observable<R> F = this._api.getHarvestStatus().F(RestAPI$getHarvestStatusGuarded$1.INSTANCE);
|
|
m.checkNotNullExpressionValue(F, "_api.getHarvestStatus()\n…erRequested()\n }");
|
|
return ObservableExtensionsKt.restSubscribeOn(F, false);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/messages/{messageId}/interaction-data")
|
|
public Observable<ApplicationCommandData> getInteractionData(@s("channelId") long j, @s("messageId") long j2) {
|
|
return this._api.getInteractionData(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("invites/{code}")
|
|
public Observable<Response<ModelInvite>> getInviteCode(@s("code") String str, @t("with_counts") boolean z2, @t("guild_scheduled_event_id") Long l) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_CODE);
|
|
return this._api.getInviteCode(str, z2, l);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/billing/invoices/preview")
|
|
public Observable<ModelInvoicePreview> getInvoicePreview(@h0.f0.a RestAPIParams.InvoicePreviewBody invoicePreviewBody) {
|
|
m.checkNotNullParameter(invoicePreviewBody, "invoicePreviewBody");
|
|
return this._api.getInvoicePreview(invoicePreviewBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/library")
|
|
public Observable<List<ModelLibraryApplication>> getLibrary() {
|
|
return this._api.getLibrary();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("auth/location-metadata")
|
|
public Observable<ModelLocationMetadata> getLocationMetadata() {
|
|
return this._api.getLocationMetadata();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/mentions")
|
|
public Observable<List<Message>> getMentions(@t("limit") int i, @t("roles") boolean z2, @t("everyone") boolean z3, @t("guild_id") Long l, @t("before") Long l2) {
|
|
return this._api.getMentions(i, z2, z3, l, l2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/applications/{applicationId}/entitlements")
|
|
public Observable<List<ModelEntitlement>> getMyEntitlements(@s("applicationId") long j, @t("exclude_consumed") boolean z2) {
|
|
return this._api.getMyEntitlements(j, z2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/users/@me/threads/archived/private")
|
|
public Observable<ThreadListing> getMyPrivateArchivedThreads(@s("channelId") long j, @t("before") Long l) {
|
|
return this._api.getMyPrivateArchivedThreads(j, l);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("oauth2/tokens")
|
|
public Observable<List<ModelOAuth2Token>> getOAuthTokens() {
|
|
return this._api.getOAuthTokens();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("oauth2/authorize")
|
|
public Observable<RestAPIParams.OAuth2Authorize.ResponseGet> getOauth2Authorize(@t("client_id") String str, @t("state") String str2, @t("response_type") String str3, @t("redirect_uri") String str4, @t("prompt") String str5, @t("scope") String str6, @t("permissions") String str7) {
|
|
c.d.b.a.a.l0(str, "clientId", str5, "prompt", str6, "scope");
|
|
return this._api.getOauth2Authorize(str, str2, str3, str4, str5, str6, str7);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("oauth2/samsung/authorize")
|
|
public Observable<Void> getOauth2SamsungAuthorize(@t("client_id") String str, @t("state") String str2, @t("response_type") String str3, @t("redirect_uri") String str4, @t("prompt") String str5, @t("scope") String str6) {
|
|
c.d.b.a.a.l0(str, "clientId", str5, "prompt", str6, "scope");
|
|
return this._api.getOauth2SamsungAuthorize(str, str2, str3, str4, str5, str6);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/billing/payment-sources")
|
|
public Observable<List<PaymentSourceRaw>> getPaymentSources() {
|
|
return this._api.getPaymentSources();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("store/price-tiers")
|
|
public Observable<List<Integer>> getPriceTiers(@t("price_tier_type") int i) {
|
|
return this._api.getPriceTiers(i);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/prune")
|
|
public Observable<PruneCountResponse> getPruneCount(@s("guildId") long j, @t("days") int i) {
|
|
return this._api.getPruneCount(j, i);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/messages/{messageId}/reactions/{emoji}")
|
|
public Observable<List<com.discord.api.user.User>> getReactionUsers(@s("channelId") long j, @s("messageId") long j2, @s(encoded = true, value = "emoji") String str, @t("limit") Integer num) {
|
|
m.checkNotNullParameter(str, "emoji");
|
|
return this._api.getReactionUsers(j, j2, str, num);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("stage-instances")
|
|
public Observable<Response<List<RecommendedStageInstance>>> getRecommendedStageInstances() {
|
|
return this._api.getRecommendedStageInstances();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/{userId}/relationships")
|
|
public Observable<List<ModelUserRelationship>> getRelationships(@s("userId") long j) {
|
|
return this._api.getRelationships(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("reporting/menu/{reportType}")
|
|
public Observable<MenuAPIResponse> getReportMenu(@s("reportType") String str) {
|
|
m.checkNotNullParameter(str, "reportType");
|
|
return this._api.getReportMenu(str);
|
|
}
|
|
|
|
public final Observable<List<ModelRtcLatencyRegion>> getRtcLatencyTestRegionsIps() {
|
|
RestAPIInterface.RtcLatency rtcLatency = apiRtcLatency;
|
|
if (rtcLatency == null) {
|
|
m.throwUninitializedPropertyAccessException("apiRtcLatency");
|
|
}
|
|
return ObservableExtensionsKt.restSubscribeOn$default(rtcLatency.get("https://latency.discord.media/rtc"), false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("tracks/{id}")
|
|
public Observable<ModelSpotifyTrack> getSpotifyTrack(@s("id") String str) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_ID);
|
|
return this._api.getSpotifyTrack(str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("stage-instances/extra")
|
|
public Observable<List<RecommendedStageInstance>> getStageInstancesForChannels(@t("channel_ids") Set<Long> set) {
|
|
m.checkNotNullParameter(set, "channelIds");
|
|
return this._api.getStageInstancesForChannels(set);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("stickers/{stickerId}")
|
|
public Observable<Sticker> getSticker(@s("stickerId") long j) {
|
|
return this._api.getSticker(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("stickers/{stickerId}/guild")
|
|
public Observable<Guild> getStickerGuild(@s("stickerId") long j) {
|
|
return this._api.getStickerGuild(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("sticker-packs/{packId}")
|
|
public Observable<ModelStickerPack> getStickerPack(@s("packId") long j) {
|
|
return this._api.getStickerPack(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("sticker-packs")
|
|
public Observable<ModelStickerStoreDirectory> getStickerPacks() {
|
|
return this._api.getStickerPacks();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("streams/{streamKey}/preview")
|
|
public Observable<ModelApplicationStreamPreview> getStreamPreview(@s("streamKey") String str, @t("version") long j) {
|
|
m.checkNotNullParameter(str, "streamKey");
|
|
return this._api.getStreamPreview(str, j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/guilds/premium/subscription-slots")
|
|
public Observable<List<ModelPremiumGuildSubscriptionSlot>> getSubscriptionSlots() {
|
|
return this._api.getSubscriptionSlots();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/billing/subscriptions")
|
|
public Observable<List<ModelSubscription>> getSubscriptions() {
|
|
return this._api.getSubscriptions();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("gifs/trending")
|
|
public Observable<TrendingGifCategoriesResponseDto> getTrendingGifCategories(@t("provider") String str, @t("locale") String str2, @t("media_format") String str3) {
|
|
c.d.b.a.a.l0(str, "provider", str2, "locale", str3, "mediaFormat");
|
|
return this._api.getTrendingGifCategories(str, str2, str3);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("gifs/trending-gifs")
|
|
public Observable<List<GifDto>> getTrendingGifCategory(@t("provider") String str, @t("locale") String str2, @t("media_format") String str3, @t("limit") int i) {
|
|
c.d.b.a.a.l0(str, "provider", str2, "locale", str3, "mediaFormat");
|
|
return this._api.getTrendingGifCategory(str, str2, str3, i);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/affinities/users")
|
|
public Observable<ModelUserAffinities> getUserAffinities() {
|
|
return this._api.getUserAffinities();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/guilds/{guildId}/events/users")
|
|
public Observable<List<GuildScheduledEventUser>> getUserGuildScheduledEvents(@s("guildId") long j) {
|
|
return this._api.getUserGuildScheduledEvents(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/join-request-guilds")
|
|
public Observable<List<Guild>> getUserJoinRequestGuilds() {
|
|
return this._api.getUserJoinRequestGuilds();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/notes/{userId}")
|
|
public Observable<ModelUserNote> getUserNote(@s("userId") long j) {
|
|
return this._api.getUserNote(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/survey")
|
|
public Observable<Response<UserSurveyFetchResponse>> getUserSurvey() {
|
|
return this._api.getUserSurvey();
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/vanity-url")
|
|
public Observable<VanityUrlResponse> getVanityUrl(@s("guildId") long j) {
|
|
return this._api.getVanityUrl(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("friend-suggestions/{userId}")
|
|
public Observable<Void> ignoreFriendSuggestion(@s("userId") long j) {
|
|
return this._api.ignoreFriendSuggestion(j);
|
|
}
|
|
|
|
public final Observable<Void> inviteUserToSpeak(Channel channel, long j, Clock clock) {
|
|
m.checkNotNullParameter(channel, "channel");
|
|
m.checkNotNullParameter(clock, "clock");
|
|
return this._api.updateUserVoiceStates(channel.f(), j, new RestAPIParams.ChannelVoiceStateUpdate(channel.h(), Boolean.FALSE, new UtcDateTime(clock.currentTimeMillis())));
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("guilds/{guildId}/members/@me")
|
|
public Observable<Guild> joinGuild(@s("guildId") long j, @t("lurker") boolean z2, @t("session_id") String str, @t("directory_channel_id") Long l) {
|
|
return this._api.joinGuild(j, z2, str, l);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("integrations/{integrationId}/join")
|
|
public Observable<Void> joinGuildFromIntegration(@s("integrationId") String str) {
|
|
m.checkNotNullParameter(str, "integrationId");
|
|
return this._api.joinGuildFromIntegration(str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("hub-waitlist/signup")
|
|
public Observable<WaitlistSignup> joinHubWaitlist(@h0.f0.a RestAPIParams.HubWaitlist hubWaitlist) {
|
|
m.checkNotNullParameter(hubWaitlist, "body");
|
|
return this._api.joinHubWaitlist(hubWaitlist);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/thread-members/@me")
|
|
public Observable<Void> joinThread(@s("channelId") long j, @t("location") String str, @h0.f0.a RestAPIParams.EmptyBody emptyBody) {
|
|
m.checkNotNullParameter(emptyBody, "body");
|
|
return this._api.joinThread(j, str, emptyBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("guilds/{guildId}/members/{userId}")
|
|
public Observable<Void> kickGuildMember(@s("guildId") long j, @s("userId") long j2, @i("X-Audit-Log-Reason") String str) {
|
|
return this._api.kickGuildMember(j, j2, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("users/@me/guilds/{guildId}")
|
|
public Observable<Void> leaveGuild(@s("guildId") long j) {
|
|
return this._api.leaveGuild(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h(hasBody = GoogleSmartLockManager.SET_DISCORD_ACCOUNT_DETAILS, method = "DELETE", path = "users/@me/guilds/{guildId}")
|
|
public Observable<Void> leaveGuild(@s("guildId") long j, @h0.f0.a RestAPIParams.LeaveGuildBody leaveGuildBody) {
|
|
m.checkNotNullParameter(leaveGuildBody, "leaveGuildBody");
|
|
return this._api.leaveGuild(j, leaveGuildBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}/thread-members/@me")
|
|
public Observable<Void> leaveThread(@s("channelId") long j, @t("location") String str) {
|
|
return this._api.leaveThread(j, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/logout")
|
|
public Observable<Response<Void>> logout(@h0.f0.a RestAPIParams.UserDevices userDevices) {
|
|
m.checkNotNullParameter(userDevices, "body");
|
|
return this._api.logout(userDevices);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("channels/{channelId}/directory-entry/{guildId}")
|
|
public Observable<DirectoryEntry> modifyServerInHub(@s("channelId") long j, @s("guildId") long j2, @h0.f0.a RestAPIParams.AddServerBody addServerBody) {
|
|
m.checkNotNullParameter(addServerBody, "body");
|
|
return this._api.modifyServerInHub(j, j2, addServerBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/emojis/{emojiId}")
|
|
public Observable<ModelEmojiGuild> patchGuildEmoji(@s("guildId") long j, @s("emojiId") long j2, @h0.f0.a RestAPIParams.PatchGuildEmoji patchGuildEmoji) {
|
|
m.checkNotNullParameter(patchGuildEmoji, "body");
|
|
return this._api.patchGuildEmoji(j, j2, patchGuildEmoji);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me")
|
|
public Observable<com.discord.api.user.User> patchUser(@h0.f0.a PatchUserBody patchUserBody) {
|
|
m.checkNotNullParameter(patchUserBody, "patchUserBody");
|
|
return this._api.patchUser(patchUserBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me")
|
|
public Observable<com.discord.api.user.User> patchUser(@h0.f0.a RestAPIParams.UserInfo userInfo) {
|
|
m.checkNotNullParameter(userInfo, "userInfo");
|
|
return this._api.patchUser(userInfo);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("phone-verifications/resend")
|
|
public Observable<Void> phoneVerificationsResend(@h0.f0.a RestAPIParams.VerificationCodeResend verificationCodeResend) {
|
|
m.checkNotNullParameter(verificationCodeResend, "body");
|
|
return this._api.phoneVerificationsResend(verificationCodeResend);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("phone-verifications/verify")
|
|
public Observable<Response<ModelPhoneVerificationToken>> phoneVerificationsVerify(@h0.f0.a RestAPIParams.VerificationCode verificationCode) {
|
|
m.checkNotNullParameter(verificationCode, "body");
|
|
return this._api.phoneVerificationsVerify(verificationCode);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/fingerprint")
|
|
public Observable<FingerprintResponse> postAuthFingerprint(@h0.f0.a RestAPIParams.EmptyBody emptyBody) {
|
|
m.checkNotNullParameter(emptyBody, "body");
|
|
return this._api.postAuthFingerprint(emptyBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/login")
|
|
public Observable<Response<ModelLoginResult>> postAuthLogin(@h0.f0.a RestAPIParams.AuthLogin authLogin) {
|
|
m.checkNotNullParameter(authLogin, "body");
|
|
return this._api.postAuthLogin(authLogin);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/register")
|
|
public Observable<Response<RegisterResponse>> postAuthRegister(@h0.f0.a RestAPIParams.AuthRegister authRegister) {
|
|
m.checkNotNullParameter(authRegister, "body");
|
|
return this._api.postAuthRegister(authRegister);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/register/phone")
|
|
public Observable<Response<Void>> postAuthRegisterPhone(@h0.f0.a RestAPIParams.AuthRegisterPhone authRegisterPhone) {
|
|
m.checkNotNullParameter(authRegisterPhone, "body");
|
|
return this._api.postAuthRegisterPhone(authRegisterPhone);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/verify/resend")
|
|
public Observable<Response<Void>> postAuthVerifyResend(@h0.f0.a RestAPIParams.EmptyBody emptyBody) {
|
|
m.checkNotNullParameter(emptyBody, "body");
|
|
return this._api.postAuthVerifyResend(emptyBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/invites")
|
|
public Observable<ModelInvite> postChannelInvite(@s("channelId") long j, @h0.f0.a RestAPIParams.Invite invite) {
|
|
m.checkNotNullParameter(invite, "body");
|
|
return this._api.postChannelInvite(j, invite);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/messages/{messageId}/ack")
|
|
public Observable<Void> postChannelMessagesAck(@s("channelId") long j, @s("messageId") Long l, @h0.f0.a RestAPIParams.ChannelMessagesAck channelMessagesAck) {
|
|
m.checkNotNullParameter(channelMessagesAck, "body");
|
|
return this._api.postChannelMessagesAck(j, l, channelMessagesAck);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/emojis")
|
|
public Observable<ModelEmojiGuild> postGuildEmoji(@s("guildId") long j, @h0.f0.a RestAPIParams.PostGuildEmoji postGuildEmoji) {
|
|
m.checkNotNullParameter(postGuildEmoji, "body");
|
|
return this._api.postGuildEmoji(j, postGuildEmoji);
|
|
}
|
|
|
|
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x003c: APUT
|
|
(r4v1 kotlin.Pair<java.lang.String, ? extends java.lang.Object>[])
|
|
(1 ??[boolean, int, float, short, byte, char])
|
|
(wrap: kotlin.Pair<java.lang.String, ? extends java.lang.Object> : 0x0037: INVOKE (r11v4 kotlin.Pair<java.lang.String, ? extends java.lang.Object>) = ("location_guild_id"), (r11v3 java.lang.Long) type: STATIC call: c0.o.to(java.lang.Object, java.lang.Object):kotlin.Pair)
|
|
*/
|
|
public final Observable<ModelInvite> postInviteCode(ModelInvite modelInvite, String str) {
|
|
m.checkNotNullParameter(modelInvite, "invite");
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION);
|
|
RestAPIInterface restAPIInterface = this._api;
|
|
String str2 = modelInvite.code;
|
|
m.checkNotNullExpressionValue(str2, "invite.code");
|
|
RestAPIParams.EmptyBody emptyBody = new RestAPIParams.EmptyBody();
|
|
Pair<String, ? extends Object>[] pairArr = new Pair[5];
|
|
pairArr[0] = c0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str);
|
|
Guild guild = modelInvite.getGuild();
|
|
pairArr[1] = c0.o.to("location_guild_id", guild != null ? Long.valueOf(guild.p()) : null);
|
|
Channel channel = modelInvite.getChannel();
|
|
pairArr[2] = c0.o.to("location_channel_id", channel != null ? Long.valueOf(channel.h()) : null);
|
|
Channel channel2 = modelInvite.getChannel();
|
|
pairArr[3] = c0.o.to("location_channel_type", channel2 != null ? Integer.valueOf(channel2.A()) : null);
|
|
GuildScheduledEvent guildScheduledEvent = modelInvite.getGuildScheduledEvent();
|
|
pairArr[4] = c0.o.to("invite_guild_scheduled_event_id", guildScheduledEvent != null ? Long.valueOf(guildScheduledEvent.g()) : null);
|
|
return ObservableExtensionsKt.restSubscribeOn$default(restAPIInterface.postInviteCode(str2, emptyBody, jsonObjectOf(pairArr)), false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("invites/{code}")
|
|
public Observable<ModelInvite> postInviteCode(@s("code") String str, @h0.f0.a RestAPIParams.EmptyBody emptyBody, @i("X-Context-Properties") String str2) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_CODE);
|
|
m.checkNotNullParameter(emptyBody, "body");
|
|
m.checkNotNullParameter(str2, "context");
|
|
return this._api.postInviteCode(str, emptyBody, str2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("auth/mfa/totp")
|
|
public Observable<Response<ModelLoginResult>> postMFACode(@h0.f0.a RestAPIParams.MFALogin mFALogin) {
|
|
m.checkNotNullParameter(mFALogin, "body");
|
|
return this._api.postMFACode(mFALogin);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("oauth2/authorize")
|
|
public Observable<RestAPIParams.OAuth2Authorize.ResponsePost> postOauth2Authorize(@t("client_id") String str, @t("state") String str2, @t("response_type") String str3, @t("redirect_uri") String str4, @t("prompt") String str5, @t("scope") String str6, @t("permissions") String str7, @t("code_challenge") String str8, @t("code_challenge_method") String str9, @h0.f0.a Map<String, String> map) {
|
|
m.checkNotNullParameter(str, "clientId");
|
|
m.checkNotNullParameter(str5, "prompt");
|
|
m.checkNotNullParameter(str6, "scope");
|
|
m.checkNotNullParameter(map, "body");
|
|
return this._api.postOauth2Authorize(str, str2, str3, str4, str5, str6, str7, str8, str9, map);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/remote-auth/cancel")
|
|
public Observable<Void> postRemoteAuthCancel(@h0.f0.a RestAPIParams.RemoteAuthCancel remoteAuthCancel) {
|
|
m.checkNotNullParameter(remoteAuthCancel, "body");
|
|
return this._api.postRemoteAuthCancel(remoteAuthCancel);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/remote-auth/finish")
|
|
public Observable<Void> postRemoteAuthFinish(@h0.f0.a RestAPIParams.RemoteAuthFinish remoteAuthFinish) {
|
|
m.checkNotNullParameter(remoteAuthFinish, "body");
|
|
return this._api.postRemoteAuthFinish(remoteAuthFinish);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/remote-auth")
|
|
public Observable<ModelRemoteAuthHandshake> postRemoteAuthInitialize(@h0.f0.a RestAPIParams.RemoteAuthInitialize remoteAuthInitialize) {
|
|
m.checkNotNullParameter(remoteAuthInitialize, "body");
|
|
return this._api.postRemoteAuthInitialize(remoteAuthInitialize);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("streams/{streamKey}/preview")
|
|
public Observable<Void> postStreamPreview(@s("streamKey") String str, @h0.f0.a RestAPIParams.Thumbnail thumbnail) {
|
|
m.checkNotNullParameter(str, "streamKey");
|
|
m.checkNotNullParameter(thumbnail, "thumbnail");
|
|
return this._api.postStreamPreview(str, thumbnail);
|
|
}
|
|
|
|
public final Observable<Void> postStreamPreview(String str, String str2) {
|
|
m.checkNotNullParameter(str, "streamKey");
|
|
m.checkNotNullParameter(str2, "thumbnail");
|
|
return this._api.postStreamPreview(str, new RestAPIParams.Thumbnail(str2));
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/prune")
|
|
public Observable<Void> pruneMembers(@s("guildId") long j, @h0.f0.a RestAPIParams.PruneGuild pruneGuild) {
|
|
m.checkNotNullParameter(pruneGuild, "body");
|
|
return this._api.pruneMembers(j, pruneGuild);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}/messages/{messageId}/reactions")
|
|
public Observable<Void> removeAllReactions(@s("channelId") long j, @s("messageId") long j2) {
|
|
return this._api.removeAllReactions(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}/recipients/{recipientId}")
|
|
public Observable<Void> removeChannelRecipient(@s("channelId") long j, @s("recipientId") long j2) {
|
|
return this._api.removeChannelRecipient(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}/messages/{messageId}/reactions/{reaction}/{userId}")
|
|
public Observable<Void> removeReaction(@s("channelId") long j, @s("messageId") long j2, @s(encoded = true, value = "reaction") String str, @s("userId") long j3) {
|
|
m.checkNotNullParameter(str, "reaction");
|
|
return this._api.removeReaction(j, j2, str, j3);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("users/@me/relationships/{userId}")
|
|
public Observable<Void> removeRelationship(@s("userId") long j, @i("X-Context-Properties") String str) {
|
|
m.checkNotNullParameter(str, "context");
|
|
return this._api.removeRelationship(j, str);
|
|
}
|
|
|
|
public final Observable<Void> removeRelationship(String str, long j) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION);
|
|
return ObservableExtensionsKt.restSubscribeOn$default(this._api.removeRelationship(j, jsonObjectOf(c0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}/messages/{messageId}/reactions/{reaction}/@me")
|
|
public Observable<Void> removeSelfReaction(@s("channelId") long j, @s("messageId") long j2, @s(encoded = true, value = "reaction") String str) {
|
|
m.checkNotNullParameter(str, "reaction");
|
|
return this._api.removeSelfReaction(j, j2, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("channels/{channelId}/directory-entry/{guildId}")
|
|
public Observable<Response<DirectoryEntry>> removeServerFromHub(@s("channelId") long j, @s("guildId") long j2) {
|
|
return this._api.removeServerFromHub(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/channels")
|
|
public Observable<Void> reorderChannels(@s("guildId") long j, @h0.f0.a List<RestAPIParams.ChannelPosition> list) {
|
|
m.checkNotNullParameter(list, "body");
|
|
return this._api.reorderChannels(j, list);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("report")
|
|
public Observable<Unit> report(@h0.f0.a RestAPIParams.Report report) {
|
|
m.checkNotNullParameter(report, "body");
|
|
return this._api.report(report);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("report")
|
|
public Observable<List<ReportReason>> report(@t("channel_id") Long l, @t("guild_id") Long l2, @t("message_id") Long l3, @t("user_id") Long l4) {
|
|
return this._api.report(l, l2, l3, l4);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/harvest")
|
|
public Observable<Harvest> requestHarvest() {
|
|
return this._api.requestHarvest();
|
|
}
|
|
|
|
public final Observable<Void> requestToSpeak(Channel channel, Clock clock) {
|
|
m.checkNotNullParameter(channel, "channel");
|
|
m.checkNotNullParameter(clock, "clock");
|
|
return this._api.updateMyVoiceStates(channel.f(), new RestAPIParams.ChannelVoiceStateUpdate(channel.h(), null, new UtcDateTime(clock.currentTimeMillis()), 2, null));
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("entitlements/gift-codes/{code}")
|
|
public Observable<ModelGift> resolveGiftCode(@s("code") String str, @t("with_application") boolean z2, @t("with_subscription_plan") boolean z3) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_CODE);
|
|
return this._api.resolveGiftCode(str, z2, z3);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/@me/entitlements/gift-codes")
|
|
public Observable<List<ModelGift>> resolveSkuIdGift(@t("sku_id") long j, @t("subscription_plan_id") Long l) {
|
|
return this._api.resolveSkuIdGift(j, l);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("users/@me/entitlements/gift-codes/{code}")
|
|
public Observable<Void> revokeGiftCode(@s("code") String str) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_CODE);
|
|
return this._api.revokeGiftCode(str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("invites/{inviteCode}")
|
|
public Observable<ModelInvite> revokeInvite(@s("inviteCode") String str) {
|
|
m.checkNotNullParameter(str, "inviteCode");
|
|
return this._api.revokeInvite(str);
|
|
}
|
|
|
|
public final Observable<Void> ring(long j, long j2, List<Long> list) {
|
|
return ObservableExtensionsKt.restSubscribeOn$default(this._api.ring(j, new RestAPIParams.Ring(list), jsonObjectOf(c0.o.to("message_id", Long.valueOf(j2)))), false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/call/ring")
|
|
public Observable<Void> ring(@s("channelId") long j, @h0.f0.a RestAPIParams.Ring ring, @i("X-Context-Properties") String str) {
|
|
m.checkNotNullParameter(ring, "body");
|
|
m.checkNotNullParameter(str, "context");
|
|
return this._api.ring(j, ring, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("science")
|
|
public Observable<Void> science(@h0.f0.a Science science) {
|
|
m.checkNotNullParameter(science, "body");
|
|
return this._api.science(science);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/messages/search")
|
|
public Observable<ModelSearchResponse> searchChannelMessages(@s("channelId") long j, @t("max_id") Long l, @t("author_id") List<String> list, @t("mentions") List<String> list2, @t("has") List<String> list3, @t("content") List<String> list4, @t("attempts") Integer num, @t("include_nsfw") Boolean bool) {
|
|
return this._api.searchChannelMessages(j, l, list, list2, list3, list4, num, bool);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("guilds/{guildId}/messages/search")
|
|
public Observable<ModelSearchResponse> searchGuildMessages(@s("guildId") long j, @t("max_id") Long l, @t("author_id") List<String> list, @t("mentions") List<String> list2, @t("channel_id") List<String> list3, @t("has") List<String> list4, @t("content") List<String> list5, @t("attempts") Integer num, @t("include_nsfw") Boolean bool) {
|
|
return this._api.searchGuildMessages(j, l, list, list2, list3, list4, list5, num, bool);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("channels/{channelId}/directory-entries/search")
|
|
public Observable<List<DirectoryEntry>> searchServers(@s("channelId") long j, @t("query") String str) {
|
|
m.checkNotNullParameter(str, "query");
|
|
return this._api.searchServers(j, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("interactions")
|
|
public Observable<Void> sendApplicationCommand(@h0.f0.a RestAPIParams.ApplicationCommand applicationCommand) {
|
|
m.checkNotNullParameter(applicationCommand, "body");
|
|
return this._api.sendApplicationCommand(applicationCommand);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@l
|
|
@o("private/bug-reports")
|
|
public Observable<Unit> sendBugReport(@q("name") String str, @q("description") String str2, @q("priority") int i, @q("asana_inbox_id") Long l, @q MultipartBody.Part part) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_NAME);
|
|
return this._api.sendBugReport(str, str2, i, l, part);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("interactions")
|
|
public Observable<Void> sendComponentInteraction(@h0.f0.a RestAPIParams.ComponentInteraction componentInteraction) {
|
|
m.checkNotNullParameter(componentInteraction, "body");
|
|
return this._api.sendComponentInteraction(componentInteraction);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/greet")
|
|
public Observable<Message> sendGreetMessage(@s("channelId") long j, @h0.f0.a RestAPIParams.GreetMessage greetMessage) {
|
|
m.checkNotNullParameter(greetMessage, "body");
|
|
return this._api.sendGreetMessage(j, greetMessage);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@l
|
|
@o("channels/{channelId}/messages")
|
|
public Observable<Message> sendMessage(@s("channelId") long j, @q("payload_json") PayloadJSON<RestAPIParams.Message> payloadJSON, @q MultipartBody.Part[] partArr) {
|
|
m.checkNotNullParameter(payloadJSON, "payloadJson");
|
|
m.checkNotNullParameter(partArr, ChatInputComponentTypes.FILES);
|
|
return this._api.sendMessage(j, payloadJSON, partArr);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/messages")
|
|
public Observable<Message> sendMessage(@s("channelId") long j, @h0.f0.a RestAPIParams.Message message) {
|
|
m.checkNotNullParameter(message, "message");
|
|
return this._api.sendMessage(j, message);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/relationships")
|
|
public Observable<Void> sendRelationshipRequest(@h0.f0.a RestAPIParams.UserRelationship.Add add, @i("X-Context-Properties") String str) {
|
|
m.checkNotNullParameter(add, "relationship");
|
|
m.checkNotNullParameter(str, "context");
|
|
return this._api.sendRelationshipRequest(add, str);
|
|
}
|
|
|
|
public final Observable<Void> sendRelationshipRequest(String str, String str2, int i) {
|
|
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_LOCATION);
|
|
m.checkNotNullParameter(str2, "username");
|
|
return ObservableExtensionsKt.restSubscribeOn$default(this._api.sendRelationshipRequest(new RestAPIParams.UserRelationship.Add(str2, i), jsonObjectOf(c0.o.to(ModelAuditLogEntry.CHANGE_KEY_LOCATION, str))), false, 1, null);
|
|
}
|
|
|
|
public final Observable<Void> setConsent(boolean z2, String str) {
|
|
m.checkNotNullParameter(str, "consentType");
|
|
return z2 ? setConsent$default(this, str, null, 2, null) : setConsent$default(this, null, str, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/consent")
|
|
public Observable<Void> setConsents(@h0.f0.a RestAPIParams.Consents consents) {
|
|
m.checkNotNullParameter(consents, "body");
|
|
return this._api.setConsents(consents);
|
|
}
|
|
|
|
public final Observable<Void> setMeSuppressed(Channel channel, boolean z2) {
|
|
m.checkNotNullParameter(channel, "channel");
|
|
return this._api.updateMyVoiceStates(channel.f(), new RestAPIParams.ChannelVoiceStateUpdate(channel.h(), Boolean.valueOf(z2), null, 4, null));
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/mfa")
|
|
public Observable<Void> setMfaLevel(@s("guildId") long j, @h0.f0.a RestAPIParams.GuildMFA guildMFA) {
|
|
m.checkNotNullParameter(guildMFA, "body");
|
|
return this._api.setMfaLevel(j, guildMFA);
|
|
}
|
|
|
|
public final Observable<Void> setUserSuppressed(Channel channel, long j, boolean z2) {
|
|
m.checkNotNullParameter(channel, "channel");
|
|
return this._api.updateUserVoiceStates(channel.f(), j, new RestAPIParams.ChannelVoiceStateUpdate(channel.h(), Boolean.valueOf(z2), null, 4, null));
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/typing")
|
|
public Observable<ModelTypingResponse> setUserTyping(@s("channelId") long j, @h0.f0.a RestAPIParams.EmptyBody emptyBody) {
|
|
m.checkNotNullParameter(emptyBody, "body");
|
|
return this._api.setUserTyping(j, emptyBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("stage-instances")
|
|
public Observable<StageInstance> startStageInstance(@h0.f0.a RestAPIParams.StartStageInstanceBody startStageInstanceBody) {
|
|
m.checkNotNullParameter(startStageInstanceBody, "body");
|
|
return this._api.startStageInstance(startStageInstanceBody);
|
|
}
|
|
|
|
public final Observable<Void> stopRinging(long j, long j2, List<Long> list) {
|
|
return ObservableExtensionsKt.restSubscribeOn$default(this._api.stopRinging(j, new RestAPIParams.Ring(list), jsonObjectOf(c0.o.to("message_id", Long.valueOf(j2)))), false, 1, null);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("channels/{channelId}/call/stop-ringing")
|
|
public Observable<Void> stopRinging(@s("channelId") long j, @h0.f0.a RestAPIParams.Ring ring, @i("X-Context-Properties") String str) {
|
|
m.checkNotNullParameter(ring, "body");
|
|
m.checkNotNullParameter(str, "context");
|
|
return this._api.stopRinging(j, ring, str);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("connections/{connection}/callback")
|
|
public Observable<Void> submitConnectionState(@s("connection") String str, @h0.f0.a RestAPIParams.ConnectionState connectionState) {
|
|
m.checkNotNullParameter(str, "connection");
|
|
m.checkNotNullParameter(connectionState, "state");
|
|
return this._api.submitConnectionState(str, connectionState);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("reporting/{reportType}")
|
|
public Observable<Unit> submitReport(@s("reportType") String str, @h0.f0.a ReportSubmissionBody reportSubmissionBody) {
|
|
m.checkNotNullParameter(str, "reportType");
|
|
m.checkNotNullParameter(reportSubmissionBody, "body");
|
|
return this._api.submitReport(str, reportSubmissionBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("guilds/{guildId}/premium/subscriptions")
|
|
public Observable<List<ModelPremiumGuildSubscription>> subscribeToGuild(@s("guildId") long j, @h0.f0.a RestAPIParams.PremiumGuildSubscribe premiumGuildSubscribe) {
|
|
m.checkNotNullParameter(premiumGuildSubscribe, "premiumGuildSubscribe");
|
|
return this._api.subscribeToGuild(j, premiumGuildSubscribe);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/{guildId}/integrations/{integrationId}/sync")
|
|
public Observable<Void> syncIntegration(@s("guildId") long j, @s("integrationId") long j2) {
|
|
return this._api.syncIntegration(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}")
|
|
public Observable<Void> transferGuildOwnership(@s("guildId") long j, @h0.f0.a RestAPIParams.TransferGuildOwnership transferGuildOwnership) {
|
|
m.checkNotNullParameter(transferGuildOwnership, "transferGuildOwnership");
|
|
return this._api.transferGuildOwnership(j, transferGuildOwnership);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("guilds/{guildId}/bans/{userId}")
|
|
public Observable<Void> unbanUser(@s("guildId") long j, @s("userId") long j2) {
|
|
return this._api.unbanUser(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/guilds/premium/subscription-slots/{subscriptionSlotId}/uncancel")
|
|
public Observable<ModelPremiumGuildSubscriptionSlot> uncancelSubscriptionSlot(@s("subscriptionSlotId") long j) {
|
|
return this._api.uncancelSubscriptionSlot(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@b("guilds/{guildId}/premium/subscriptions/{subscriptionId}")
|
|
public Observable<Void> unsubscribeToGuild(@s("guildId") long j, @s("subscriptionId") long j2) {
|
|
return this._api.unsubscribeToGuild(j, j2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me/connections/{connection}/{connectionId}")
|
|
public Observable<Response<ModelConnectedAccount>> updateConnection(@s("connection") String str, @s("connectionId") String str2, @h0.f0.a RestAPIParams.ConnectedAccount connectedAccount) {
|
|
m.checkNotNullParameter(str, "connection");
|
|
m.checkNotNullParameter(str2, "connectionId");
|
|
m.checkNotNullParameter(connectedAccount, "connectedAccount");
|
|
return this._api.updateConnection(str, str2, connectedAccount);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me/connections/{connection}/{connectionId}")
|
|
public Observable<Response<ModelConnectedAccount>> updateConnectionName(@s("connection") String str, @s("connectionId") String str2, @h0.f0.a RestAPIParams.ConnectedAccountNameOnly connectedAccountNameOnly) {
|
|
m.checkNotNullParameter(str, "connection");
|
|
m.checkNotNullParameter(str2, "connectionId");
|
|
m.checkNotNullParameter(connectedAccountNameOnly, "connectedAccountName");
|
|
return this._api.updateConnectionName(str, str2, connectedAccountNameOnly);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}")
|
|
public Observable<Guild> updateGuild(@s("guildId") long j, @h0.f0.a RestAPIParams.UpdateGuild updateGuild) {
|
|
m.checkNotNullParameter(updateGuild, "body");
|
|
return this._api.updateGuild(j, updateGuild);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/integrations/{integrationId}")
|
|
public Observable<Void> updateGuildIntegration(@s("guildId") long j, @s("integrationId") long j2, @h0.f0.a RestAPIParams.GuildIntegration guildIntegration) {
|
|
m.checkNotNullParameter(guildIntegration, "body");
|
|
return this._api.updateGuildIntegration(j, j2, guildIntegration);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/role-subscriptions/group-listings/{groupListingId}")
|
|
public Observable<GuildRoleSubscriptionGroupListing> updateGuildRoleSubscriptionGroupListing(@s("guildId") long j, @s("groupListingId") long j2, @h0.f0.a RestAPIParams.UpdateGuildRoleSubscriptionGroupListing updateGuildRoleSubscriptionGroupListing) {
|
|
m.checkNotNullParameter(updateGuildRoleSubscriptionGroupListing, "body");
|
|
return this._api.updateGuildRoleSubscriptionGroupListing(j, j2, updateGuildRoleSubscriptionGroupListing);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("/guilds/{guildId}/role-subscriptions/group-listings/{groupListingId}/subscription-listings/{listingId}")
|
|
public Observable<GuildRoleSubscriptionTierListing> updateGuildRoleSubscriptionTierListing(@s("guildId") long j, @s("groupListingId") long j2, @s("listingId") long j3, @h0.f0.a RestAPIParams.UpdateGuildRoleSubscriptionTierListing updateGuildRoleSubscriptionTierListing) {
|
|
m.checkNotNullParameter(updateGuildRoleSubscriptionTierListing, "body");
|
|
return this._api.updateGuildRoleSubscriptionTierListing(j, j2, j3, updateGuildRoleSubscriptionTierListing);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guild-events/{eventId}")
|
|
public Observable<Unit> updateGuildScheduledEvent(@s("eventId") long j, @h0.f0.a RestAPIParams.UpdateGuildScheduledEventBody updateGuildScheduledEventBody) {
|
|
m.checkNotNullParameter(updateGuildScheduledEventBody, "body");
|
|
return this._api.updateGuildScheduledEvent(j, updateGuildScheduledEventBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/members/@me")
|
|
public Observable<Void> updateMeGuildMember(@s("guildId") long j, @h0.f0.a PatchGuildMemberBody patchGuildMemberBody) {
|
|
m.checkNotNullParameter(patchGuildMemberBody, "body");
|
|
return this._api.updateMeGuildMember(j, patchGuildMemberBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/voice-states/@me")
|
|
public Observable<Void> updateMyVoiceStates(@s("guildId") long j, @h0.f0.a RestAPIParams.ChannelVoiceStateUpdate channelVoiceStateUpdate) {
|
|
m.checkNotNullParameter(channelVoiceStateUpdate, "body");
|
|
return this._api.updateMyVoiceStates(j, channelVoiceStateUpdate);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me/billing/payment-sources/{paymentSourceId}")
|
|
public Observable<Void> updatePaymentSource(@s("paymentSourceId") String str, @h0.f0.a PatchPaymentSourceRaw patchPaymentSourceRaw) {
|
|
m.checkNotNullParameter(str, "paymentSourceId");
|
|
m.checkNotNullParameter(patchPaymentSourceRaw, "PatchPaymentSourceRaw");
|
|
return this._api.updatePaymentSource(str, patchPaymentSourceRaw);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("channels/{channelId}/permissions/{targetId}")
|
|
public Observable<Void> updatePermissionOverwrites(@s("channelId") long j, @s("targetId") long j2, @h0.f0.a RestAPIParams.ChannelPermissionOverwrites channelPermissionOverwrites) {
|
|
m.checkNotNullParameter(channelPermissionOverwrites, "body");
|
|
return this._api.updatePermissionOverwrites(j, j2, channelPermissionOverwrites);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me/guilds/@me/settings")
|
|
public Observable<ModelNotificationSettings> updatePrivateChannelSettings(@h0.f0.a RestAPIParams.UserGuildSettings userGuildSettings) {
|
|
m.checkNotNullParameter(userGuildSettings, "userGuildSettings");
|
|
return this._api.updatePrivateChannelSettings(userGuildSettings);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/roles/{roleId}")
|
|
public Observable<Void> updateRole(@s("guildId") long j, @s("roleId") long j2, @h0.f0.a RestAPIParams.Role role) {
|
|
m.checkNotNullParameter(role, "body");
|
|
return this._api.updateRole(j, j2, role);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("stage-instances/{channelId}")
|
|
public Observable<StageInstance> updateStageInstance(@s("channelId") long j, @h0.f0.a RestAPIParams.UpdateStageInstanceBody updateStageInstanceBody) {
|
|
m.checkNotNullParameter(updateStageInstanceBody, "body");
|
|
return this._api.updateStageInstance(j, updateStageInstanceBody);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me/billing/subscriptions/{subscriptionId}")
|
|
public Observable<Void> updateSubscription(@s("subscriptionId") String str, @h0.f0.a RestAPIParams.UpdateSubscription updateSubscription) {
|
|
m.checkNotNullParameter(str, "subscriptionId");
|
|
m.checkNotNullParameter(updateSubscription, "updateSubscription");
|
|
return this._api.updateSubscription(str, updateSubscription);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("channels/{channelId}/thread-members/@me/settings")
|
|
public Observable<ThreadMember> updateThreadMemberSettings(@s("channelId") long j, @h0.f0.a RestAPIParams.ThreadMemberSettings threadMemberSettings) {
|
|
m.checkNotNullParameter(threadMemberSettings, "body");
|
|
return this._api.updateThreadMemberSettings(j, threadMemberSettings);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
public Observable<ModelNotificationSettings> updateUserGuildSettings(long j, RestAPIParams.UserGuildSettings userGuildSettings) {
|
|
m.checkNotNullParameter(userGuildSettings, "userGuildSettings");
|
|
return j == 0 ? this._api.updatePrivateChannelSettings(userGuildSettings) : this._api.updateUserGuildSettings(j, userGuildSettings);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("users/@me/notes/{userId}")
|
|
public Observable<Void> updateUserNotes(@s("userId") long j, @h0.f0.a RestAPIParams.UserNoteUpdate userNoteUpdate) {
|
|
m.checkNotNullParameter(userNoteUpdate, "userNoteUpdate");
|
|
return this._api.updateUserNotes(j, userNoteUpdate);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me/settings")
|
|
public Observable<ModelUserSettings> updateUserSettings(@h0.f0.a RestAPIParams.UserSettings userSettings) {
|
|
m.checkNotNullParameter(userSettings, "userSettings");
|
|
return this._api.updateUserSettings(userSettings);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me/settings")
|
|
public Observable<ModelUserSettings> updateUserSettingsCustomStatus(@h0.f0.a RestAPIParams.UserSettingsCustomStatus userSettingsCustomStatus) {
|
|
m.checkNotNullParameter(userSettingsCustomStatus, "userSettingsCustomStatus");
|
|
return this._api.updateUserSettingsCustomStatus(userSettingsCustomStatus);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/voice-states/{userId}")
|
|
public Observable<Void> updateUserVoiceStates(@s("guildId") long j, @s("userId") long j2, @h0.f0.a RestAPIParams.ChannelVoiceStateUpdate channelVoiceStateUpdate) {
|
|
m.checkNotNullParameter(channelVoiceStateUpdate, "body");
|
|
return this._api.updateUserVoiceStates(j, j2, channelVoiceStateUpdate);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("guilds/{guildId}/vanity-url")
|
|
public Observable<VanityUrlResponse> updateVanityUrl(@s("guildId") long j, @h0.f0.a RestAPIParams.VanityUrl vanityUrl) {
|
|
m.checkNotNullParameter(vanityUrl, "body");
|
|
return this._api.updateVanityUrl(j, vanityUrl);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@p("users/@me/connections/contacts/@me/external-friend-list-entries")
|
|
public Observable<Response<BulkFriendSuggestions>> uploadContacts(@h0.f0.a RestAPIParams.UploadContacts uploadContacts) {
|
|
m.checkNotNullParameter(uploadContacts, "uploadContacts");
|
|
return this._api.uploadContacts(uploadContacts);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("debug-logs/4/{filename}")
|
|
public Observable<Void> uploadLog(@s("filename") String str, @h0.f0.a String str2) {
|
|
m.checkNotNullParameter(str, "filename");
|
|
m.checkNotNullParameter(str2, "content");
|
|
return this._api.uploadLog(str, str2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@l
|
|
@o("debug-logs/multi/4")
|
|
public Observable<Void> uploadLogs(@q MultipartBody.Part[] partArr) {
|
|
m.checkNotNullParameter(partArr, ChatInputComponentTypes.FILES);
|
|
return this._api.uploadLogs(partArr);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/{userId}/sessions/{sessionId}/activities/{applicationId}/{actionType}")
|
|
public Observable<ActivityActionConfirmation> userActivityAction(@s("userId") long j, @s("applicationId") long j2, @s("sessionId") String str, @s("actionType") Integer num, @t("channel_id") Long l, @t("message_id") Long l2) {
|
|
m.checkNotNullParameter(str, "sessionId");
|
|
return this._api.userActivityAction(j, j2, str, num, l, l2);
|
|
}
|
|
|
|
public final Observable<ActivityActionConfirmation> userActivityActionJoin(long j, long j2, String str) {
|
|
return userActivityActionJoin$default(this, j, j2, str, null, null, 24, null);
|
|
}
|
|
|
|
public final Observable<ActivityActionConfirmation> userActivityActionJoin(long j, long j2, String str, Long l) {
|
|
return userActivityActionJoin$default(this, j, j2, str, l, null, 16, null);
|
|
}
|
|
|
|
public final Observable<ActivityActionConfirmation> userActivityActionJoin(long j, long j2, String str, Long l, Long l2) {
|
|
m.checkNotNullParameter(str, "sessionId");
|
|
return this._api.userActivityAction(j, j2, str, Integer.valueOf(MessageActivityType.JOIN.getApiInt()), l, l2);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/phone")
|
|
public Observable<Void> userAddPhone(@h0.f0.a RestAPIParams.Phone phone) {
|
|
m.checkNotNullParameter(phone, "body");
|
|
return this._api.userAddPhone(phone);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/phone/verify")
|
|
public Observable<Void> userAddPhoneNoPassword(@h0.f0.a RestAPIParams.VerificationCodeOnly verificationCodeOnly) {
|
|
m.checkNotNullParameter(verificationCodeOnly, "body");
|
|
return this._api.userAddPhoneNoPassword(verificationCodeOnly);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h0.f0.n("users/@me/agreements")
|
|
public Observable<Void> userAgreements(@h0.f0.a RestAPIParams.UserAgreements userAgreements) {
|
|
m.checkNotNullParameter(userAgreements, "body");
|
|
return this._api.userAgreements(userAgreements);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/captcha/verify")
|
|
public Observable<Void> userCaptchaVerify(@h0.f0.a RestAPIParams.CaptchaCode captchaCode) {
|
|
m.checkNotNullParameter(captchaCode, "body");
|
|
return this._api.userCaptchaVerify(captchaCode);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/channels")
|
|
public Observable<Channel> userCreateChannel(@h0.f0.a RestAPIParams.CreateChannel createChannel) {
|
|
m.checkNotNullParameter(createChannel, "body");
|
|
return this._api.userCreateChannel(createChannel);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/devices")
|
|
public Observable<Void> userCreateDevice(@h0.f0.a RestAPIParams.UserDevices userDevices) {
|
|
m.checkNotNullParameter(userDevices, "body");
|
|
return this._api.userCreateDevice(userDevices);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/{userId}")
|
|
public Observable<com.discord.api.user.User> userGet(@s("userId") long j) {
|
|
return this._api.userGet(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@h(hasBody = GoogleSmartLockManager.SET_DISCORD_ACCOUNT_DETAILS, method = "DELETE", path = "users/@me/phone")
|
|
public Observable<Void> userPhoneDelete(@h0.f0.a RestAPIParams.DeletePhone deletePhone) {
|
|
m.checkNotNullParameter(deletePhone, "body");
|
|
return this._api.userPhoneDelete(deletePhone);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("users/@me/phone")
|
|
public Observable<Void> userPhoneWithToken(@h0.f0.a RestAPIParams.VerificationPhoneCode verificationPhoneCode) {
|
|
m.checkNotNullParameter(verificationPhoneCode, "body");
|
|
return this._api.userPhoneWithToken(verificationPhoneCode);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@f("users/{userId}/profile")
|
|
public Observable<ModelUserProfile> userProfileGet(@s("userId") long j) {
|
|
return this._api.userProfileGet(j);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/automations/email-domain-lookup")
|
|
public Observable<Response<EmailVerification>> verifyEmail(@h0.f0.a RestAPIParams.VerifyEmail verifyEmail) {
|
|
m.checkNotNullParameter(verifyEmail, "body");
|
|
return this._api.verifyEmail(verifyEmail);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("guilds/automations/email-domain-lookup/verify-code")
|
|
public Observable<Response<EmailVerificationCode>> verifyEmailCode(@h0.f0.a RestAPIParams.VerifyEmailCode verifyEmailCode) {
|
|
m.checkNotNullParameter(verifyEmailCode, "body");
|
|
return this._api.verifyEmailCode(verifyEmailCode);
|
|
}
|
|
|
|
@Override // com.discord.restapi.RestAPIInterface
|
|
@o("google-play/verify-purchase-token")
|
|
public Observable<RestAPIParams.VerifyPurchaseResponse> verifyPurchaseToken(@h0.f0.a RestAPIParams.VerifyPurchaseTokenBody verifyPurchaseTokenBody) {
|
|
m.checkNotNullParameter(verifyPurchaseTokenBody, "verifyPurchaseBody");
|
|
return this._api.verifyPurchaseToken(verifyPurchaseTokenBody);
|
|
}
|
|
}
|