Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
OSDI
Commits
352d4ca2
Commit
352d4ca2
authored
Sep 02, 2018
by
Andy Gu
Browse files
add separator and remove URL access
parent
1f0ea185
Changes
2
Hide whitespace changes
Inline
Side-by-side
importers/ActionNetworkContactImporter.php
View file @
352d4ca2
...
...
@@ -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
,
[
...
...
importers/CiviCRMContactImporter.php
View file @
352d4ca2
...
...
@@ -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
,
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment