aiogoogle icon indicating copy to clipboard operation
aiogoogle copied to clipboard

support for BatchHttpRequest

Open thehesiod opened this issue 4 years ago • 6 comments

thehesiod avatar Jan 12 '20 09:01 thehesiod

Right now BatchHttpRequest is not implemented. The way I plan to do implement it is using the Request.batch_requests class method in the Request class.

It would look something like this:

resp1, resp2 = await aiogoogle.as_user(
  Request.batch_requests(
    youtube_v3.videos.search(q="first"),
    youtube_v3.videos.search(q="second")
  )
)

After implementing the batch_requests functionality, we must make the aiogoogle sessions understand the BatchRequest object that we just created. So, tweaking the send method will be necessary.

Updates:

  • Batch requests should have max 1000 requests per batch as per Google
  • None of the requests in a batch can use media upload as per Google

omarryhan avatar Sep 12 '20 15:09 omarryhan

I'm open to merging pull requests if you're up for the task @kshilov

omarryhan avatar Sep 12 '20 15:09 omarryhan

I ended up creating my own version of async google api that replaces the sync functionality in the core google apis, will close. I've been working to try to open source it, hopefully soon

thehesiod avatar Sep 12 '20 18:09 thehesiod

Cool, let's keep this issue open until we've landed this feature

omarryhan avatar Sep 16 '20 11:09 omarryhan

@omarryhan when can we expect this to be implemented? Since it's more than 3 years already

sumankn314e avatar Sep 27 '23 05:09 sumankn314e

Hey @sumankn314e I'm currently only maintaining the current features provided and I have no plans to add more features. However, I'd be happy to review your work and merge it in if you're interested in adding this feature

omarryhan avatar Sep 27 '23 06:09 omarryhan