Commit 352d4ca2 authored by Andy Gu's avatar Andy Gu
Browse files

add separator and remove URL access

parent 1f0ea185
......@@ -34,7 +34,7 @@ class ActionNetworkContactImporter extends AbstractContactImporter {
'Content-Type' => "application/json",
));
$this->entrypoint = new EntryPoint('/people', $this->client);
$this->entrypoint = new EntryPoint('', $this->client);
// Seed a client in Guzzle to craft raw queries.
$this->raw_client = new Client();
......@@ -47,8 +47,14 @@ class ActionNetworkContactImporter extends AbstractContactImporter {
*
*/
public function update_endpoint_data($date, $filter = NULL, $rule = NULL, $group = -1, $zone = 0) {
// figure out separator based on the CMS engine
$separator = "?";
if (strpos($this->endpoint, '?') !== false {
$separator = "&";
}
// TODO: sanitize this input later.
$query_string = "/people?filter=modified_date gt '" . $date . "'";
$query_string = $separator . "filter=modified_date gt '" . $date . "'";
$full_uri = $this->endpoint . $query_string;
$response = $this->raw_client->request('GET', $full_uri, [
......
......@@ -35,7 +35,7 @@ class CiviCRMContactImporter extends AbstractContactImporter {
'Content-Type' => "application/hal+json",
));
$this->entrypoint = new EntryPoint('/osdi/webhook', $this->client);
$this->entrypoint = new EntryPoint('', $this->client);
// Seed a client in Guzzle to craft raw queries.
$this->raw_client = new Client();
......@@ -48,8 +48,14 @@ class CiviCRMContactImporter extends AbstractContactImporter {
*
*/
public function update_endpoint_data($date, $filter = NULL, $rule = NULL, $group = -1, $zone = 0) {
// figure out separator based on the CMS engine
$separator = "?";
if (strpos($this->endpoint, '?') !== false {
$separator = "&";
}
// TODO: sanitize this input later.
$query_string = "/osdi/webhook?filter=modified_date gt '" . $date . "'";
$query_string = $separator . "filter=modified_date gt '" . $date . "'";
$full_uri = $this->endpoint . $query_string;
$response = $this->raw_client->request('GET', $full_uri, [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment