@Deprecated public class PersonalityInsights extends com.ibm.cloud.sdk.core.service.BaseService
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SERVICE_NAME
Deprecated.
|
static String |
DEFAULT_SERVICE_URL
Deprecated.
|
Constructor and Description |
---|
PersonalityInsights(String version)
Deprecated.
Constructs an instance of the `PersonalityInsights` client.
|
PersonalityInsights(String version,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Deprecated.
Constructs an instance of the `PersonalityInsights` client.
|
PersonalityInsights(String version,
String serviceName)
Deprecated.
Constructs an instance of the `PersonalityInsights` client.
|
PersonalityInsights(String version,
String serviceName,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Deprecated.
Constructs an instance of the `PersonalityInsights` client.
|
Modifier and Type | Method and Description |
---|---|
String |
getVersion()
Deprecated.
Gets the version.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Profile> |
profile(ProfileOptions profileOptions)
Deprecated.
Get profile.
|
com.ibm.cloud.sdk.core.http.ServiceCall<InputStream> |
profileAsCsv(ProfileOptions profileOptions)
Deprecated.
Get profile as csv.
|
void |
setVersion(String version)
Deprecated.
Sets the version.
|
public static final String DEFAULT_SERVICE_NAME
public static final String DEFAULT_SERVICE_URL
public PersonalityInsights(String version)
version
- Release date of the version of the API you want to use. Specify dates in
YYYY-MM-DD format. The current version is `2017-10-13`.public PersonalityInsights(String version, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
version
- Release date of the version of the API you want to use. Specify dates in
YYYY-MM-DD format. The current version is `2017-10-13`.authenticator
- the Authenticator
instance to be configured for this clientpublic PersonalityInsights(String version, String serviceName)
version
- Release date of the version of the API you want to use. Specify dates in
YYYY-MM-DD format. The current version is `2017-10-13`.serviceName
- the service name to be used when configuring the client instancepublic PersonalityInsights(String version, String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
version
- Release date of the version of the API you want to use. Specify dates in
YYYY-MM-DD format. The current version is `2017-10-13`.serviceName
- the service name to be used when configuring the client instanceauthenticator
- the Authenticator
instance to be configured for this clientpublic String getVersion()
Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is `2017-10-13`.
public void setVersion(String version)
version
- the new versionpublic com.ibm.cloud.sdk.core.http.ServiceCall<Profile> profile(ProfileOptions profileOptions)
Generates a personality profile for the author of the input text. The service accepts a maximum of 20 MB of input content, but it requires much less text to produce an accurate profile. The service can analyze text in Arabic, English, Japanese, Korean, or Spanish. It can return its results in a variety of languages.
**See also:** * [Requesting a profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#input) * [Providing sufficient input](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#sufficient)
### Content types
You can provide input content as plain text (`text/plain`), HTML (`text/html`), or JSON (`application/json`) by specifying the **Content-Type** parameter. The default is `text/plain`. * Per the JSON specification, the default character encoding for JSON content is effectively always UTF-8. * Per the HTTP specification, the default encoding for plain text and HTML is ISO-8859-1 (effectively, the ASCII character set).
When specifying a content type of plain text or HTML, include the `charset` parameter to indicate the character encoding of the input text; for example, `Content-Type: text/plain;charset=utf-8`.
**See also:** [Specifying request and response formats](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#formats)
### Accept types
You must request a response as JSON (`application/json`) or comma-separated values (`text/csv`) by specifying the **Accept** parameter. CSV output includes a fixed number of columns. Set the **csv_headers** parameter to `true` to request optional column headers for CSV output.
**See also:** * [Understanding a JSON profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-output#output) * [Understanding a CSV profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-outputCSV#outputCSV).
profileOptions
- the ProfileOptions
containing the options for the callServiceCall
with a result of type Profile
public com.ibm.cloud.sdk.core.http.ServiceCall<InputStream> profileAsCsv(ProfileOptions profileOptions)
Generates a personality profile for the author of the input text. The service accepts a maximum of 20 MB of input content, but it requires much less text to produce an accurate profile. The service can analyze text in Arabic, English, Japanese, Korean, or Spanish. It can return its results in a variety of languages.
**See also:** * [Requesting a profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#input) * [Providing sufficient input](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#sufficient)
### Content types
You can provide input content as plain text (`text/plain`), HTML (`text/html`), or JSON (`application/json`) by specifying the **Content-Type** parameter. The default is `text/plain`. * Per the JSON specification, the default character encoding for JSON content is effectively always UTF-8. * Per the HTTP specification, the default encoding for plain text and HTML is ISO-8859-1 (effectively, the ASCII character set).
When specifying a content type of plain text or HTML, include the `charset` parameter to indicate the character encoding of the input text; for example, `Content-Type: text/plain;charset=utf-8`.
**See also:** [Specifying request and response formats](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-input#formats)
### Accept types
You must request a response as JSON (`application/json`) or comma-separated values (`text/csv`) by specifying the **Accept** parameter. CSV output includes a fixed number of columns. Set the **csv_headers** parameter to `true` to request optional column headers for CSV output.
**See also:** * [Understanding a JSON profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-output#output) * [Understanding a CSV profile](https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-outputCSV#outputCSV).
profileOptions
- the ProfileOptions
containing the options for the callServiceCall
with a result of type String
Copyright © 2021 IBM Cloud. All rights reserved.