Skip to content

Commit

Permalink
Add webhooks docs to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalumickas committed Jun 7, 2017
1 parent c2f45c9 commit 88e6354
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [Fields](fields.md)
* [Groups](groups.md)
* [Subscribers](subscribers.md)
* [Webhooks](webhooks.md)

## How To

Expand Down
5 changes: 3 additions & 2 deletions examples/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ client.create_field(options)
## Update custom field in account

```ruby
client.update_field(id, { title: 'New title' })
client.update_field(id, title: 'New title')
```

##Remove custom field from account
## Remove custom field from account

```ruby
client.delete_field(id)
```
31 changes: 31 additions & 0 deletions examples/webhooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Webhooks

## Get all webhooks

```ruby
client.webhooks
```

## Get single webhook

```ruby
client.webhook(1)
```

## Create webhook

```ruby
client.create_webhook('example.com', 'event')
```

## Update webhook

```ruby
client.update_webhook(1, event: 'event')
```

## Remove webhook

```ruby
client.delete_webhook(1)
```

0 comments on commit 88e6354

Please sign in to comment.