add api() method to service builder
This commit is contained in:
1 parent
da3a3f4a0d
commit
0f39d37ddc
2 files changed
+22
-2
No files matched your search
@@ -55,7 +55,22 @@ public class ServiceBuilder
|
||||
}
|
||||
return api;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Configures the {@link Api}
|
||||
*
|
||||
* Overloaded version. Let's you use an instance instead of a class.
|
||||
*
|
||||
* @param api instance of {@link Api}s
|
||||
* @return the {@link ServiceBuilder} instance for method chaining
|
||||
*/
|
||||
public ServiceBuilder provider(Api api)
|
||||
{
|
||||
Preconditions.checkNotNull(api, "Api cannot be null");
|
||||
this.api = api;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an OAuth callback url
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user