This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
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
278 changed files
with
3,108 additions
and
1,090 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,39 @@ | ||
package et.telebof; | ||
|
||
import et.telebof.types.JsonSerializable; | ||
import java.util.Objects; | ||
|
||
import java.util.Map; | ||
|
||
public class ApiResponse extends JsonSerializable { | ||
public class ApiResponse<T> { | ||
public boolean ok; | ||
public String description; | ||
public int error_code; | ||
public Object result; | ||
public T result; | ||
public ResponseParameters parameters; | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
if (this == object) return true; | ||
if (object == null || getClass() != object.getClass()) return false; | ||
ApiResponse<?> that = (ApiResponse<?>) object; | ||
return ok == that.ok && error_code == that.error_code && | ||
Objects.equals(description, that.description) && | ||
Objects.equals(result, that.result) && | ||
Objects.equals(parameters, that.parameters); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(ok, description, error_code, result, parameters); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ApiResponse{" + | ||
"ok=" + ok + | ||
", description='" + description + '\'' + | ||
", error_code=" + error_code + | ||
", result=" + result + | ||
", parameters=" + parameters + | ||
'}'; | ||
} | ||
} | ||
|
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
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,7 @@ | ||
package et.telebof.enums; | ||
|
||
public enum MenuButtonType { | ||
COMMANDS, | ||
DEFAULT, | ||
WEB_APP; | ||
} |
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,6 @@ | ||
package et.telebof.enums; | ||
|
||
public enum MimeType { | ||
PDF, | ||
ZIP | ||
} |
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.