|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectoauthP5.oauth.ServiceBuilder
public class ServiceBuilder
Implementation of the Builder pattern, with a fluent interface that creates a
OAuthService
Constructor Summary | |
---|---|
ServiceBuilder()
Default constructor |
Method Summary | |
---|---|
ServiceBuilder |
apiKey(String apiKey)
Configures the api key |
ServiceBuilder |
apiSecret(String apiSecret)
Configures the api secret |
OAuthService |
build()
Returns the fully configured OAuthService |
ServiceBuilder |
callback(String callback)
Adds an OAuth callback url |
ServiceBuilder |
debug()
|
ServiceBuilder |
debugStream(OutputStream stream)
|
ServiceBuilder |
provider(Api api)
Configures the Api
Overloaded version. |
ServiceBuilder |
provider(Class<? extends Api> apiClass)
Configures the Api |
ServiceBuilder |
scope(String scope)
Configures the OAuth scope. |
ServiceBuilder |
signatureType(SignatureType type)
Configures the signature type, choose between header, querystring, etc. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceBuilder()
Method Detail |
---|
public ServiceBuilder provider(Class<? extends Api> apiClass)
Api
apiClass
- the class of one of the existent Api
s on org.scribe.api package
ServiceBuilder
instance for method chainingpublic ServiceBuilder provider(Api api)
Api
Overloaded version. Let's you use an instance instead of a class.
api
- instance of Api
s
ServiceBuilder
instance for method chainingpublic ServiceBuilder callback(String callback)
callback
- callback url. Must be a valid url or 'oob' for out of band OAuth
ServiceBuilder
instance for method chainingpublic ServiceBuilder apiKey(String apiKey)
apiKey
- The api key for your application
ServiceBuilder
instance for method chainingpublic ServiceBuilder apiSecret(String apiSecret)
apiSecret
- The api secret for your application
ServiceBuilder
instance for method chainingpublic ServiceBuilder scope(String scope)
scope
- The OAuth scope
ServiceBuilder
instance for method chainingpublic ServiceBuilder signatureType(SignatureType type)
scope
- The OAuth scope
ServiceBuilder
instance for method chainingpublic ServiceBuilder debugStream(OutputStream stream)
public ServiceBuilder debug()
public OAuthService build()
OAuthService
OAuthService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |