1 | <?php |
||
24 | class PlaceClient extends AbstractClient |
||
25 | { |
||
26 | /** |
||
27 | * Returns the details of a place. |
||
28 | * |
||
29 | * @see https://developers.google.com/places/documentation/details |
||
30 | * @see https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1 |
||
31 | * |
||
32 | * @param string $placeid the place id |
||
33 | * @param string $language the language to return the results. Defaults to 'en' (english). |
||
34 | * @param array $params optional parameters |
||
35 | * |
||
36 | * @throws RequestException if the request fails |
||
37 | * |
||
38 | * @return mixed|null |
||
39 | */ |
||
40 | public function details($placeid, $language = 'en', $params = []) |
||
48 | |||
49 | /** |
||
50 | * Returns a photo content. |
||
51 | * |
||
52 | * @see https://developers.google.com/places/documentation/photos#place_photo_requests |
||
53 | * |
||
54 | * @param string $reference string identifier that uniquely identifies a photo. Photo references are returned from |
||
55 | * either a [[Search::text]], [[Search::nearby]], [[Search::radar]] or [[Place::details]] request. |
||
56 | * @param array $params optional parameters. |
||
57 | * |
||
58 | * @throws \InvalidArgumentException |
||
59 | * @throws RequestException if the request fails |
||
60 | * |
||
61 | * @return mixed|null |
||
62 | */ |
||
63 | public function photo($reference, $params = []) |
||
76 | |||
77 | /** |
||
78 | * Adds a place on Google's places database for your application. This function only works with JSON formats, that |
||
79 | * means that no matter what you set the [[$format]] to work with, it will be superseded by 'json' type. |
||
80 | * |
||
81 | * @see https://developers.google.com/places/documentation/actions#adding_a_place |
||
82 | * |
||
83 | * @param array $location The textual latitude/longitude value from which you wish to add new place information. |
||
84 | * @param string $name The full text name of the place. Limited to 255 characters. |
||
85 | * @param array $types The category in which this place belongs. |
||
86 | * @param string $accuracy The accuracy of the location signal on which this request is based, expressed in meters. |
||
87 | * @param string $language The language in which the place's name is being reported. |
||
88 | * @param array $params The extra recommended but not required parameters (ie address, phone_number, and website) |
||
89 | * |
||
90 | * @throws \InvalidArgumentException |
||
91 | * @throws RequestException if the request fails |
||
92 | * |
||
93 | * @return array |
||
94 | */ |
||
95 | public function add(array $location, $name, array $types, $accuracy, $language = 'en', array $params = []) |
||
119 | |||
120 | /** |
||
121 | * Deletes a place. A place can only be deleted if: |
||
122 | * - It was added by the same application as is requesting its deletion. |
||
123 | * - It has not successfully passed through the Google Maps moderation process, and and is therefore not visible to |
||
124 | * all applications. |
||
125 | * |
||
126 | * @param string $reference The textual identifier that uniquely identifies this place |
||
127 | * |
||
128 | * @throws RequestException if the request fails |
||
129 | * |
||
130 | * @return array |
||
131 | */ |
||
132 | public function delete($reference) |
||
143 | } |
||
144 |