|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.restfb.batch.BatchRequest.BatchRequestBuilder
public static class BatchRequest.BatchRequestBuilder
Builder pattern implementation used to construct instances of BatchRequest
.
See the Facebook Batch API documentation for more details on what a batch request looks like.
Constructor Summary | |
---|---|
BatchRequest.BatchRequestBuilder(String relativeUrl)
Creates a batch request builder using the provided FB endpoint. |
Method Summary | |
---|---|
BatchRequest.BatchRequestBuilder |
attachedFiles(String attachedFiles)
Sets the comma-delimited names of any attached files for this builder, for example "cat1, cat2" . |
BatchRequest.BatchRequestBuilder |
body(Parameter... parameters)
Sets the request body parameters for the request generated by this builder, for example Parameter.with("message", "Test status update") . |
BatchRequest |
build()
Generates an instance of BatchRequest . |
BatchRequest.BatchRequestBuilder |
dependsOn(String dependsOn)
Specifies if the request generated by this builder depends on the completion of another call in the current batch, for example "first" . |
BatchRequest.BatchRequestBuilder |
headers(BatchHeader... headers)
Sets the list of HTTP headers for the request generated by this builder. |
BatchRequest.BatchRequestBuilder |
method(String method)
Sets the HTTP method for the request generated by this builder, for example "POST" (GET is the
default value for this builder). |
BatchRequest.BatchRequestBuilder |
name(String name)
Sets the logical name for the request generated by this builder. |
BatchRequest.BatchRequestBuilder |
omitResponseOnSuccess(boolean omitResponseOnSuccess)
To make sure FB returns JSON in the event that this builder's request completes successfully, set this to false . |
BatchRequest.BatchRequestBuilder |
parameters(Parameter... parameters)
Specifies URL parameters for the request generated by this builder. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BatchRequest.BatchRequestBuilder(String relativeUrl)
You can explicitly specify URL parameters here, or use parameters(Parameter...)
instead if you prefer to
have the query string constructed programmatically.
relativeUrl
- The endpoint to hit, for example "me/friends"
.Method Detail |
---|
public BatchRequest.BatchRequestBuilder method(String method)
"POST"
(GET
is the
default value for this builder).
method
- The HTTP method.
public BatchRequest.BatchRequestBuilder name(String name)
name
- The logical name of the request generated by this builder.
public BatchRequest.BatchRequestBuilder headers(BatchHeader... headers)
headers
- The HTTP headers.
public BatchRequest.BatchRequestBuilder body(Parameter... parameters)
Parameter.with("message", "Test status update")
.
parameters
- The request body parameters.
public BatchRequest.BatchRequestBuilder attachedFiles(String attachedFiles)
"cat1, cat2"
.
attachedFiles
- The names of any attached files for this builder.
public BatchRequest.BatchRequestBuilder dependsOn(String dependsOn)
"first"
.
dependsOn
- A reference to another request in the batch that this builder's request depends on.
public BatchRequest.BatchRequestBuilder omitResponseOnSuccess(boolean omitResponseOnSuccess)
false
.
omitResponseOnSuccess
- Set this to false
to make sure FB returns JSON in the event that this builder's request
completes successfully,
public BatchRequest.BatchRequestBuilder parameters(Parameter... parameters)
parameters
- The URL parameters.
public BatchRequest build()
BatchRequest
.
BatchRequest
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |