Skip to content

Latest commit

 

History

History
287 lines (207 loc) · 11 KB

File metadata and controls

287 lines (207 loc) · 11 KB

cloudflare_dart.api.AccessCustomPagesApi

Load the API package

import 'package:cloudflare_dart/api.dart';

All URIs are relative to https://api.cloudflare.com/client/v4

Method HTTP request Description
accessCustomPagesCreateACustomPage POST /accounts/{account_id}/access/custom_pages Create a custom page
accessCustomPagesDeleteACustomPage DELETE /accounts/{account_id}/access/custom_pages/{custom_page_id} Delete a custom page
accessCustomPagesGetACustomPage GET /accounts/{account_id}/access/custom_pages/{custom_page_id} Get a custom page
accessCustomPagesListCustomPages GET /accounts/{account_id}/access/custom_pages List custom pages
accessCustomPagesUpdateACustomPage PUT /accounts/{account_id}/access/custom_pages/{custom_page_id} Update a custom page

accessCustomPagesCreateACustomPage

AccessSingleResponseWithoutHtml accessCustomPagesCreateACustomPage(accountId, accessCustomPage)

Create a custom page

Create a custom page

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getAccessCustomPagesApi();
final String accountId = accountId_example; // String | 
final AccessCustomPage accessCustomPage = ; // AccessCustomPage | 

try {
    final response = api.accessCustomPagesCreateACustomPage(accountId, accessCustomPage);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AccessCustomPagesApi->accessCustomPagesCreateACustomPage: $e\n');
}

Parameters

Name Type Description Notes
accountId String
accessCustomPage AccessCustomPage [optional]

Return type

AccessSingleResponseWithoutHtml

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accessCustomPagesDeleteACustomPage

AccessComponentsSchemasIdResponse accessCustomPagesDeleteACustomPage(customPageId, accountId)

Delete a custom page

Delete a custom page

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getAccessCustomPagesApi();
final String customPageId = customPageId_example; // String | 
final String accountId = accountId_example; // String | 

try {
    final response = api.accessCustomPagesDeleteACustomPage(customPageId, accountId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AccessCustomPagesApi->accessCustomPagesDeleteACustomPage: $e\n');
}

Parameters

Name Type Description Notes
customPageId String
accountId String

Return type

AccessComponentsSchemasIdResponse

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accessCustomPagesGetACustomPage

AccessCustomPagesComponentsSchemasSingleResponse accessCustomPagesGetACustomPage(customPageId, accountId)

Get a custom page

Fetches a custom page and also returns its HTML.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getAccessCustomPagesApi();
final String customPageId = customPageId_example; // String | 
final String accountId = accountId_example; // String | 

try {
    final response = api.accessCustomPagesGetACustomPage(customPageId, accountId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AccessCustomPagesApi->accessCustomPagesGetACustomPage: $e\n');
}

Parameters

Name Type Description Notes
customPageId String
accountId String

Return type

AccessCustomPagesComponentsSchemasSingleResponse

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accessCustomPagesListCustomPages

AccessCustomPagesComponentsSchemasResponseCollection accessCustomPagesListCustomPages(accountId, page, perPage)

List custom pages

List custom pages

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getAccessCustomPagesApi();
final String accountId = accountId_example; // String | 
final int page = 56; // int | 
final int perPage = 56; // int | 

try {
    final response = api.accessCustomPagesListCustomPages(accountId, page, perPage);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AccessCustomPagesApi->accessCustomPagesListCustomPages: $e\n');
}

Parameters

Name Type Description Notes
accountId String
page int [optional] [default to 1]
perPage int [optional] [default to 50]

Return type

AccessCustomPagesComponentsSchemasResponseCollection

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accessCustomPagesUpdateACustomPage

AccessSingleResponseWithoutHtml accessCustomPagesUpdateACustomPage(customPageId, accountId, accessCustomPage)

Update a custom page

Update a custom page

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getAccessCustomPagesApi();
final String customPageId = customPageId_example; // String | 
final String accountId = accountId_example; // String | 
final AccessCustomPage accessCustomPage = ; // AccessCustomPage | 

try {
    final response = api.accessCustomPagesUpdateACustomPage(customPageId, accountId, accessCustomPage);
    print(response);
} catch on DioException (e) {
    print('Exception when calling AccessCustomPagesApi->accessCustomPagesUpdateACustomPage: $e\n');
}

Parameters

Name Type Description Notes
customPageId String
accountId String
accessCustomPage AccessCustomPage [optional]

Return type

AccessSingleResponseWithoutHtml

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]