I would like to add support for batch requests. I think this will necessitate some design changes. In particular, I think it means many of the API methods should return a request instead of a response, and then adding a new function that sends one or a batch of requests together and returns a response.
Here's how it might(?) look:
pages = Repo.all(Page)
|> Enum.map(fn page -> Facebook.page(page.facebook_page_id) end)
|> Facebook.requestBatch()
I would like to add support for batch requests. I think this will necessitate some design changes. In particular, I think it means many of the API methods should return a request instead of a response, and then adding a new function that sends one or a batch of requests together and returns a response.
Here's how it might(?) look: