SunlightLobbyist::lobbyistSearch()

  • Description: A search method for retrieving lobbyists by name.
  • Arguments: Requires search which can be a fuzzy term associated with a lobbying company or individual.. The following optional arguments can be passed as well:
    • year – a 4-digit calendar year that restricts search results to the specified year. Default is the current calednar year.
    • threshold – A number used to determine “relevancy” of search results and associated with a point score. Default is 0.9
1
2
3
4
5
6
api_key = 'XXXXXXXXXXXX';

echo '<pre>';
print_r( $sf-&gt;lobbyistSearch( 'john bernstein', 2007) );
echo '</pre>';
?&gt;

Result:

1
2
3
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
stdClass Object
(
    [0] =&gt; stdClass Object
        (
            [result] =&gt; stdClass Object
                (
                    [score] =&gt; 1
                    [lobbyist] =&gt; stdClass Object
                        (
                            [registrant_name] =&gt; HALPRIN TEMPLE
                            [lastname] =&gt; BERNSTEIN
                            [filings] =&gt; Array
                                (
                                    [0] =&gt; B7E06AA3-D48E-4728-83D9-64C7F2B60ECF
                                    [1] =&gt; A4E570EF-0131-439E-8463-43D68D1C228F
                                    [2] =&gt; 3392E114-B99F-4488-B389-DF26143E8DE8
                                    [3] =&gt; 54487BFC-B1AA-4697-A883-B317E3365BC8
                                    [4] =&gt; B2492852-7F55-4A25-898E-D86507F95E08
                                )

                            [firstname] =&gt; JOEL
                        )

                )

        )

    [1] =&gt; stdClass Object
        (
            [result] =&gt; stdClass Object
                (
                    [score] =&gt; 1
                    [lobbyist] =&gt; stdClass Object
                        (
                            [registrant_name] =&gt; Bernstein Strategy Group
                            [lastname] =&gt; BERNSTEIN
                            [filings] =&gt; Array
                                (
                                    [0] =&gt; 24806C2F-667B-4C64-AF8A-EC374B4306E6
                                    [1] =&gt; 44172B25-03B4-4831-9457-781AD78B5551
                                    [2] =&gt; A2759A1C-DF15-4374-9240-2C302182D834
                                    [3] =&gt; 4AC26263-9B43-4FC5-9605-FF458952FF9F
                                    [4] =&gt; 28D2BA5E-B539-4211-BD8A-BCA8D3AEE6CF
                                    [5] =&gt; 24BC002C-EC2E-4B9C-9297-7F9B93BAD898
                                    [6] =&gt; 79DAF5B3-3444-4966-A5F1-844A647EB200
                                )

                            [firstname] =&gt; JON
                        )

                )

        )

)