Skip to content

Commit d980335

Browse files
committed
Update mcc_api.island schema to support cosmetic royal reputation data
1 parent 75f845a commit d980335

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![🐍 PyPI](https://img.shields.io/pypi/v/mcc-api?label=🐍%20PyPI)](https://pypi.org/project/mcc-api/)
44
[![👑 Targeting Event API v1.6.0](https://img.shields.io/badge/👑_Targeting_Event_API-v1.6.0-red)](https://github.com/Noxcrew/mcchampionship-api/releases/tag/v1.6.0)
5-
[![🏝️ Targeting Island API v25.03.13](https://img.shields.io/badge/🏝️_Targeting_Island_API-v25.03.13-aqua)](https://github.com/Noxcrew/mccisland-api/releases/tag/v25.03.13)
5+
[![🏝️ Targeting Island API v25.07.09](https://img.shields.io/badge/🏝️_Targeting_Island_API-v25.07.09-aqua)](https://github.com/Noxcrew/mccisland-api/releases/tag/v25.07.09)
66

77
A helper library for the [MC Championship](https://mcchampionship.com) APIs
88
([Event](https://github.com/Noxcrew/mcchampionship-api), inspired by [derNiklaas's](https://github.com/derNiklaas)

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ python_mcc_api
77
.. image:: https://img.shields.io/badge/👑_Targeting_Event_API-v1.6.0-red
88
:alt: 👑 Targeting Event API v1.6.0
99
:target: https://github.com/Noxcrew/mcchampionship-api/releases/tag/v1.6.0
10-
.. image:: https://img.shields.io/badge/🏝️_Targeting_Island_API-v25.03.13-aqua
11-
:alt: 🏝️ Targeting Island API v25.03.13
12-
:target: https://github.com/Noxcrew/mccisland-api/releases/tag/v25.03.13
10+
.. image:: https://img.shields.io/badge/🏝️_Targeting_Island_API-v25.07.09-aqua
11+
:alt: 🏝️ Targeting Island API v25.07.09
12+
:target: https://github.com/Noxcrew/mccisland-api/releases/tag/v25.07.09
1313

1414
A helper library for the `MC Championship <https://mcchampionship.com>`_ APIs
1515
(`Event <https://github.com/Noxcrew/mcchampionship-api>`_, inspired by `derNiklaas's <https://github.com/derNiklaas>`_

mcc_api/island/types.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"player_type",
2323
"progression_data_type",
2424
"query_type",
25+
"royal_reputation_type",
2526
"server_type",
2627
"social_type",
2728
"statistic_type",
@@ -76,7 +77,7 @@
7677
cosmetic_type = GraphQLObjectType(
7778
name="Cosmetic",
7879
description="A cosmetic.",
79-
fields={
80+
fields=lambda: {
8081
"name": GraphQLField(
8182
GraphQLNonNull(GraphQLString),
8283
description="The name of the cosmetic."
@@ -119,6 +120,11 @@
119120
GraphQLNonNull(rarity_enum),
120121
description="The rarity of the cosmetic."
121122
),
123+
"royalReputation": GraphQLField(
124+
royal_reputation_type,
125+
description="Information about the Royal Reputation this cosmetic provides.\n\n"
126+
"This will be `null` if the cosmetic cannot be donated."
127+
),
122128
"trophies": GraphQLField(
123129
GraphQLNonNull(GraphQLInt),
124130
description="The number of trophies this cosmetic awards.\n\n"
@@ -509,6 +515,21 @@
509515
}
510516
)
511517

518+
royal_reputation_type = GraphQLObjectType(
519+
name="RoyalReputation",
520+
description="Information about the Royal Reputation for a cosmetic.",
521+
fields={
522+
"donationLimit": GraphQLField(
523+
GraphQLNonNull(GraphQLInt),
524+
description="The maximum number of donations that can be made for this cosmetic."
525+
),
526+
"reputationAmount": GraphQLField(
527+
GraphQLNonNull(GraphQLInt),
528+
description="The amount of reputation that each donation provides."
529+
)
530+
}
531+
)
532+
512533
server_type = GraphQLObjectType(
513534
name="Server",
514535
description="A server on the network.",

0 commit comments

Comments
 (0)