// Get looks up a phone number using Plivo Lookup API.
Get looks up a phone number using Plivo Lookup API.
// Get looks up a phone number using Plivo Lookup API .
func (s *LookupService) Get(number string, params LookupParams) (*LookupResponse, error) {
	if params.Type == "" {
		params.Type = "carrier"
	}
	req, err := s.client.BaseClient.NewRequest("GET", params, "v1/Number/%s", number)
	if err != nil {
		return nil, err
	}
	resp := new(LookupResponse)
	if err := s.client.ExecuteRequest(req, resp, map[string]interface{}{
		"is_lookup_request": true,
	}); err != nil {
		return nil, s.newError(err.Error())
	}
	return resp, nil
}
func ( s * LookupService ) Get ( number string , params LookupParams ) ( * LookupResponse , error ) { if params . Type == " " { params . Type = " " } req , err := s . client . BaseClient . NewRequest ( " " , params , " " , number ) if err != nil { return nil , err } resp := new ( LookupResponse ) if err := s . client . ExecuteRequest ( req , resp , map [ string ] interface { } { " " : true , } ) ; err != nil { return nil , s . newError ( err . Error ( ) ) } return resp , nil }
Get looks up a phone number using Plivo Lookup API.
Get looks up a phone number using Plivo Lookup API .