-
Notifications
You must be signed in to change notification settings - Fork 424
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
Showing
42 changed files
with
2,671 additions
and
162 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
extractor/src/main/java/org/schabi/newpipe/extractor/Instance.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.schabi.newpipe.extractor; | ||
|
||
import org.schabi.newpipe.extractor.exceptions.InvalidInstanceException; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
public interface Instance { | ||
|
||
@Nullable | ||
String getName(); | ||
|
||
@Nonnull | ||
String getUrl(); | ||
|
||
boolean isValid(); | ||
|
||
/** | ||
* Fetch instance metadata. | ||
* <p> | ||
* You can e.g. save the name | ||
* | ||
* @throws InvalidInstanceException | ||
*/ | ||
void fetchInstanceMetaData() throws InvalidInstanceException; | ||
|
||
} |
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
11 changes: 11 additions & 0 deletions
11
...actor/src/main/java/org/schabi/newpipe/extractor/exceptions/InvalidInstanceException.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.schabi.newpipe.extractor.exceptions; | ||
|
||
public class InvalidInstanceException extends ExtractionException { | ||
public InvalidInstanceException(String message) { | ||
super(message); | ||
} | ||
|
||
public InvalidInstanceException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
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
Oops, something went wrong.