-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing fields to Instance entity. (#217)
* Added missing fields to Instance entity. Added the missing fields to the InstanceV1 entity. Also moved some Instance-specific classes into the Instance class (as nested data class). Added code samples. * Code review fixes Moved Rule class into separate entity, renamed some data classes related to the Instance entity. * Fix code review findings * Added test for reading config section in instance entity --------- Co-authored-by: André Gasser <andre.gasser2@swisscom.com>
- Loading branch information
1 parent
c2bea0f
commit fb59ffe
Showing
8 changed files
with
411 additions
and
46 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
27 changes: 0 additions & 27 deletions
27
bigbone/src/main/kotlin/social/bigbone/api/entity/InstanceStats.kt
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
bigbone/src/main/kotlin/social/bigbone/api/entity/InstanceUrls.kt
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
package social.bigbone.api.entity | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
/** | ||
* Represents a rule that server users should follow. | ||
* @see <a href="https://docs.joinmastodon.org/entities/Rule/">Mastodon API Rule</a> | ||
*/ | ||
data class Rule( | ||
/** | ||
* An identifier for the rule. | ||
*/ | ||
@SerializedName("id") | ||
val id: String = "0", | ||
|
||
/** | ||
* The rule to be followed. | ||
*/ | ||
@SerializedName("text") | ||
val text: String = "" | ||
) |
Oops, something went wrong.