-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
307c6b6
commit 7c81870
Showing
8 changed files
with
140 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ plugins { | |
} | ||
|
||
group 'crazzyghost' | ||
version '1.2.1' | ||
version '1.3.0' | ||
|
||
sourceCompatibility = 1.8 | ||
|
||
|
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
5 changes: 5 additions & 0 deletions
5
src/main/java/com/crazzyghost/alphavantage/AlphaVantageException.java
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,38 @@ | ||
package com.crazzyghost.alphavantage; | ||
|
||
/** | ||
* Defines an interface for pulling data from the API source. | ||
* A fetch operation can either fail or succeed | ||
* @since 1.0.0 | ||
* @author crazzyghost | ||
*/ | ||
public interface Fetcher{ | ||
|
||
/** | ||
* Perform a fetch operation | ||
*/ | ||
void fetch(); | ||
|
||
/** | ||
* Callback when the fetch operation succeeds | ||
* @param <V> the type of the reponse of the fetch operation | ||
*/ | ||
interface SuccessCallback<V>{ | ||
/** | ||
* Call this method with a response when the fetch operation is successful | ||
* @param response response object | ||
*/ | ||
void onSuccess(V response); | ||
} | ||
|
||
/** | ||
* Callback when the fetch operation fails | ||
*/ | ||
interface FailureCallback{ | ||
/** | ||
* Call this method with an exception when the fetch operation fails | ||
* @param ex exception | ||
*/ | ||
void onFailure(AlphaVantageException ex); | ||
} | ||
} |
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