Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Night Market #11

Open
SavvyxArhum opened this issue Dec 5, 2021 · 2 comments
Open

[FEATURE] Night Market #11

SavvyxArhum opened this issue Dec 5, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@SavvyxArhum
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@github-actions
Copy link

github-actions bot commented Dec 5, 2021

👋 Thanks for reporting!

@sanjaybaskaran01 sanjaybaskaran01 changed the title Night Market [Checking] <FEATURE_TITLE> [FEATURE] Night Market Dec 29, 2021
@sanjaybaskaran01
Copy link
Owner

For people willing to work on the Issue, Riot sends the night market as an additional item to the object present here called "BonusStore", make sure to style the embed similar to the current +store embed, create a new additional command called +nightmarket in here , create an additional function for nightmarket in getSkinOffers.py

async def getStore(headers, user_id, region, nightMarket=False):
    session = aiohttp.ClientSession()
    try:
        async with session.get(f'https://pd.{region}.a.pvp.net/store/v2/storefront/{user_id}', headers=headers) as r:
            data = json.loads(await r.text())
    except Exception as e:
        print(e)
    finally:
        await session.close()
    if nightMarket:
        if 'BonusStore' not in data:
            return 404 # if "BonusStore" is not present in the object send a different response letting people know nightmarket is not enabled
        nightMarketPanel = data['BonusStore']
        return await getNightMarket(headers, nightMarketPanel, region)
    if 'SkinsPanelLayout' not in data:
        return
    skinPanel = data['SkinsPanelLayout']
    return await getSkinDetails(headers, skinPanel, region)

@sanjaybaskaran01 sanjaybaskaran01 added good first issue Good for newcomers help wanted Extra attention is needed enhancement New feature or request labels Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants