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

Improve builder #1033

Open
davidmoten opened this issue Mar 1, 2022 · 0 comments
Open

Improve builder #1033

davidmoten opened this issue Mar 1, 2022 · 0 comments

Comments

@davidmoten
Copy link

Looks like a great simple to use library.

Can I suggest a further improvement:

Instead of

OAuthService service = new ServiceBuilder(YOUR_API_KEY)
                                  .apiSecret(YOUR_API_SECRET)
                                  .build(LinkedInApi20.instance());

Do something more readable and more discoverable (I want an OAuthService, use a static factory method on OAuthService):

OAuthService service = OAuthService
        .apiKey(YOUR_API_KEY)
        .apiSecret(YOUR_API_SECRET)
        .build(LinkedInApi20.instance());
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

1 participant