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

get_account does not allow you to set a region #452

Open
lbkulinski opened this issue May 16, 2024 · 1 comment
Open

get_account does not allow you to set a region #452

lbkulinski opened this issue May 16, 2024 · 1 comment

Comments

@lbkulinski
Copy link

Hello.

I am experimenting with Cassiopeia and found a potential bug with get_account:

import os

import cassiopeia as cass
from fastapi import FastAPI

api_key = os.environ.get('RIOT_API_KEY')

cass.set_riot_api_key(api_key)

app = FastAPI()


@app.get("/api/lol/me")
async def root():
    account = cass.get_account(name='lbku', tagline='lbku')

    return {
        "account": account.to_dict()
    }

When I hit the endpoint, I get the following error:

TypeError: __get_query_from_kwargs__() missing 1 required keyword-only argument: 'region'

If I try to specify the region via cass.get_account(name='lbku', tagline='lbku', region='NA'), I also get an error:

TypeError: get_account() got an unexpected keyword argument 'region'

Thanks,
Logan

@66Omar
Copy link
Contributor

66Omar commented May 19, 2024

Hello, @jjmaldonis,
Your last commit says WIP, are you currently working on this update? I managed to fix this locally but still haven't tested the rest of the functionality, if there are no pending changes on your side, I can create a PR hopefully by the end of the day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants