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
+6
-1
@@ -23,4 +23,9 @@
|
|||||||
|
|
||||||
* FEATURE: OAuth 2.0 Support and Facebook support out of the box (thanks Diego Silveira)
|
* FEATURE: OAuth 2.0 Support and Facebook support out of the box (thanks Diego Silveira)
|
||||||
* REFACTOR: Api creation and OAuthService refactors
|
* REFACTOR: Api creation and OAuthService refactors
|
||||||
* REFACTOR: Connections are created lazily (just before sending the request)
|
* REFACTOR: Connections are created lazily (just before sending the request)
|
||||||
|
|
||||||
|
[1.1.1]
|
||||||
|
|
||||||
|
* FIX: Removed isEmpty() from OAuth2.0 code in order to support older JVMs
|
||||||
|
* FEATURE: Overloaded provider() method to support instances as well as classes (thanks dustismo)
|
||||||
@@ -55,7 +55,22 @@ public class ServiceBuilder
|
|||||||
}
|
}
|
||||||
return api;
|
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
|
* Adds an OAuth callback url
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in new issue
Block a user