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

[Feat] Managing wrapper with object #7

Closed
5 of 6 tasks
gunyu1019 opened this issue Feb 21, 2024 · 0 comments
Closed
5 of 6 tasks

[Feat] Managing wrapper with object #7

gunyu1019 opened this issue Feb 21, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@gunyu1019
Copy link
Owner

gunyu1019 commented Feb 21, 2024

Describe the new feature

Instead of decorating wrapper, use the Request object
To possible to manage pre-call wrapper and post-call wrapper with decorating.

For example

@app.get("/station/<name>")
@Session.single_session("https://api.yhs.kr")
@request("GET", "/bus/station")
async def station_search_with_query(
    session: Session, response: aiohttp.ClientResponse, name: Query | str
):
    return await response.json()

# If need to manage requests before request HTTP Client
@station_search_with_query.before_call
async def before_call( ... ):
    pass

TODO

  • Objectify requests.py
  • Add before_call, after_http_call and after_call method
    • before_call decorating function (For dynamic request component)
    • after_http_call decorating function (To edit parameter, for wrapper)
    • after_call decorating function (Success API Called)
  • Add method for session (object) - request (object)

Addition Context

This release may be a major update. (v1.0.0)

@gunyu1019 gunyu1019 added the enhancement New feature or request label Feb 21, 2024
@gunyu1019 gunyu1019 self-assigned this Feb 21, 2024
gunyu1019 added a commit that referenced this issue Feb 28, 2024
gunyu1019 added a commit that referenced this issue Mar 1, 2024
gunyu1019 added a commit that referenced this issue Mar 1, 2024
@gunyu1019 gunyu1019 mentioned this issue Mar 1, 2024
5 tasks
gunyu1019 added a commit that referenced this issue Mar 2, 2024
gunyu1019 added a commit that referenced this issue Mar 2, 2024
@gunyu1019 gunyu1019 mentioned this issue Mar 4, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant