public class InsightClient extends AbstractClient
NexmoClient.getInsightClient().| Modifier and Type | Field and Description |
|---|---|
protected com.nexmo.client.insight.AdvancedInsightEndpoint |
advanced |
protected com.nexmo.client.insight.BasicInsightEndpoint |
basic |
protected com.nexmo.client.insight.StandardInsightEndpoint |
standard |
httpWrapper| Constructor and Description |
|---|
InsightClient(HttpWrapper httpWrapper)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
AdvancedInsightResponse |
getAdvancedNumberInsight(AdvancedInsightRequest advancedInsightRequest)
Perform an Advanced Insight Request with a
AdvancedInsightRequest. |
AdvancedInsightResponse |
getAdvancedNumberInsight(java.lang.String number)
Perform an Advanced Insight Request with a number.
|
AdvancedInsightResponse |
getAdvancedNumberInsight(java.lang.String number,
java.lang.String country)
Perform an Advanced Insight Request with a number and country.
|
AdvancedInsightResponse |
getAdvancedNumberInsight(java.lang.String number,
java.lang.String country,
java.lang.String ipAddress)
Deprecated.
Create a
AdvancedInsightRequest and use getAdvancedNumberInsight(AdvancedInsightRequest) |
AdvancedInsightResponse |
getAdvancedNumberInsight(java.lang.String number,
java.lang.String country,
java.lang.String ipAddress,
boolean cnam)
Deprecated.
Create a
AdvancedInsightRequest and use getAdvancedNumberInsight(AdvancedInsightRequest) |
BasicInsightResponse |
getBasicNumberInsight(BasicInsightRequest basicInsightRequest)
Perform a Basic Insight Request with a
BasicInsightRequest. |
BasicInsightResponse |
getBasicNumberInsight(java.lang.String number)
Perform a Basic Insight Request with a number.
|
BasicInsightResponse |
getBasicNumberInsight(java.lang.String number,
java.lang.String country)
Perform a Basic Insight Request with a number and country.
|
StandardInsightResponse |
getStandardNumberInsight(StandardInsightRequest standardInsightRequest)
Perform a Standard Insight Request with a
StandardInsightRequest. |
StandardInsightResponse |
getStandardNumberInsight(java.lang.String number)
Perform a Standard Insight Request with a number.
|
StandardInsightResponse |
getStandardNumberInsight(java.lang.String number,
java.lang.String country)
Perform a Standard Insight Request with a number and country.
|
StandardInsightResponse |
getStandardNumberInsight(java.lang.String number,
java.lang.String country,
boolean cnam)
Deprecated.
Create a
StandardInsightRequest and use getStandardNumberInsight(StandardInsightRequest) |
protected com.nexmo.client.insight.BasicInsightEndpoint basic
protected com.nexmo.client.insight.StandardInsightEndpoint standard
protected com.nexmo.client.insight.AdvancedInsightEndpoint advanced
public InsightClient(HttpWrapper httpWrapper)
httpWrapper - (required) shared HTTP wrapper object used for making REST calls.public BasicInsightResponse getBasicNumberInsight(java.lang.String number) throws NexmoResponseParseException, NexmoClientException
number - A single phone number that you need insight about in national or international format.BasicInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.public BasicInsightResponse getBasicNumberInsight(java.lang.String number, java.lang.String country) throws NexmoResponseParseException, NexmoClientException
number - A single phone number that you need insight about in national or international formatcountry - If a number does not have a country code or it is uncertain, set the two-character country code.BasicInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.public BasicInsightResponse getBasicNumberInsight(BasicInsightRequest basicInsightRequest) throws NexmoResponseParseException, NexmoClientException
BasicInsightRequest.basicInsightRequest - A request object containing the details of the request to make.BasicInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.public StandardInsightResponse getStandardNumberInsight(java.lang.String number) throws NexmoResponseParseException, NexmoClientException
number - A single phone number that you need insight about in national or international format.StandardInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.public StandardInsightResponse getStandardNumberInsight(java.lang.String number, java.lang.String country) throws NexmoResponseParseException, NexmoClientException
number - A single phone number that you need insight about in national or international format.country - If a number does not have a country code or it is uncertain, set the two-character country code.StandardInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.@Deprecated public StandardInsightResponse getStandardNumberInsight(java.lang.String number, java.lang.String country, boolean cnam) throws NexmoResponseParseException, NexmoClientException
StandardInsightRequest and use getStandardNumberInsight(StandardInsightRequest)number - A single phone number that you need insight about in national or international format.country - If a number does not have a country code or it is uncertain, set the two-character country code.cnam - Indicates if the name of the person who owns the phone number should also be looked up and
returned. Set to true to receive phone number owner name in the response. This is only available
for US numbers and incurs an additional charge.StandardInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.public StandardInsightResponse getStandardNumberInsight(StandardInsightRequest standardInsightRequest) throws NexmoResponseParseException, NexmoClientException
StandardInsightRequest.standardInsightRequest - A request object containing the details of the request to make.StandardInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.public AdvancedInsightResponse getAdvancedNumberInsight(java.lang.String number) throws NexmoResponseParseException, NexmoClientException
number - A single phone number that you need insight about in national or international format.AdvancedInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.public AdvancedInsightResponse getAdvancedNumberInsight(java.lang.String number, java.lang.String country) throws NexmoResponseParseException, NexmoClientException
number - A single phone number that you need insight about in national or international format.country - If a number does not have a country code or it is uncertain, set the two-character country code.AdvancedInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.@Deprecated public AdvancedInsightResponse getAdvancedNumberInsight(java.lang.String number, java.lang.String country, java.lang.String ipAddress) throws NexmoResponseParseException, NexmoClientException
AdvancedInsightRequest and use getAdvancedNumberInsight(AdvancedInsightRequest)number - A single phone number that you need insight about in national or international format.country - If a number does not have a country code or it is uncertain, set the two-character country
code.ipAddress - The IP address of the user. If supplied, we will compare this to the country the user's phone is
located in and return an error if it does not match.AdvancedInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.@Deprecated public AdvancedInsightResponse getAdvancedNumberInsight(java.lang.String number, java.lang.String country, java.lang.String ipAddress, boolean cnam) throws NexmoResponseParseException, NexmoClientException
AdvancedInsightRequest and use getAdvancedNumberInsight(AdvancedInsightRequest)number - A single phone number that you need insight about in national or international format.country - If a number does not have a country code or it is uncertain, set the two-character country
code.ipAddress - The IP address of the user. If supplied, we will compare this to the country the user's phone is
located in and return an error if it does not match.cnam - Indicates if the name of the person who owns the phone number should also be looked up and
returned. Set to true to receive phone number owner name in the response. This is only available
for US numbers and incurs an additional charge.AdvancedInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.public AdvancedInsightResponse getAdvancedNumberInsight(AdvancedInsightRequest advancedInsightRequest) throws NexmoResponseParseException, NexmoClientException
AdvancedInsightRequest.advancedInsightRequest - A request object containing the details of the request to make.AdvancedInsightResponse representing the response from the Nexmo Number Insight API.NexmoResponseParseException - if the response from the API could not be parsed.NexmoClientException - if there was a problem with the Nexmo request or response objects.