public class SauceRESTRequestBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_VERSION |
static String |
REST_URL |
| Constructor and Description |
|---|
SauceRESTRequestBuilder() |
| Modifier and Type | Method and Description |
|---|---|
SauceRESTRequestBuilder |
addGenericSuffix(String suffix)
Adds a string to the path.
|
SauceRESTRequestBuilder |
addJobIdToPath(String jobId)
Adds a job id to the path.
|
SauceRESTRequestBuilder |
addJobsToPath()
Adds standard "/jobs" section to constructed url.
|
SauceRESTRequestBuilder |
addJSON(String key,
Object value)
Adds an entry to the object map that will be serialized into JSON string in the
request.
|
SauceRESTRequestBuilder |
addUserIdToPath(String user)
Adds a user name to the path.
|
SauceRESTRequestBuilder |
addUsersToPath()
Adds standard "/users" section to constructed url.
|
SauceRESTRequest |
build()
Constructs the SauceRESTRequest object from combination of defaults and overrides.
|
SauceRESTRequestBuilder |
setHTTPMethod(String method) |
SauceRESTRequestBuilder |
setVersion(String version)
Sets the version ("v1" is the default).
|
public static final String REST_URL
public static final String DEFAULT_VERSION
public SauceRESTRequestBuilder addJSON(String key, Object value)
key - String key for the json object.value - Value can be discrete or a list, map.public SauceRESTRequestBuilder setHTTPMethod(String method)
public SauceRESTRequestBuilder addUsersToPath()
public SauceRESTRequestBuilder addUserIdToPath(String user)
user - A Sauce Labs user name.public SauceRESTRequestBuilder addJobsToPath()
public SauceRESTRequestBuilder addJobIdToPath(String jobId)
public SauceRESTRequestBuilder addGenericSuffix(String suffix)
suffix - Any string to add to the constructed path.public SauceRESTRequestBuilder setVersion(String version)
version - The version of the REST api in the path.public SauceRESTRequest build()
Copyright © 2015 Dev9, LLC.. All rights reserved.