forked from sleiman/airtable-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added example for slack notification dev feature
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<? | ||
|
||
require 'vendor/autoload.php'; | ||
|
||
use \TANIOS\Airtable\Airtable; | ||
|
||
$airtable = new Airtable(array( | ||
'api_key' => 'API_KEY', | ||
'base' => 'BASE_ID', | ||
'slack_webhook' => 'SLACK_WEBHOOK_URL' // Get the URL here: https://api.slack.com/incoming-webhooks | ||
)); | ||
|
||
|
||
$images_array = array( | ||
array( | ||
'url' => 'IMAGE_URL' | ||
) | ||
); | ||
|
||
$update_contact_details = array( | ||
'Image' => $images_array // test by changing the field name to something that doesn't exist | ||
); | ||
|
||
$update_contact = $airtable->updateContent("Customers/{entry-id}",$update_contact_details); | ||
|
||
print_r($update_contact); |