Skip to content

Add an option to generate API calls using a DbxRequest wrapper#564

Draft
jonamireh wants to merge 4 commits into
dropbox:mainfrom
jonamireh:feature/request
Draft

Add an option to generate API calls using a DbxRequest wrapper#564
jonamireh wants to merge 4 commits into
dropbox:mainfrom
jonamireh:feature/request

Conversation

@jonamireh

Copy link
Copy Markdown

Summary

This PR adds DbxRequest to the public API and adds an optional parameter to the Java Stone backend on using it to generate additional methods that wrap the synchronous methods. This allows callers to capture the API request as an object

DbxRequest is functionally identical to java.util.Callable; we intend on using as a namespace for Kotlin extensions but don't want to pollute the Callable with those extensions so we're introducing a new type.

Newly generated methods with be suffixed with *Request and apply to all method types (RPC, download & upload) where they return the result (if any) or the DbxDownloader/DbxUploader class. For now, no changes to DbxDownloader/DbxUploader.

Test Plan

New tests pass

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jon Amireh seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

2 participants