Package com.vonage.client.insight
Class InsightClient
java.lang.Object
com.vonage.client.insight.InsightClient
A client for talking to the Vonage Number Insight API. The standard way to obtain an instance of this class is to use
VonageClient.getInsightClient().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAdvancedNumberInsight(AdvancedInsightRequest advancedInsightRequest) Perform an Advanced Insight Request with aAdvancedInsightRequest.getAdvancedNumberInsight(String number) Perform an Advanced Insight Request with a number.getAdvancedNumberInsight(String number, String country) Perform an Advanced Insight Request with a number and country.getBasicNumberInsight(BasicInsightRequest basicInsightRequest) Perform a Basic Insight Request with aBasicInsightRequest.getBasicNumberInsight(String number) Perform a Basic Insight Request with a number.getBasicNumberInsight(String number, String country) Perform a Basic Insight Request with a number and country.getStandardNumberInsight(StandardInsightRequest standardInsightRequest) Perform a Standard Insight Request with aStandardInsightRequest.getStandardNumberInsight(String number) Perform a Standard Insight Request with a number.getStandardNumberInsight(String number, String country) Perform a Standard Insight Request with a number and country.
-
Constructor Details
-
InsightClient
Constructor.- Parameters:
wrapper- (REQUIRED) shared HTTP wrapper object used for making REST calls.
-
-
Method Details
-
getBasicNumberInsight
public BasicInsightResponse getBasicNumberInsight(String number) throws VonageResponseParseException, VonageClientException Perform a Basic Insight Request with a number.- Parameters:
number- A single phone number that you need insight about in national or international format.- Returns:
- A
BasicInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-
getBasicNumberInsight
public BasicInsightResponse getBasicNumberInsight(String number, String country) throws VonageResponseParseException, VonageClientException Perform a Basic Insight Request with a number and country.- Parameters:
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.- Returns:
- A
BasicInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-
getBasicNumberInsight
public BasicInsightResponse getBasicNumberInsight(BasicInsightRequest basicInsightRequest) throws VonageResponseParseException, VonageClientException Perform a Basic Insight Request with aBasicInsightRequest.- Parameters:
basicInsightRequest- A request object containing the details of the request to make.- Returns:
- A
BasicInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-
getStandardNumberInsight
public StandardInsightResponse getStandardNumberInsight(String number) throws VonageResponseParseException, VonageClientException Perform a Standard Insight Request with a number.- Parameters:
number- A single phone number that you need insight about in national or international format.- Returns:
- A
StandardInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-
getStandardNumberInsight
public StandardInsightResponse getStandardNumberInsight(String number, String country) throws VonageResponseParseException, VonageClientException Perform a Standard Insight Request with a number and country.- Parameters:
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.- Returns:
- A
StandardInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-
getStandardNumberInsight
public StandardInsightResponse getStandardNumberInsight(StandardInsightRequest standardInsightRequest) throws VonageResponseParseException, VonageClientException Perform a Standard Insight Request with aStandardInsightRequest.- Parameters:
standardInsightRequest- A request object containing the details of the request to make.- Returns:
- A
StandardInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-
getAdvancedNumberInsight
public AdvancedInsightResponse getAdvancedNumberInsight(String number) throws VonageResponseParseException, VonageClientException Perform an Advanced Insight Request with a number.- Parameters:
number- A single phone number that you need insight about in national or international format.- Returns:
- A
AdvancedInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-
getAdvancedNumberInsight
public AdvancedInsightResponse getAdvancedNumberInsight(String number, String country) throws VonageResponseParseException, VonageClientException Perform an Advanced Insight Request with a number and country.- Parameters:
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.- Returns:
- A
AdvancedInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-
getAdvancedNumberInsight
public AdvancedInsightResponse getAdvancedNumberInsight(AdvancedInsightRequest advancedInsightRequest) throws VonageResponseParseException, VonageClientException Perform an Advanced Insight Request with aAdvancedInsightRequest.- Parameters:
advancedInsightRequest- A request object containing the details of the request to make.- Returns:
- A
AdvancedInsightResponserepresenting the response from the Vonage Number Insight API. - Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request or response objects.
-