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
d4a2cf3
commit 62f03a9
Showing
68 changed files
with
753 additions
and
852 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
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
14 changes: 0 additions & 14 deletions
14
Habitica/src/main/java/com/habitrpg/android/habitica/data/ContentRepository.java
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
Habitica/src/main/java/com/habitrpg/android/habitica/data/ContentRepository.kt
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,14 @@ | ||
package com.habitrpg.android.habitica.data | ||
|
||
import com.habitrpg.android.habitica.models.ContentResult | ||
import com.habitrpg.android.habitica.models.WorldState | ||
|
||
import io.reactivex.Flowable | ||
|
||
interface ContentRepository : BaseRepository { | ||
|
||
fun retrieveContent(): Flowable<ContentResult> | ||
fun retrieveContent(forced: Boolean): Flowable<ContentResult> | ||
|
||
fun retrieveWorldState(): Flowable<WorldState> | ||
} |
10 changes: 0 additions & 10 deletions
10
Habitica/src/main/java/com/habitrpg/android/habitica/data/CustomizationRepository.java
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
Habitica/src/main/java/com/habitrpg/android/habitica/data/CustomizationRepository.kt
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,10 @@ | ||
package com.habitrpg.android.habitica.data | ||
|
||
import com.habitrpg.android.habitica.models.inventory.Customization | ||
|
||
import io.reactivex.Flowable | ||
import io.realm.RealmResults | ||
|
||
interface CustomizationRepository : ContentRepository { | ||
fun getCustomizations(type: String, category: String?, onlyAvailable: Boolean): Flowable<RealmResults<Customization>> | ||
} |
11 changes: 0 additions & 11 deletions
11
Habitica/src/main/java/com/habitrpg/android/habitica/data/FAQRepository.java
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
Habitica/src/main/java/com/habitrpg/android/habitica/data/FAQRepository.kt
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 com.habitrpg.android.habitica.data | ||
|
||
import com.habitrpg.android.habitica.models.FAQArticle | ||
|
||
import io.reactivex.Flowable | ||
import io.realm.RealmResults | ||
|
||
interface FAQRepository : BaseRepository { | ||
fun getArticles(): Flowable<RealmResults<FAQArticle>> | ||
|
||
} |
92 changes: 0 additions & 92 deletions
92
Habitica/src/main/java/com/habitrpg/android/habitica/data/InventoryRepository.java
This file was deleted.
Oops, something went wrong.
87 changes: 87 additions & 0 deletions
87
Habitica/src/main/java/com/habitrpg/android/habitica/data/InventoryRepository.kt
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,87 @@ | ||
package com.habitrpg.android.habitica.data | ||
|
||
import com.habitrpg.android.habitica.models.inventory.Egg | ||
import com.habitrpg.android.habitica.models.inventory.Equipment | ||
import com.habitrpg.android.habitica.models.inventory.Food | ||
import com.habitrpg.android.habitica.models.inventory.HatchingPotion | ||
import com.habitrpg.android.habitica.models.inventory.Item | ||
import com.habitrpg.android.habitica.models.inventory.Mount | ||
import com.habitrpg.android.habitica.models.inventory.Pet | ||
import com.habitrpg.android.habitica.models.inventory.Quest | ||
import com.habitrpg.android.habitica.models.inventory.QuestContent | ||
import com.habitrpg.android.habitica.models.responses.BuyResponse | ||
import com.habitrpg.android.habitica.models.responses.FeedResponse | ||
import com.habitrpg.android.habitica.models.shops.Shop | ||
import com.habitrpg.android.habitica.models.shops.ShopItem | ||
import com.habitrpg.android.habitica.models.user.Items | ||
import com.habitrpg.android.habitica.models.user.User | ||
|
||
import io.reactivex.Flowable | ||
import io.realm.RealmResults | ||
|
||
|
||
interface InventoryRepository : ContentRepository { | ||
|
||
fun getArmoireRemainingCount(): Long | ||
|
||
fun getInAppRewards(): Flowable<RealmResults<ShopItem>> | ||
fun getOwnedEquipment(): Flowable<RealmResults<Equipment>> | ||
|
||
fun getMounts(): Flowable<RealmResults<Mount>> | ||
|
||
fun getOwnedMounts(): Flowable<RealmResults<Mount>> | ||
|
||
fun getPets(): Flowable<RealmResults<Pet>> | ||
|
||
fun getOwnedPets(): Flowable<RealmResults<Pet>> | ||
fun getQuestContent(key: String): Flowable<QuestContent> | ||
|
||
fun getItems(searchedKeys: List<String>): Flowable<RealmResults<Equipment>> | ||
fun retrieveInAppRewards(): Flowable<List<ShopItem>> | ||
|
||
fun getOwnedEquipment(type: String): Flowable<RealmResults<Equipment>> | ||
|
||
fun getOwnedItems(itemClass: Class<out Item>, user: User?): Flowable<out RealmResults<out Item>> | ||
fun getOwnedItems(user: User): Flowable<out Map<String, Item>> | ||
|
||
fun getEquipment(key: String): Flowable<Equipment> | ||
|
||
fun openMysteryItem(user: User?): Flowable<Equipment> | ||
|
||
fun saveEquipment(equipment: Equipment) | ||
fun getMounts(type: String, group: String): Flowable<RealmResults<Mount>> | ||
fun getOwnedMounts(animalType: String, animalGroup: String): Flowable<RealmResults<Mount>> | ||
fun getPets(type: String, group: String): Flowable<RealmResults<Pet>> | ||
fun getOwnedPets(type: String, group: String): Flowable<RealmResults<Pet>> | ||
|
||
fun updateOwnedEquipment(user: User) | ||
|
||
fun changeOwnedCount(type: String, key: String, amountToAdd: Int) | ||
|
||
fun sellItem(user: User?, type: String, key: String): Flowable<User> | ||
fun sellItem(user: User?, item: Item): Flowable<User> | ||
|
||
fun equipGear(user: User?, equipment: String, asCostume: Boolean): Flowable<Items> | ||
fun equip(user: User?, type: String, key: String): Flowable<Items> | ||
|
||
fun feedPet(pet: Pet, food: Food): Flowable<FeedResponse> | ||
|
||
fun hatchPet(egg: Egg, hatchingPotion: HatchingPotion): Flowable<Items> | ||
|
||
fun inviteToQuest(quest: QuestContent): Flowable<Quest> | ||
|
||
fun buyItem(user: User?, id: String, value: Double): Flowable<BuyResponse> | ||
|
||
fun retrieveShopInventory(identifier: String): Flowable<Shop> | ||
fun retrieveMarketGear(): Flowable<Shop> | ||
|
||
fun purchaseMysterySet(categoryIdentifier: String): Flowable<Void> | ||
|
||
fun purchaseHourglassItem(purchaseType: String, key: String): Flowable<Void> | ||
|
||
fun purchaseQuest(key: String): Flowable<Void> | ||
|
||
fun purchaseItem(purchaseType: String, key: String): Flowable<Void> | ||
|
||
fun togglePinnedItem(item: ShopItem): Flowable<List<ShopItem>> | ||
} |
13 changes: 0 additions & 13 deletions
13
Habitica/src/main/java/com/habitrpg/android/habitica/data/SetupCustomizationRepository.java
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
Habitica/src/main/java/com/habitrpg/android/habitica/data/SetupCustomizationRepository.kt
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 com.habitrpg.android.habitica.data | ||
|
||
|
||
import com.habitrpg.android.habitica.models.SetupCustomization | ||
import com.habitrpg.android.habitica.models.user.User | ||
|
||
interface SetupCustomizationRepository { | ||
|
||
fun getCustomizations(type: String, user: User): List<SetupCustomization> | ||
fun getCustomizations(type: String, subtype: String?, user: User): List<SetupCustomization> | ||
} |
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.