This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@params | |
URL_ID = URL id of the shorten URL to add tag | |
YOUR_TAG = Your custom tag | |
//Adding a tag must be done on a background thread. | |
//You can declare your own logic to run the task on a background thread. | |
//This AsyncTask will leak memory | |
new AsyncTask<Void, Void, Void>(){ | |
@Override | |
protected Void doInBackground(Void... voids) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@params | |
URL_ID = URL id of the shorten URL to delete | |
ThrwAtURLManager.getInstance(getApplicationContext()).deleteURL("URL_ID", new onURLDeleteListener() { | |
@Override | |
public void onComplete(ThrwAtURLDeleteTask task) { | |
Log.e("Message:", task.getMessage()); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@params | |
URL_ID = URL id of the shorten URL to add or update password | |
PASSWORD = Password to set for the URL | |
ThrwAtURLManager.getInstance(getApplicationContext()).updatePassword("URL_ID", "PASSWORD", new onURLPasswordUpdateListener() { | |
@Override | |
public void onComplete(ThrwAtURLPasswordUpdateTask task) { | |
if(task.isSuccessful()){ | |
Log.e("Success message:", task.getMessage()); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@params | |
URL_ID = Url ID of the shorten url | |
ThrwAtURLManager.getInstance(getApplicationContext()).removePassword("URL_ID", new onURLPasswordRemoveListener() { | |
@Override | |
public void onComplete(ThrwAtURLPasswordRemoveListener task) { | |
if(task.isSuccessful()){ | |
Log.e("Success message:", task.getMessage()); | |
} else { | |
Log.e("Error message:", task.getMessage()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//URLItems variables | |
//Unique ID of your URL | |
public String urlId; | |
//Long URL | |
public String url; | |
//Shorten URL | |
public String tinyUrl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//All items are returned in descending order unless specified | |
//Get all URLs | |
List<URLItems>getAllShortenURLS() | |
//Get {count} number of URLs | |
List<URLItems>getShortenURLS(int count) | |
//Get all URLs in ascending order | |
List<URLItems> getAllShortenURLSAscending() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@return | |
Returns an instance of ThrwAtUser | |
ThrwAtUser user = ThrwAt.getInstance(getApplicationContext()).getCurrentUser(); | |
Log.e("User ID:", user.getUserId()); | |
Log.e("API Key:", user.getApiKey()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ThrwAtURLManager.getInstance(getApplicationContext()).doForceSyncFromServer(); |
NewerOlder