Class: Tomba::Finder

Inherits:
Service show all
Defined in:
lib/tomba/services/finder.rb

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Tomba::Service

Instance Method Details

#author_finder(url:) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/tomba/services/finder.rb', line 38

def author_finder(url:)
    if url.nil?
        raise Tomba::Exception.new('Missing required parameter: "url"')
    end

    path = '/author-finder'

    params = {}

    if !url.nil?
        params[:url] = url
    end


    return @client.call('get', path, {
        'content-type' => 'application/json',
    }, params);
end

#email_finder(domain:, first_name:, last_name:) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/tomba/services/finder.rb', line 4

def email_finder(domain:, first_name:, last_name:)
    if domain.nil?
        raise Tomba::Exception.new('Missing required parameter: "domain"')
    end

    if first_name.nil?
        raise Tomba::Exception.new('Missing required parameter: "firstName"')
    end

    if last_name.nil?
        raise Tomba::Exception.new('Missing required parameter: "lastName"')
    end

    path = '/email-finder'

    params = {}

    if !domain.nil?
        params[:domain] = domain
    end

    if !first_name.nil?
        params[:first_name] = first_name
    end

    if !last_name.nil?
        params[:last_name] = last_name
    end

    return @client.call('get', path, {
        'content-type' => 'application/json',
    }, params);
end

#linkedin_finder(url:) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/tomba/services/finder.rb', line 57

def linkedin_finder(url:)
    if url.nil?
        raise Tomba::Exception.new('Missing required parameter: "url"')
    end

    path = '/linkedin-finder'

    params = {}

    if !url.nil?
        params[:url] = url
    end


    return @client.call('get', path, {
        'content-type' => 'application/json',
    }, params);
end

#phone_finder(email:) ⇒ Object



76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/tomba/services/finder.rb', line 76

def phone_finder(email:)
    if email.nil?
        raise Tomba::Exception.new('Missing required parameter: "email"')
    end

    path = '/phone/{email}'
        .gsub('{email}', email)

    params = {}

    return @client.call('get', path, {
        'content-type' => 'application/json',
    }, params);
end