Package com.restfb.batch
Klasse BatchRequest.BatchRequestBuilder
java.lang.Object
com.restfb.batch.BatchRequest.BatchRequestBuilder
- Umschließende Klasse:
BatchRequest
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.
- Seit:
- 1.6.5
- Autor:
- Mark Allen
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungBatchRequestBuilder
(String relativeUrl) Creates a batch request builder using the provided FB endpoint. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungattachedFiles
(String attachedFiles) Sets the comma-delimited names of any attached files for this builder, for example"cat1, cat2"
.Sets the request body parameters for the request generated by this builder, for exampleParameter.with("message", "Test status update")
.build()
Generates an instance ofBatchRequest
.Specifies if the request generated by this builder depends on the completion of another call in the current batch, for example"first"
.headers
(BatchHeader... headers) Sets the list of HTTP headers for the request generated by this builder.Sets the HTTP method for the request generated by this builder, for example"POST"
(GET
is the default value for this builder).Sets the logical name for the request generated by this builder.omitResponseOnSuccess
(boolean omitResponseOnSuccess) To make sure FB returns JSON in the event that this builder's request completes successfully, set this tofalse
.parameters
(Parameter... parameters) Specifies URL parameters for the request generated by this builder.
-
Konstruktordetails
-
BatchRequestBuilder
Creates a batch request builder using the provided FB endpoint.You can explicitly specify URL parameters here, or use
parameters(Parameter...)
instead if you prefer to have the query string constructed programmatically.- Parameter:
relativeUrl
- The endpoint to hit, for example"me/friends"
.
-
-
Methodendetails
-
method
Sets the HTTP method for the request generated by this builder, for example"POST"
(GET
is the default value for this builder).- Parameter:
method
- The HTTP method.- Gibt zurück:
- This builder.
-
name
Sets the logical name for the request generated by this builder. Useful for specifying dependencies between operations - the generated request can be referenced by name.- Parameter:
name
- The logical name of the request generated by this builder.- Gibt zurück:
- This builder.
-
headers
Sets the list of HTTP headers for the request generated by this builder.- Parameter:
headers
- The HTTP headers.- Gibt zurück:
- This builder.
-
body
Sets the request body parameters for the request generated by this builder, for exampleParameter.with("message", "Test status update")
.- Parameter:
parameters
- The request body parameters.- Gibt zurück:
- This builder.
-
attachedFiles
Sets the comma-delimited names of any attached files for this builder, for example"cat1, cat2"
.- Parameter:
attachedFiles
- The names of any attached files for this builder.- Gibt zurück:
- This builder.
-
dependsOn
Specifies if the request generated by this builder depends on the completion of another call in the current batch, for example"first"
.- Parameter:
dependsOn
- A reference to another request in the batch that this builder's request depends on.- Gibt zurück:
- This builder.
-
omitResponseOnSuccess
To make sure FB returns JSON in the event that this builder's request completes successfully, set this tofalse
.- Parameter:
omitResponseOnSuccess
- Set this tofalse
to make sure FB returns JSON in the event that this builder's request completes successfully,- Gibt zurück:
- This builder.
-
parameters
Specifies URL parameters for the request generated by this builder.- Parameter:
parameters
- The URL parameters.- Gibt zurück:
- This builder.
-
build
Generates an instance ofBatchRequest
.- Gibt zurück:
- An instance of
BatchRequest
.
-