| @@ 71-79 (lines=9) @@ | ||
| 68 | * |
|
| 69 | * @return \SevenShores\Hubspot\Http\Response |
|
| 70 | */ |
|
| 71 | public function all($startDate, $endDate, $params = []) |
|
| 72 | { |
|
| 73 | $endpoint = "https://api.hubapi.com/calendar/v1/events"; |
|
| 74 | $params = array_merge(compact('startDate', 'endDate'), $params); |
|
| 75 | ||
| 76 | $queryString = build_query_string($params); |
|
| 77 | ||
| 78 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 79 | } |
|
| 80 | ||
| 81 | /** |
|
| 82 | * Retrieve task events for Calendar. |
|
| @@ 94-102 (lines=9) @@ | ||
| 91 | * |
|
| 92 | * @return \SevenShores\Hubspot\Http\Response |
|
| 93 | */ |
|
| 94 | public function allTasks($startDate, $endDate, $params = []) |
|
| 95 | { |
|
| 96 | $endpoint = "https://api.hubapi.com/calendar/v1/events/task"; |
|
| 97 | $params = array_merge(compact('startDate', 'endDate'), $params); |
|
| 98 | ||
| 99 | $queryString = build_query_string($params); |
|
| 100 | ||
| 101 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 102 | } |
|
| 103 | ||
| 104 | /** |
|
| 105 | * Retrieve social events for Calendar. |
|
| @@ 117-125 (lines=9) @@ | ||
| 114 | * |
|
| 115 | * @return \SevenShores\Hubspot\Http\Response |
|
| 116 | */ |
|
| 117 | public function allSocialEvents($startDate, $endDate, $params = []) |
|
| 118 | { |
|
| 119 | $endpoint = "https://api.hubapi.com/calendar/v1/events/social"; |
|
| 120 | $params = array_merge(compact('startDate', 'endDate'), $params); |
|
| 121 | ||
| 122 | $queryString = build_query_string($params); |
|
| 123 | ||
| 124 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * List content events. |
|
| @@ 140-148 (lines=9) @@ | ||
| 137 | * |
|
| 138 | * @return \SevenShores\Hubspot\Http\Response |
|
| 139 | */ |
|
| 140 | public function allContentEvents($startDate, $endDate, $params = []) |
|
| 141 | { |
|
| 142 | $endpoint = "https://api.hubapi.com/calendar/v1/events/content"; |
|
| 143 | $params = array_merge(compact('startDate', 'endDate'), $params); |
|
| 144 | ||
| 145 | $queryString = build_query_string($params); |
|
| 146 | ||
| 147 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 148 | } |
|
| 149 | } |
|
| 150 | ||
| @@ 30-36 (lines=7) @@ | ||
| 27 | * |
|
| 28 | * @return \Psr\Http\Message\ResponseInterface|\SevenShores\Hubspot\Http\Response |
|
| 29 | */ |
|
| 30 | public function tableInfo($portalId, $tableId) { |
|
| 31 | $endpoint = 'https://api.hubapi.com/hubdb/api/v1/tables/'.$tableId; |
|
| 32 | ||
| 33 | $queryString = build_query_string(['portalId' => $portalId]); |
|
| 34 | ||
| 35 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Delete a table |
|
| @@ 93-100 (lines=8) @@ | ||
| 90 | * |
|
| 91 | * @return \Psr\Http\Message\ResponseInterface|\SevenShores\Hubspot\Http\Response |
|
| 92 | */ |
|
| 93 | public function rows($portalId, $tableId, array $params) |
|
| 94 | { |
|
| 95 | $endpoint = 'https://api.hubapi.com/hubdb/api/v1/tables/'.$tableId.'/rows'; |
|
| 96 | ||
| 97 | $queryString = build_query_string(array_merge(['portalId' => $portalId], $params)); |
|
| 98 | ||
| 99 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * @param int $tableId table ID |
|