# Snippets

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetUpdateResponse">SnippetUpdateResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetListResponse">SnippetListResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetGetResponse">SnippetGetResponse</a>

Methods:

- <code title="put /zones/{zone_id}/snippets/{snippet_name}">client.Snippets.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, snippetName <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetUpdateParams">SnippetUpdateParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetUpdateResponse">SnippetUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/snippets">client.Snippets.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetListParams">SnippetListParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination#V4PagePaginationArray">V4PagePaginationArray</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetListResponse">SnippetListResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /zones/{zone_id}/snippets/{snippet_name}">client.Snippets.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, snippetName <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetDeleteParams">SnippetDeleteParams</a>) (\*<a href="https://pkg.go.dev/builtin#string">string</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/snippets/{snippet_name}">client.Snippets.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, snippetName <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetGetParams">SnippetGetParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#SnippetGetResponse">SnippetGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## Content

Methods:

- <code title="get /zones/{zone_id}/snippets/{snippet_name}/content">client.Snippets.Content.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#ContentService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, snippetName <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#ContentGetParams">ContentGetParams</a>) (\*http.Response, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## Rules

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleUpdateResponse">RuleUpdateResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleListResponse">RuleListResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleDeleteResponse">RuleDeleteResponse</a>

Methods:

- <code title="put /zones/{zone_id}/snippets/snippet_rules">client.Snippets.Rules.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleUpdateParams">RuleUpdateParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleUpdateResponse">RuleUpdateResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /zones/{zone_id}/snippets/snippet_rules">client.Snippets.Rules.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleListParams">RuleListParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleListResponse">RuleListResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /zones/{zone_id}/snippets/snippet_rules">client.Snippets.Rules.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleDeleteParams">RuleDeleteParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets">snippets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/snippets#RuleDeleteResponse">RuleDeleteResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
