C# Класс UmbracoFlare.ApiControllers.CloudflareApiController

Наследование: Umbraco.Web.WebApi.UmbracoAuthorizedApiController
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CloudflareApiController ( ) : System
GetSSLStatus ( string zoneId ) : SslEnabledResponse

Gets the user details for the current users credentials in the config. This is useful to test if the credentials are valid.

GetUserDetails ( ) : UserDetails

Gets the user details for the current users credentials in the config. This is useful to test if the credentials are valid.

ListZones ( string name = null, bool throwExceptionOnFail = false ) : List

Call the cloudflare api to get a list of zones associated with this api key / account email combo. If you pass in a name (domain name), it will return that zone.

PurgeCache ( string zoneIdentifier, IEnumerable urls, bool purgeEverything = false, bool throwExceptionOnError = false ) : bool

This will call the Cloudflare api and will purge the individual pages or files given in the urls parameter.

Приватные методы

Метод Описание
AddRequestHeaders ( HttpRequestMessage request ) : void

Описание методов

CloudflareApiController() публичный Метод

public CloudflareApiController ( ) : System
Результат System

GetSSLStatus() публичный Метод

Gets the user details for the current users credentials in the config. This is useful to test if the credentials are valid.
public GetSSLStatus ( string zoneId ) : SslEnabledResponse
zoneId string
Результат UmbracoFlare.Models.SslEnabledResponse

GetUserDetails() публичный Метод

Gets the user details for the current users credentials in the config. This is useful to test if the credentials are valid.
public GetUserDetails ( ) : UserDetails
Результат UmbracoFlare.Models.UserDetails

ListZones() публичный Метод

Call the cloudflare api to get a list of zones associated with this api key / account email combo. If you pass in a name (domain name), it will return that zone.
public ListZones ( string name = null, bool throwExceptionOnFail = false ) : List
name string The domain name of the zone that you wish to get the info about. If you want all of them, leave it blank.
throwExceptionOnFail bool
Результат List

PurgeCache() публичный Метод

This will call the Cloudflare api and will purge the individual pages or files given in the urls parameter.
public PurgeCache ( string zoneIdentifier, IEnumerable urls, bool purgeEverything = false, bool throwExceptionOnError = false ) : bool
zoneIdentifier string This is the id of the zone you want to purge the urls from. Can be obtained through ListZones
urls IEnumerable The urls of the pages/files that you want to purge the cache for on cloudflare. If it is empty or null, the function will just return /// and no api call will be made.
purgeEverything bool If set to true, the urls will be ignored and we will purge everything.
throwExceptionOnError bool
Результат bool