Skip to content

Instantly share code, notes, and snippets.

@Amrsatrio
Last active November 10, 2024 23:12
Show Gist options
  • Save Amrsatrio/20d2174583354ae4f0a24cf63764049f to your computer and use it in GitHub Desktop.
Save Amrsatrio/20d2174583354ae4f0a24cf63764049f to your computer and use it in GitHub Desktop.
some epic/fortnite endpoints
package com.tb24.fn.network;
import com.google.gson.JsonObject;
import com.tb24.fn.model.account.*;
import retrofit2.Call;
import retrofit2.http.*;
import java.util.List;
import java.util.Map;
public interface AccountService {
String BASE_URL_PROD = "https://account-public-service-prod.ol.epicgames.com/account/";
String BASE_URL_PROD_ALT = "https://account-public-service-prod.ak.epicgames.com/account/";
String BASE_URL_STAGE = "https://account-public-service-stage.ol.epicgames.com/account/";
@GET("api/oauth/verify")
Call<VerifyResponse> verify(@Query("includePerms") Boolean includePerms);
/**
* <pre>
* grant_type fields
* ------------------------------------------------------------
* authorization_code code
* client_credentials -
* device_auth account_id, device_id, secret
* device_code device_code
* exchange_code exchange_code
* external_auth external_auth_type, external_auth_token
* otp otp, challenge
* password username, password
* refresh_token refresh_token
* token_to_token access_token
* </pre>
*/
@POST("api/oauth/token")
@FormUrlEncoded
Call<Token> getAccessToken(@Header("Authorization") String auth, @Field("grant_type") String grantType, @FieldMap Map<String, String> fields, @Field("includePerms") Boolean includePerms);
@GET("api/oauth/exchange")
Call<ExchangeResponse> getExchangeCode();
/**
* @param killType OTHERS, ALL_ACCOUNT_CLIENT, OTHERS_ACCOUNT_CLIENT, OTHERS_ACCOUNT_CLIENT_SERVICE
*/
@DELETE("api/oauth/sessions/kill")
Call<Void> killSessions(@Query("killType") String killType);
@DELETE("api/oauth/sessions/kill/{accessToken}")
Call<Void> killSession(@Path("accessToken") String accessToken);
@POST("api/oauth/deviceAuthorization")
@FormUrlEncoded
Call<PinGrantInfo> initiatePinAuth(@Field("prompt") String prompt);
@DELETE("api/oauth/deviceAuthorization/{userCode}")
Call<Void> cancelPinAuth(@Path("userCode") String userCode);
@POST("api/public/account")
Call<AccountMutationResponse> createAccount(@Query("authenticate") Boolean authenticate, @Query("tokenType") String tokenType, @Query("sendEmail") Boolean sendEmail, @Body AccountMutationPayload payload);
@GET("api/public/account")
Call<GameProfile[]> findAccountsByIds(@Query("accountId") List<String> accountIds);
@GET("api/public/account/{accountId}")
Call<XGameProfile> getById(@Path("accountId") String accountId);
@PUT("api/public/account/{accountId}")
Call<AccountMutationResponse> editAccountDetails(@Path("accountId") String accountId, @Body AccountMutationPayload payload);
@GET("api/accounts/{accountId}/metadata")
Call<JsonObject> getAccountMetadata(@Path("accountId") String accountId);
@GET("api/public/account/{accountId}/deviceAuth")
Call<DeviceAuth[]> getDeviceAuths(@Path("accountId") String accountId);
@GET("api/public/account/{accountId}/deviceAuth/{deviceId}")
Call<DeviceAuth> getDeviceAuth(@Path("accountId") String accountId, @Path("deviceId") String deviceId);
@POST("api/public/account/{accountId}/deviceAuth")
Call<DeviceAuth> createDeviceAuth(@Path("accountId") String accountId, @Header("X-Epic-Device-Info") String deviceInfo);
@DELETE("api/public/account/{accountId}/deviceAuth/{deviceId}")
Call<Void> deleteDeviceAuth(@Path("accountId") String accountId, @Path("deviceId") String deviceId);
@GET("api/public/account/{accountId}/externalAuths")
Call<ExternalAuth[]> getExternalAuths(@Path("accountId") String accountId);
@GET("api/public/account/{accountId}/externalAuths/{type}")
Call<ExternalAuth> getExternalAuth(@Path("accountId") String accountId, @Path("type") String type);
@POST("api/public/account/{accountId}/externalAuths")
Call<ExternalAuth> createExternalAuth(@Path("accountId") String accountId, @Body AddExternalAuthPayload payload);
@DELETE("api/public/account/{accountId}/externalAuths/{type}")
Call<Void> removeExternalAuth(@Path("accountId") String accountId, @Path("type") String type);
@GET("api/public/account/displayName/{displayName}")
Call<GameProfile> getByDisplayName(@Path("displayName") String displayName);
@GET("api/public/account/email/{email}")
Call<GameProfile> getByEmail(@Path("email") String email);
@POST("api/public/account/lookup/externalId")
Call<Map<String, ExternalAuth>> getExternalIdMappingsById(@Body QueryExternalIdMappingsByIdPayload payload);
@GET("api/public/account/lookup/externalAuth/{externalAuthType}/displayName/{displayName}")
Call<GameProfile[]> getExternalIdMappingsByDisplayName(@Path("externalAuthType") EExternalAuthType externalAuthType, @Path("displayName") String displayName, @Query("caseInsensitive") Boolean caseInsensitive);
@GET("api/epicdomains/ssodomains")
Call<String[]> querySSODomains();
}
package com.tb24.fn.network;
import com.tb24.fn.model.Paged;
import com.tb24.fn.model.catalog.Currency;
import com.tb24.fn.model.catalog.StoreItem;
import com.tb24.fn.model.catalog.StoreOffer;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
import java.util.List;
import java.util.Map;
public interface CatalogService {
String BASE_URL_PROD = "https://catalog-public-service-prod06.ol.epicgames.com/catalog/";
String BASE_URL_PROD_ALT = "https://catalog-public-service-prod06.ak.epicgames.com/catalog/";
String BASE_URL_STAGE = "https://catalogv2-public-service-stage.ol.epicgames.com/catalog/";
@GET("api/shared/currencies")
Call<Paged<Currency>> queryCurrencies(@Query("start") Integer start, @Query("count") Integer count);
@GET("api/shared/namespace/{namespace}/items")
Call<Paged<StoreItem>> queryItems(@Path("namespace") String namespace, @Query("includeDLCDetails") Boolean includeDLCDetails, @Query("includeMainGameDetails") Boolean includeMainGameDetails, @Query("status") String status, @Query("sortBy") String sortBy, @Query("country") String country, @Query("locale") String locale, @Query("start") Integer start, @Query("count") Integer count);
@GET("api/shared/namespace/{namespace}/offers")
Call<Paged<StoreOffer>> queryOffers(@Path("namespace") String namespace, @Query("status") String status, /* Maybe */ @Query("country") String country, @Query("locale") String locale, @Query("start") Integer start, @Query("count") Integer count, @Query("returnItemDetails") Boolean returnItemDetails);
@GET("api/shared/bulk/items")
Call<Map<String, StoreItem>> queryItemsBulk(@Query("id") List<String> ids, @Query("includeDLCDetails") Boolean includeDLCDetails, @Query("includeMainGameDetails") Boolean includeMainGameDetails, @Query("country") String country, @Query("locale") String locale);
// Used in Fortnite
@GET("api/shared/bulk/offers")
Call<Map<String, StoreOffer>> queryOffersBulk(@Query("id") List<String> ids, @Query("returnItemDetails") Boolean returnItemDetails, @Query("country") String country, @Query("locale") String locale);
@GET("api/shared/namespace/{namespace}/bulk/items")
Call<Map<String, StoreItem>> queryItemsBulkNamespace(@Path("namespace") String namespace, @Query("id") List<String> ids, @Query("includeDLCDetails") Boolean includeDLCDetails, @Query("includeMainGameDetails") Boolean includeMainGameDetails, @Query("country") String country, @Query("locale") String locale);
@GET("api/shared/namespace/{namespace}/bulk/offers")
Call<Map<String, StoreOffer>> queryOffersBulkNamespace(@Path("namespace") String namespace, @Query("id") List<String> ids, @Query("returnItemDetails") Boolean returnItemDetails, @Query("country") String country, @Query("locale") String locale);
}
package com.tb24.fn.network;
import com.google.gson.JsonElement;
import com.tb24.fn.model.EpicGraphQLTypes;
import com.tb24.fn.model.UserSetting;
import java.util.List;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface ChannelsService {
String BASE_URL_PROD = "https://channels-public-service-prod.ol.epicgames.com/";
String BASE_URL_STAGE = "https://channels-public-service-stage.ol.epicgames.com/";
@GET("api/v1/user/{accountId}?type=all")
Call<EpicGraphQLTypes.ChannelSummary> QueryChannelList(@Path("accountId") String accountId);
@POST("api/v1/channel")
Call<JsonElement> CreateChannel(@Body EpicGraphQLTypes.CreateChannelRequest payload);
@DELETE("api/v1/channel/{channelId}/members/{accountId}")
Call<Void> LeaveChannel(@Path("channelId") String channelId, @Path("accountId") String accountId);
@GET("api/v1/channel/{channelId}")
Call<EpicGraphQLTypes.Channel> QueryChannelDetails(@Path("channelId") String channelId);
// returns 204 by any means
@POST("api/v1/channel/{channelId}")
Call<JsonElement> UNKNOWN(@Path("channelId") String channelId);
@GET("api/v1/channel/{channelId}/members")
Call<JsonElement> AddToChannel(@Path("channelId") String channelId);
@GET("api/v1/channel/{channelId}/messages")
Call<EpicGraphQLTypes.MessagesResult> QueryChannelMessages(@Path("channelId") String channelId);
@POST("api/v1/channel/{channelId}/messages")
Call<EpicGraphQLTypes.MesssageCreateResult> SendMessageToChannel(@Path("channelId") String channelId, @Body EpicGraphQLTypes.CreateMessageRequest payload);
@GET("api/v1/channel/{channelId}/messages/{messageId}")
Call<EpicGraphQLTypes.MessageResult> QuerySingleChannelMessage(@Path("channelId") String channelId, @Path("messageId") String messageId);
@DELETE("api/v1/channel/{channelId}/messages/{messageId}")
Call<Void> DeleteMessageFromChannel(@Path("channelId") String channelId, @Path("messageId") String messageId);
@GET("api/v1/dm/{accountId}/{peerUserId}/messages")
Call<JsonElement> QueryDirectMessages(@Path("accountId") String accountId, @Path("peerUserId") String peerUserId);
@POST("api/v1/dm/{accountId}/{peerUserId}/messages")
Call<JsonElement> SendDirectMessage(@Path("accountId") String accountId, @Path("peerUserId") String peerUserId);
@GET("api/v1/dm/{accountId}/{peerUserId}/messages/{messageId}")
Call<JsonElement> QuerySingleDirectMessage(@Path("accountId") String accountId, @Path("peerUserId") String peerUserId, @Path("messageId") String messageId);
@DELETE("api/v1/dm/{accountId}/{peerUserId}/messages/{messageId}")
Call<Void> DeleteDirectMessage(@Path("accountId") String accountId, @Path("peerUserId") String peerUserId, @Path("messageId") String messageId);
@GET("api/v1/user/{accountId}/setting/{settingKey}")
Call<UserSetting> QueryUserSetting(@Path("accountId") String accountId, @Path("settingKey") String settingKey);
/**
* @param newSetting only {@link UserSetting#value} is required and read by the server.
*/
@PUT("api/v1/user/{accountId}/setting/{settingKey}")
Call<Void> UpdateUserSetting(@Path("accountId") String accountId, @Path("settingKey") String settingKey, @Body UserSetting newSetting);
@GET("api/v1/user/{accountId}/setting/{settingKey}/available")
Call<String[]> QueryAvailableUserSettingValues(@Path("accountId") String accountId, @Path("settingKey") String settingKey);
@GET("api/v1/user/setting/{settingKey}")
Call<UserSetting[]> QueryMultiUserSingleSetting(@Query("accountId") List<String> accountIds, @Path("settingKey") String settingKey);
@POST("api/v1/user/setting/{settingKey}")
@FormUrlEncoded
Call<UserSetting[]> QueryMultiUserSingleSetting_Field(@Field("accountId") List<String> accountIds, @Path("settingKey") String settingKey);
@GET("api/v1/user/setting")
Call<UserSetting[]> QueryMultiUserMultiSetting(@Query("accountId") List<String> accountIds, @Query("settingKey") List<String> settingKeys);
@POST("api/v1/user/setting")
@FormUrlEncoded
Call<UserSetting[]> QueryMultiUserMultiSetting_Field(@Field("accountId") List<String> accountIds, @Field("settingKey") List<String> settingKeys);
// TODO Unknown method, cannot be tested
// @POST("api/v1/user/{accountId}/notifyActive")
// Call<JsonElement> SendNotifyActive(@Path("accountId") String accountId);
}
package com.tb24.fn.network;
import com.tb24.fn.model.coderedemption.EvaluateCodeResponse;
import com.tb24.fn.model.coderedemption.LockCodeResponse;
import retrofit2.Call;
import retrofit2.http.POST;
import retrofit2.http.Path;
public interface CodeRedemptionService {
String BASE_URL_PROD = "https://coderedemption-public-service-prod.ol.epicgames.com/coderedemption/";
String BASE_URL_STAGE = "https://coderedemption-public-service-stage.ol.epicgames.com/coderedemption/";
@POST("api/shared/code/{codeId}/lock")
Call<LockCodeResponse> lockCode(@Path("codeId") String codeId);
@POST("api/shared/accounts/{accountId}/redeem/{codeId}/evaluate")
Call<EvaluateCodeResponse> evaluateCode(@Path("accountId") String accountId, @Path("codeId") String codeId);
}
package com.tb24.fn.network;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.tb24.fn.model.events.AccountCompetitiveData;
import com.tb24.fn.model.events.EventDownloadResponse;
import com.tb24.fn.model.events.LeaderboardsResponse;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface EventsService {
/** default */
String BASE_URL_LIVE = "https://events-public-service-live.ol.epicgames.com/";
String BASE_URL_LIVE_ALT = "https://events-public-service-live.ak.epicgames.com/";
String BASE_URL_LOAD_TEST = "https://events-public-service-loadtest.ol.epicgames.com/";
String BASE_URL_PROD = "https://events-public-service-prod.ol.epicgames.com/";
String BASE_URL_STAGE = "https://events-public-service-stage.ol.epicgames.com/";
/**
* @param gameId "Fortnite"
* @param accountId "00112233445566778899aabbccddeeff"
* @param regionId "ASIA"
* @param platformName "Windows"
* @param teamAccountIds "00112233445566778899aabbccddeeff"
*/
@GET("api/v1/events/{GameId}/download/{AccountId}")
Call<EventDownloadResponse> download(@Path("GameId") String gameId, @Path("AccountId") String accountId, @Query("region") String regionId, @Query("platform") String platformName, @Query("teamAccountIds") String teamAccountIds);
/**
* TODO haven't tried
*
* @param gameId "Fortnite"
* @param accountId "00112233445566778899aabbccddeeff"
* @param regionId "ASIA"
* @param bShowPastEvents ???
* @param bShowPrivateEvents ???
*/
@GET("api/v1/events/{GameId}/data/{AccountId}")
Call<JsonElement> data(@Path("GameId") String gameId, @Path("AccountId") String accountId, @Query("region") String regionId, @Query("showPastEvents") Boolean bShowPastEvents, @Query("showPrivateEvents") Boolean bShowPrivateEvents);
/**
* TODO haven't tried
*
* @param gameId "Fortnite"
* @param eventId "epicgames_OnlineOpen_Week2_ASIA"
* @param eventWindowId "OnlineOpen_Week2_ASIA_Event2"
*/
@GET("api/v1/events/{GameId}/{EventId}/{EventWindowId}/history")
Call<JsonElement> history(@Path("GameId") String gameId, @Path("EventId") String eventId, @Path("EventWindowId") String eventWindowId);
/**
* @param gameId "Fortnite"
* @param eventId "epicgames_OnlineOpen_Week2_ASIA"
* @param eventWindowId "OnlineOpen_Week2_ASIA_Event2"
* @param accountId "00112233445566778899aabbccddeeff"
* @param page 0
* @param rank 0
* @param teamAccountIds ""
* @param appId "Fortnite"
* @param bShowLiveSessions "false"
*/
@GET("api/v1/leaderboards/{GameId}/{EventId}/{EventWindowId}/{AccountId}")
Call<LeaderboardsResponse> leaderboards(@Path("GameId") String gameId, @Path("EventId") String eventId, @Path("EventWindowId") String eventWindowId, @Path("AccountId") String accountId, @Query("page") Integer page, @Query("rank") Integer rank, @Query("teamAccountIds") String teamAccountIds, @Query("appId") String appId, @Query("showLiveSessions") Boolean bShowLiveSessions);
/**
* @param gameId "Fortnite"
* @param accountId "00112233445566778899aabbccddeeff"
*/
@GET("api/v1/players/{GameId}/{AccountId}")
Call<AccountCompetitiveData> eventDataForAccount(@Path("GameId") String gameId, @Path("AccountId") String accountId);
/**
* TODO return object
*
* @param gameId "Fortnite"
* @param eventId "epicgames_OnlineOpen_Week2_ASIA"
* @param accountId "00112233445566778899aabbccddeeff"
*/
@GET("api/v1/events/{GameId}/{EventId}/history/{AccountId}")
Call<JsonElement[]> eventHistoryForAccount(@Path("GameId") String gameId, @Path("EventId") String eventId, @Path("AccountId") String accountId);
/**
* TODO haven't tried
*
* @param gameId "Fortnite"
* @param eventId "epicgames_OnlineOpen_Week2_ASIA"
* @param eventWindowId "OnlineOpen_Week2_ASIA_Event2"
* @param accountId "00112233445566778899aabbccddeeff"
*/
@GET("api/v1/events/{GameId}/{EventId}/{EventWindowId}/history/{AccountId}")
Call<JsonElement[]> eventWindowHistoryForAccount(@Path("GameId") String gameId, @Path("EventId") String eventId, @Path("EventWindowId") String eventWindowId, @Path("AccountId") String accountId);
@GET("api/v1/players/{GameId}/tokens")
Call<JsonObject> tokens(@Path("GameId") String gameId, @Query("teamAccountIds") String accountIds);
}
package com.tb24.fn.network;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.tb24.fn.model.AccountPrivacyResponse;
import com.tb24.fn.model.InventorySnapshotResponse;
import com.tb24.fn.model.MatchmakingTicketResponse;
import com.tb24.fn.model.cloudstorage.CloudStorageFile;
import com.tb24.fn.model.cloudstorage.CloudStorageUsageInfo;
import com.tb24.fn.model.gamesubcatalog.CatalogDownload;
import com.tb24.fn.model.gamesubcatalog.CatalogReceiptInfo;
import com.tb24.fn.model.links.LinkEntry;
import com.tb24.fn.model.links.LinksQueryResponse;
import com.tb24.fn.model.mcpprofile.ProfileUpdate;
import com.tb24.fn.model.scheduledevents.CalendarDownload;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.*;
import java.util.Map;
public interface FortniteService {
String BASE_URL = "https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/";
@POST("api/game/v2/profile/{id}/client/{command}")
Call<ProfileUpdate> clientCommand(@Path("command") String command, @Path("id") String accountId, @Query("profileId") String profileId, @Query("rvn") Long currentProfileRevision, @Header("X-EpicGames-ProfileRevisions") String profileRevisionsMeta, @Body Object payload);
@POST("api/game/v2/profile/{id}/public/{command}")
Call<ProfileUpdate> publicCommand(@Path("command") String command, @Path("id") String accountId, @Query("profileId") String profileId, @Query("rvn") Long currentProfileRevision, @Header("X-EpicGames-ProfileRevisions") String profileRevisionsMeta, @Body Object payload);
@GET("api/game/v2/world/info")
Call<ResponseBody> queryTheaterList(@Header("X-EpicGames-Language") String language);
@GET("api/game/v2/privacy/account/{id}")
Call<AccountPrivacyResponse> getAccountPrivacy(@Path("id") String id);
@POST("api/game/v2/privacy/account/{id}")
Call<AccountPrivacyResponse> setAccountPrivacy(@Path("id") String id, @Body AccountPrivacyResponse payload);
@GET("api/storefront/v2/catalog")
Call<CatalogDownload> storefrontCatalog(@Header("X-EpicGames-Language") String language);
@GET("api/calendar/v1/timeline")
Call<CalendarDownload> calendarTimeline();
@GET("api/cloudstorage/system")
Call<CloudStorageFile[]> enumerateTitleFiles();
@GET("api/cloudstorage/system/{filename}")
Call<ResponseBody> readTitleFile(@Path("filename") String filename);
@GET("api/cloudstorage/user/{id}")
Call<CloudStorageFile[]> enumerateUserFiles(@Path("id") String id);
@GET("api/cloudstorage/user/{id}/{filename}")
Call<ResponseBody> readUserFile(@Path("id") String id, @Path("filename") String filename);
@PUT("api/cloudstorage/user/{id}/{filename}")
Call<Void> writeUserFile(@Path("id") String id, @Path("filename") String filename, @Body RequestBody newFile);
@DELETE("api/cloudstorage/user/{id}/{filename}")
Call<Void> deleteUserFile(@Path("id") String id, @Path("filename") String filename);
@GET("api/cloudstorage/storage/{id}/info")
Call<CloudStorageUsageInfo> requestUsageInfo(@Path("id") String accountId);
@POST("api/game/v2/events/v2/processPendingRewards/{id}")
Call<String[]> processPendingRewards(@Path("id") String id);
/**
* platform PC, MOBILE, PS4, XBOX_ONE, or SWITCH
*/
@POST("api/game/v2/tryPlayOnPlatform/account/{id}")
Call<Boolean> checkPlatformPlayAllowed(@Path("id") String id, @Query("platform") String platform);
@GET("api/game/v2/enabled_features")
Call<JsonElement[]> enabledFeatures();
@POST("api/game/v2/grant_access/{id}")
Call<Void> grantAccess(@Path("id") String id);
@GET("api/storefront/v2/keychain")
Call<String[]> storefrontKeychain(@Query("numKeysDownloaded") Integer numKeysDownloaded);
@GET("api/receipts/v1/account/{id}/receipts")
Call<CatalogReceiptInfo[]> receipts(@Path("id") String id);
//@POST("api/storeaccess/v1/redeem_access/{id}")
//Call<Void> redeemAccess(@Path("id") String id); // requires payload, unknown
@POST("api/storeaccess/v1/request_access/{id}")
Call<Void> requestAccess(@Path("id") String id);
@POST("api/accesscontrol/status")
Call<JsonObject> checkAccess(); // { play: boolean, isBanned: boolean }
/**
* @param olderThan in ISO 8601 date format
*/
@GET("api/game/v2/creative/favorites/{accountId}")
Call<LinksQueryResponse> queryCreativeFavorites(@Path("accountId") String accountId, @Query("limit") Integer limit, @Query("olderThan") String olderThan);
@PUT("api/game/v2/creative/favorites/{accountId}/{mnemonic}")
Call<LinkEntry> addCodeToCreativeFavorites(@Path("accountId") String accountId, @Path("mnemonic") String mnemonic);
@DELETE("api/game/v2/creative/favorites/{accountId}/{mnemonic}")
Call<Void> removeCodeFromCreativeFavorites(@Path("accountId") String accountId, @Path("mnemonic") String mnemonic);
/**
* @param olderThan in ISO 8601 date format
*/
@GET("api/game/v2/creative/history/{accountId}")
Call<LinksQueryResponse> queryCreativeHistory(@Path("accountId") String accountId, @Query("limit") Integer limit, @Query("olderThan") String olderThan);
/**
* Requires permission fortnite:fortnite_role:dedicated_server ALL
*/
@PUT("api/game/v2/creative/history/{accountId}/{mnemonic}")
Call<LinkEntry> addCodeToCreativeHistory(@Path("accountId") String accountId, @Path("mnemonic") String mnemonic);
@DELETE("api/game/v2/creative/history/{accountId}/{mnemonic}")
Call<Void> removeCodeFromCreativeHistory(@Path("accountId") String accountId, @Path("mnemonic") String mnemonic);
@GET("api/storefront/v2/gift/check_eligibility/recipient/{recipientAccountId}/offer/{offerId}")
Call<Void> checkGiftEligibility(@Path("recipientAccountId") String recipientAccountId, @Path("offerId") String offerId);
@GET("api/game/v2/br-inventory/account/{accountId}")
Call<InventorySnapshotResponse> inventorySnapshot(@Path("accountId") String accountId);
@GET("api/game/v2/matchmakingservice/ticket/player/{accountId}")
Call<MatchmakingTicketResponse> mmsObtainTicket(@Path("accountId") String accountId, @QueryMap Map<String, String> params);
}
package com.tb24.fn.network;
import com.google.gson.JsonObject;
import com.tb24.fn.model.friends.*;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.*;
public interface FriendsService {
String BASE_URL_PROD = "https://friends-public-service-prod.ol.epicgames.com/friends/";
String BASE_URL_PROD_ALT = "https://friends-public-service-prod.ak.epicgames.com/friends/";
String BASE_URL_STAGE = "https://friends-public-service-stage.ol.epicgames.com/friends/";
@GET("api/v1/{id}/summary")
Call<FriendsSummary> queryFriendsSummary(@Path("id") String id, @Query("displayNames") Boolean displayNames);
@GET("api/v1/{id}/friends")
Call<FriendV2[]> queryFriends(@Path("id") String id, @Query("displayNames") Boolean displayNames);
@GET("api/v1/{id}/friends/{friend}")
Call<FriendV2> queryFriend(@Path("id") String id, @Path("friend") String friend, @Query("displayNames") Boolean displayNames);
@POST("api/v1/{id}/friends/{friend}")
Call<Void> sendInviteOrAcceptInvite(@Path("id") String id, @Path("friend") String friend);
@DELETE("api/v1/{id}/friends/{friend}")
Call<Void> deleteFriendOrRejectInvite(@Path("id") String id, @Path("friend") String friend);
@PUT("api/v1/{id}/friends/{friend}/alias")
Call<Void> setFriendAlias(@Path("id") String id, @Path("friend") String friend, @Body RequestBody newAlias);
@DELETE("api/v1/{id}/friends/{friend}/alias")
Call<Void> deleteFriendAlias(@Path("id") String id, @Path("friend") String friend);
@PUT("api/v1/{id}/friends/{friend}/note")
Call<Void> setFriendNote(@Path("id") String id, @Path("friend") String friend, @Body RequestBody newNote);
@DELETE("api/v1/{id}/friends/{friend}/note")
Call<Void> deleteFriendNote(@Path("id") String id, @Path("friend") String friend);
@GET("api/v1/{id}/incoming")
Call<FriendV2[]> queryIncomingFriendRequests(@Path("id") String id, @Query("displayNames") Boolean displayNames);
@GET("api/v1/{id}/outgoing")
Call<FriendV2[]> queryOutgoingFriendRequests(@Path("id") String id, @Query("displayNames") Boolean displayNames);
@GET("api/v1/{id}/blocklist")
Call<FriendV2[]> queryBlockedPlayers(@Path("id") String id, @Query("displayNames") Boolean displayNames);
@POST("api/v1/{id}/blocklist/{block}")
Call<Void> sendBlock(@Path("id") String id, @Path("block") String block);
@DELETE("api/v1/{id}/blocklist/{block}")
Call<Void> sendUnblock(@Path("id") String id, @Path("block") String block);
/**
* @param namespace ex: "fortnite"
*/
@GET("api/v1/{id}/recent/{namespace}")
Call<Friend[]> queryRecentPlayers(@Path("id") String id, @Path("namespace") String namespace);
// TODO unknown parameters, 403 for user access token
@POST("api/v1/recent/{namespace}")
Call<Void> addBulkRecentPlayers(@Path("namespace") String namespace);
@GET("api/v1/{id}/settings")
Call<FriendsSettings> queryFriendSettings(@Path("id") String id);
@PUT("api/v1/{id}/settings")
Call<FriendsSettings> setFriendSettings(@Path("id") String id, @Body FriendsSettings newSettings);
/**
* @param source ex: "steam"
*/
@GET("api/v1/{id}/settings/externalSources/{source}")
Call<JsonObject> queryFriendExternalSourceSettings(@Path("id") String id, @Path("source") String source);
@PUT("api/v1/{id}/settings/externalSources/{source}")
Call<JsonObject> setFriendExternalSourceSettings(@Path("id") String id, @Path("source") String source, @Body JsonObject newSettings);
@Deprecated
@GET("api/public/friends/{id}")
Call<Friend[]> LEGACY_queryFriends(@Path("id") String id, @Query("includePending") Boolean includePending);
@Deprecated
@GET("api/public/blocklist/{id}")
Call<BlockedUsers> LEGACY_queryBlockedPlayers(@Path("id") String id);
}
package com.tb24.fn.network;
import com.tb24.fn.model.RedeemCodePayload;
import com.tb24.fn.model.RedeemCodeResponse;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface FulfillmentService {
String BASE_URL_PROD = "https://fulfillment-public-service-prod.ol.epicgames.com/fulfillment/";
String BASE_URL_STAGE = "https://fulfillment-public-service-stage.ol.epicgames.com/fulfillment/";
@POST("api/public/accounts/{accountId}/codes/{codeId}")
Call<RedeemCodeResponse> redeemCode(@Path("accountId") String accountId, @Path("codeId") String codeId, @Query("codeUseId") String codeUseId, @Body RedeemCodePayload payload);
}
package com.tb24.fn.network;
import com.google.gson.JsonElement;
import com.tb24.fn.model.CreateGroupRequest;
import com.tb24.fn.model.Group;
import com.tb24.fn.model.GroupApplication;
import com.tb24.fn.model.GroupBlacklistEntry;
import com.tb24.fn.model.GroupInvitation;
import com.tb24.fn.model.GroupMember;
import com.tb24.fn.model.GroupMembership;
import com.tb24.fn.model.GroupSimpleInfo;
import com.tb24.fn.model.GroupUpdatePayload;
import com.tb24.fn.model.Paged;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
/**
* Page count of paginated responses here is 50.
*/
public interface GroupsService {
String BASE_URL_PROD = "https://groups-service-prod06.ol.epicgames.com/groups/";
String BASE_URL_PROD_ALT = "https://groups-service-prod.ak.epicgames.com/groups/";
String BASE_URL_PROD_STAGE = "https://groups-service-stage.ol.epicgames.com/groups/";
@GET("api/v1/groups/in/{ns}")
Call<Paged<Group>> FindGroups(@Path("ns") String ns, @Query("q") String query, @Query("page") Integer page);
@POST("api/v1/groups/in/{ns}")
Call<Group> CreateGroup(@Path("ns") String ns, @Body CreateGroupRequest payload);
/**
* {@link GroupMembership} contains {@link GroupSimpleInfo}.
*/
@GET("api/v1/user/in/{ns}/{accountId}/membership")
Call<Paged<GroupMembership>> QueryUserMembership(@Path("ns") String ns, @Path("accountId") String accountId, @Query("page") Integer page);
/**
* {@link GroupApplication} contains {@link GroupSimpleInfo}.
*/
@GET("api/v1/user/in/{ns}/{accountId}/applications/outgoing")
Call<Paged<GroupApplication>> QueryOutgoingApplications(@Path("ns") String ns, @Path("accountId") String accountId, @Query("page") Integer page);
/**
* {@link GroupApplication} contains {@link GroupSimpleInfo}.
*/
@GET("api/v1/user/in/{ns}/{accountId}/applications/incoming")
Call<Paged<GroupApplication>> QueryIncomingApplications(@Path("ns") String ns, @Path("accountId") String accountId, @Query("page") Integer page);
/**
* {@link GroupInvitation} contains {@link GroupSimpleInfo}.
*/
@GET("api/v1/user/in/{ns}/{accountId}/invitations/outgoing")
Call<Paged<GroupInvitation>> QueryOutgoingInvitations(@Path("ns") String ns, @Path("accountId") String accountId, @Query("page") Integer page);
/**
* {@link GroupInvitation} contains {@link GroupSimpleInfo}.
*/
@GET("api/v1/user/in/{ns}/{accountId}/invitations/incoming")
Call<Paged<GroupInvitation>> QueryIncomingInvitations(@Path("ns") String ns, @Path("accountId") String accountId, @Query("page") Integer page);
@GET("api/v1/groups/{groupId}")
Call<Group> QueryGroupInfo(@Path("groupId") String groupId);
@POST("api/v1/groups/{groupId}")
Call<Group> UpdateGroupInfo(@Path("groupId") String groupId, @Body GroupUpdatePayload payload);
@DELETE("api/v1/groups/{groupId}")
Call<Void> DeleteGroup(@Path("groupId") String groupId);
@PUT("api/v1/groups/{groupId}/owner/{accountId}")
Call<Void> TransferGroup(@Path("groupId") String groupId, @Path("accountId") String accountId);
@GET("api/v1/groups/{groupId}/members")
Call<Paged<GroupMember>> QueryGroupRoster(@Path("groupId") String groupId, @Query("page") Integer page);
@GET("api/v1/groups/{groupId}/members/{accountId}")
Call<GroupMember> QueryGroupMember(@Path("groupId") String groupId, @Path("accountId") String accountId);
// 404, errors.com.epicgames.social.groups.not_found.group, Group has not been found: group (id=a168ccedec5b4c4f834f10677005ffdd) does not exists or is not of proper type (type=KAIROS)
// Maybe for joining the group if the group is open (doesn't require approval)
@POST("api/v1/groups/{groupId}/members/{accountId}")
@Headers("Content-Type: application/json")
Call<JsonElement> UNKNOWN(@Path("groupId") String groupId, @Path("accountId") String accountId);
/**
* Can also be used to leave the group.
*/
@DELETE("api/v1/groups/{groupId}/members/{accountId}")
Call<Void> RemoveUser(@Path("groupId") String groupId, @Path("accountId") String accountId);
@GET("api/v1/groups/{groupId}/admins")
Call<Paged<String>> QueryGroupAdmins(@Path("groupId") String groupId, @Query("page") Integer page);
@PUT("api/v1/groups/{groupId}/admins/{accountId}")
Call<Void> PromoteUser(@Path("groupId") String groupId, @Path("accountId") String accountId);
@DELETE("api/v1/groups/{groupId}/admins/{accountId}")
Call<Void> DemoteUser(@Path("groupId") String groupId, @Path("accountId") String accountId);
@GET("api/v1/groups/in/{ns}/{name}")
Call<Group> QueryGroupByName(@Path("ns") String ns, @Path("name") String name);
@GET("api/v1/groups/in/{ns}/{name}/exist")
Call<Boolean> QueryGroupNameExist(@Path("ns") String ns, @Path("name") String name);
@GET("api/v1/groups/{groupId}/invitations")
Call<Paged<GroupInvitation>> QueryGroupInvites(@Path("groupId") String groupId, @Query("page") Integer page);
@GET("api/v1/groups/{groupId}/invitations/{accountId}")
Call<GroupInvitation> QueryGroupInvite(@Path("groupId") String groupId, @Path("accountId") String accountId);
@POST("api/v1/groups/{groupId}/invitations/{accountId}")
@Headers("Content-Type: application/json")
Call<GroupInvitation> InviteUser(@Path("groupId") String groupId, @Path("accountId") String accountId);
@DELETE("api/v1/groups/{groupId}/invitations/{accountId}")
Call<Void> CancelInvite(@Path("groupId") String groupId, @Path("accountId") String accountId);
@POST("api/v1/groups/{groupId}/invitations/{accountId}/accept")
@Headers("Content-Type: application/json")
Call<GroupMember> AcceptInvite(@Path("groupId") String groupId, @Path("accountId") String accountId);
@POST("api/v1/groups/{groupId}/invitations/{accountId}/reject")
@Headers("Content-Type: application/json")
Call<GroupInvitation> DeclineInvite(@Path("groupId") String groupId, @Path("accountId") String accountId);
@GET("api/v1/groups/{groupId}/applications")
Call<Paged<GroupApplication>> QueryGroupRequests(@Path("groupId") String groupId, @Query("page") Integer page);
@GET("api/v1/groups/{groupId}/applications/{accountId}")
Call<GroupApplication> QueryGroupRequest(@Path("groupId") String groupId, @Path("accountId") String accountId);
@POST("api/v1/groups/{groupId}/applications/{accountId}")
@Headers("Content-Type: application/json")
Call<GroupApplication> JoinGroup(@Path("groupId") String groupId, @Path("accountId") String accountId);
@DELETE("api/v1/groups/{groupId}/applications/{accountId}")
Call<Void> CancelGroupRequest(@Path("groupId") String groupId, @Path("accountId") String accountId);
@POST("api/v1/groups/{groupId}/applications/{accountId}/accept")
@Headers("Content-Type: application/json")
Call<GroupMember> AcceptUser(@Path("groupId") String groupId, @Path("accountId") String accountId);
@POST("api/v1/groups/{groupId}/applications/{accountId}/reject")
@Headers("Content-Type: application/json")
Call<GroupApplication> DeclineUser(@Path("groupId") String groupId, @Path("accountId") String accountId);
@GET("api/v1/groups/{groupId}/blacklist")
Call<Paged<GroupBlacklistEntry>> QueryGroupBlacklist(@Path("groupId") String groupId, @Query("page") Integer page);
@PUT("api/v1/groups/{groupId}/blacklist/{accountId}")
Call<GroupBlacklistEntry> BlockUser(@Path("groupId") String groupId, @Path("accountId") String accountId);
@DELETE("api/v1/groups/{groupId}/blacklist/{accountId}")
Call<Void> UnblockUser(@Path("groupId") String groupId, @Path("accountId") String accountId);
@GET("api/v1/config/{ns}/limits/headcount")
Call<Integer> QueryConfigHeadcount(@Path("ns") String ns);
@GET("api/v1/config/{ns}/limits/membership")
Call<Integer> QueryConfigMembership(@Path("ns") String ns);
}
package com.tb24.fn.network;
import com.tb24.fn.model.interactions.LastInteractionsResponse;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
public interface InteractionsService {
String BASE_URL_PROD = "https://interactions-service-prod.ol.epicgames.com/";
String BASE_URL_STAGE = "https://interactions-service-stage.ol.epicgames.com/";
@GET("api/v1/{namespace}/get")
Call<LastInteractionsResponse> queryLastInteractions(@Path("namespace") String namespace);
}
package com.tb24.fn.network;
import com.tb24.fn.model.launcher.BuildResponse;
import com.tb24.fn.model.launcher.ClientDetails;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Path;
public interface LauncherService {
String BASE_URL_PROD = "https://launcher-public-service-prod06.ol.epicgames.com/launcher/";
String BASE_URL_STAGE = "https://launcher-public-service-stage.ol.epicgames.com/launcher/";
@POST("api/public/assets/v2/platform/{platform}/catalogItem/{catalogItemId}/app/{appName}/label/{label}")
Call<BuildResponse> querySignedDownload(@Path("platform") String platform, @Path("catalogItemId") String catalogItemId, @Path("appName") String appName, @Path("label") String label, @Body ClientDetails clientDetails);
}
package com.tb24.fn.network;
import com.tb24.fn.model.library.LibraryItems;
import com.tb24.fn.model.library.Playtime;
import com.tb24.fn.model.library.PlaytimeAddList;
import com.tb24.fn.model.library.PlaytimePayload;
import retrofit2.Call;
import retrofit2.http.*;
public interface LibraryService {
String BASE_URL = "https://library-service.live.use1a.on.epicgames.com/library/";
@PUT("api/public/playtime/account/{accountId}")
Call<Void> sendPlaytime(@Path("accountId") String accountId, @Body PlaytimePayload payload);
@PUT("api/public/playtime/account/{accountId}/bulk")
Call<Void> sendPlaytimeBulk(@Path("accountId") String accountId, @Body PlaytimeAddList payload);
@GET("api/public/playtime/account/{accountId}/artifact/{artifactId}")
Call<Playtime> queryPlaytime(@Path("accountId") String accountId, @Path("artifactId") String artifactId);
@GET("api/public/playtime/account/{accountId}/all")
Call<Playtime[]> queryAllPlaytime(@Path("accountId") String accountId);
//@GET("api/public/items/hwid/{hardwareId}")
//Call<Void> queryAntiPiracyTokens(@Path("hardwareId") String hardwareId, @Query("platform") String platform);
@GET("api/public/items")
Call<LibraryItems> queryItems(@Query("includeMetadata") Boolean includeMetadata, @Query("cursor") String cursor, @Query("excludeNs") String... excludeNs);
}
package com.tb24.fn.network;
import com.tb24.fn.model.lightswitch.ServiceStatus;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
public interface LightswitchService {
String BASE_URL_PROD = "https://lightswitch-public-service-prod.ol.epicgames.com/lightswitch/";
String BASE_URL_PROD_ALT = "https://lightswitch-public-service-prod.ak.epicgames.com/lightswitch/";
String BASE_URL_STAGE = "https://lightswitch-public-service-stage.ol.epicgames.com/lightswitch/";
@GET("api/service/bulk/status")
Call<ServiceStatus[]> queryServiceStatus(@Query("serviceId") String... serviceIds);
}
package com.tb24.fn.network;
import com.tb24.fn.model.links.LinkData;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface LinksService {
String BASE_URL_LIVE = "https://links-public-service-live.ol.epicgames.com/links/";
String BASE_URL_PROD = "https://links-public-service-prod.ol.epicgames.com/links/";
String BASE_URL_STAGE = "https://links-public-service-stage.ol.epicgames.com/links/";
@GET("api/{namespace}/mnemonic/{mnemonic}")
Call<LinkData> queryLinkByMnemonic(@Path("namespace") String namespace, @Path("mnemonic") String mnemonic, @Query("type") String type, @Query("v") Integer version);
/*@GET("api/{namespace}/author/{accountId}")
Call<ResponseBody> queryLinksByAccount(@Path("namespace") String namespace, @Path("accountId") String accountId);
@POST("api/{namespace}/author/{accountId}")
Call<ResponseBody> createLink(@Path("namespace") String namespace, @Path("accountId") String accountId);*/
}
package com.tb24.fn.network;
import com.tb24.fn.model.presence.LastOnline;
import com.tb24.fn.model.presence.NudgedSubscription;
import com.tb24.fn.model.presence.Subscription;
import com.tb24.fn.model.presence.SubscriptionSettings;
import retrofit2.Call;
import retrofit2.http.*;
import java.util.Map;
public interface PresenceService {
String BASE_URL_PROD = "https://presence-public-service-prod.ol.epicgames.com/presence/";
String BASE_URL_STAGE = "https://presence-public-service-stage.ol.epicgames.com/presence/";
@GET("api/v1/_/{id}/last-online")
Call<Map<String, LastOnline[]>> queryLastOnline(@Path("id") String id);
@GET("api/v1/_/{id}/settings/subscriptions")
Call<SubscriptionSettings> querySubscriptionSettings(@Path("id") String id);
@PATCH("api/v1/_/{id}/settings/subscriptions")
Call<Void> updateSubscriptionSettings(@Path("id") String id, @Body SubscriptionSettings payload);
@POST("api/v1/_/{id}/subscriptions/{otherId}")
Call<Void> subscribe(@Path("id") String id);
@DELETE("api/v1/_/{id}/subscriptions/{otherId}")
Call<Void> unsubscribe(@Path("id") String id);
@GET("api/v1/_/{id}/subscriptions")
Call<Subscription[]> querySubscriptions(@Path("id") String id);
@POST("api/v1/{namespace}/{id}/subscriptions/broadcast")
Call<Void> broadcastSubscription(@Path("id") String id);
@PUT("api/v1/{namespace}/{id}/subscriptions/nudged/{otherId}")
Call<Void> sendSubscriptionNudge(@Path("namespace") String namespace, @Path("id") String id, @Path("otherId") String otherId);
@GET("api/v1/{namespace}/{id}/subscriptions/nudged")
Call<NudgedSubscription[]> queryNudgedSubscriptions(@Path("namespace") String namespace, @Path("id") String id);
}
package com.tb24.fn.network;
import com.tb24.fn.model.UserSearchResultEntry;
import com.tb24.fn.model.account.EExternalAuthType;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
public interface UserSearchService {
String BASE_URL_PROD = "https://user-search-service-prod.ol.epicgames.com/";
String BASE_URL_STAGE = "https://user-search-service-stage.ol.epicgames.com/";
@GET("api/v1/search")
Call<UserSearchResultEntry[]> queryUsers(@Query("prefix") String prefix, @Query("platform") EExternalAuthType platform);
}
@Blyrex
Copy link

Blyrex commented Oct 28, 2021

Hi! Could you send me the Pojos or the full repo? Nice work btw!

Copy link

ghost commented Apr 28, 2022

This is amazing and helps me SO MUCH with my projects!

Thank you very much!

@smene-it
Copy link

smene-it commented Jul 1, 2022

How to use UserSearchService endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment