Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

Commit 0cb67b3

Browse files
committed
a few changes were made
trending_position() was changed to get_trending_position(), mode was removed from the arguments and is now using self.gameModeGroup instead
1 parent 1e9fb96 commit 0cb67b3

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ example_map = intersection.map.get_maps(2452411, 50, 0)
6262

6363
# Trying to get the trending position but if there's an error doing something else
6464
try:
65-
position = example_map.trending_position(2, "day", 1)
65+
position = example_map.trending_position("day", 1)
6666
print(f"This map's trending position is: {position}")
6767
except errors.mapNotInTrendingError:
6868
print("This map is not in trending")
6969
```
7070

7171
## External links
7272

73-
- [PYPI (pip installation)](https://pypi.org/project/intersection.py/)
73+
- [PYPI Page (pip installation)](https://pypi.org/project/intersection.py/)
7474
- [JavaScript version](https://github.com/RanggaGultom/ic-api) made by [RanggaGultom](https://github.com/RanggaGultom)
75+
- [Github Repository](https://github.com/Feeeeddmmmeee/intersection.py)

intersection/map.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,27 @@ def get_highscore_user(self):
6161
"""
6262
return intersection.user.get_user(self.highScoreUser)
6363

64-
def is_in_trending(self, mode, time, trendsystem):
64+
def is_in_trending(self, time, trendsystem):
6565
"""A function used to check if the given ``Map`` object is currently in the trending category
6666
6767
returns a boolean value
6868
"""
6969

70-
api = get_top_maps(mode, time, trendsystem)
70+
api = get_top_maps(self.gameModeGroup, time, trendsystem)
7171

7272
for item in api:
7373
if vars(self) == vars(item):
7474
return True
7575

7676
return False
7777

78-
def trending_position(self, mode, time, trendsystem):
78+
def get_trending_position(self, time, trendsystem):
7979
"""A function used to get the position of a given `Map` object in trending. the mapNotInTrendingError error will be raised if it's not in trending.
8080
8181
returns an integer
8282
"""
83-
if self.is_in_trending(mode, time, trendsystem):
84-
api = get_top_maps(mode, time, trendsystem)
83+
if self.is_in_trending(self.gameModeGroup, time, trendsystem):
84+
api = get_top_maps(self.gameModeGroup, time, trendsystem)
8585
position = 0
8686

8787
for item in api:

0 commit comments

Comments
 (0)