Skip to content

Commit

Permalink
Add webhook api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklaw5 committed Aug 24, 2018
1 parent 2330ed8 commit 407c780
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ This project is a work in progress. Twitch has not finished all available endpoi
- [x] Get Users Follows
- [x] Update User
- [x] Get Videos
- [x] Get Webhook Subscriptions

## Usage

Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Usage Examples

Follow the links below to their respective usage examples:
Follow the links below to their respective API usage examples:

- [Analytics](analytics_docs.md)
- [Authentication](authentication_docs.md)
Expand All @@ -13,6 +13,7 @@ Follow the links below to their respective usage examples:
- [Streams](streams_docs.md)
- [Users](users_docs.md)
- [Videos](videos_docs.md)
- [Webhook Subscriptions](webhook_docs.md)

## Getting Started

Expand Down
24 changes: 24 additions & 0 deletions docs/webhook_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Webhook Documentation

## Get Webhook Subscriptions

This is an example of how to get webhook subscriptions.

```go
client, err := helix.NewClient(&helix.Options{
ClientID: "your-client-id",
AppAccessToken: "your-app-access-token",
})
if err != nil {
// handle error
}

resp, err := client.GetWebhookSubscriptions(&helix.WebhookSubscriptionsParams{
First: 10,
})
if err != nil {
// handle error
}

fmt.Printf("%+v\n", resp)
```

0 comments on commit 407c780

Please sign in to comment.