Constants.java - ninetwozero/BF3-Battlelog GitHub Wiki
As it's come to my attention that I'm using quite a few acronyms, I might as well write them down as I encounter them, and bring some clarity to the code.
The following URL-constants can be found through-out the app:
{UID} - the userId, also known as the profileId
{PID} - the personaId, ie the id of one of the users soldiers (often the active one)
{POST_ID} - the id of a specific post in the feed
{CID} - the id of a specific comment for a post in the feed
{PLATOON_ID} - the id of a specific platoon
{UNAME} - the username of the user
{PLATFORM_NAME} - the name of the platform the persona is playing on (can be resolved via DataBank.class)
{PLATFORM_ID} - the id of the platform the persona is playing on, either 1 (PC), 2 (Xbox 360) or 4 (PS3)
When one would like to switch the placeholder to an actual value, all that needs to be done is the following:
Constants.urlTheChosenUrl.replace("{UNAME}", "ninetwozero");
Note that it's also possible to chain replacements, such as:
Constants.urlTheChosenUrl.replace("{UNAME}", "ninetwozero").replace("{PLATFORM_NAME}", "Xbox 360");