Skip to content

Commit

Permalink
added example for slack notification dev feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sleiman committed Jan 12, 2019
1 parent 89e7b44 commit 0f47a2a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/slack-notification.php
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);

0 comments on commit 0f47a2a

Please sign in to comment.