lib/fastly.rb in fastly-1.11.0 vs lib/fastly.rb in fastly-1.12.0
- old
+ new
@@ -27,10 +27,12 @@
require 'fastly/papertrail_logging'
require 'fastly/request_setting'
require 'fastly/response_object'
require 'fastly/service'
require 'fastly/settings'
+require 'fastly/snippet'
+require 'fastly/dynamic_snippet'
require 'fastly/syslog'
require 'fastly/s3_logging'
require 'fastly/gcs_logging'
require 'fastly/user'
require 'fastly/vcl'
@@ -144,11 +146,11 @@
# Fetches the list of codes for regions that are covered by the Fastly CDN service.
def regions
client.get_stats('/stats/regions')
end
- [ACL, ACLEntry, User, Customer, Backend, CacheSetting, Condition, Dictionary, DictionaryItem, Director, Domain, Header, Healthcheck, Gzip, Match, PapertrailLogging, RequestSetting, ResponseObject, Service, S3Logging, Syslog, VCL, Version].each do |klass|
+ [ACL, ACLEntry, User, Customer, Backend, CacheSetting, Condition, Dictionary, DictionaryItem, Director, Domain, Header, Healthcheck, Gzip, Match, PapertrailLogging, RequestSetting, ResponseObject, Service, Snippet, S3Logging, Syslog, VCL, Version].each do |klass|
type = Util.class_to_path(klass)
if klass.respond_to?(:pluralize)
plural = klass.pluralize
else
@@ -315,10 +317,14 @@
##
# :method: get_vcl(service_id, number, name)
# Get a VCL
##
+ # :method: get_snippet(service_id, number, name)
+ # Get a VCL snippet
+
+ ##
# :method: get_version(service_id, number, name)
# Get a Version
##
# :method: get_settings(service_id, number, name)
@@ -427,10 +433,15 @@
# :method: update_vcl(vcl)
# You can also call
# vcl.save!
##
+ # :method: update_snippet(snippet)
+ # You can also call
+ # snippet.save!
+
+ ##
# :method: update_cache_setting(cache_setting)
# You can also call
# cache_setting.save!
##
@@ -537,10 +548,15 @@
# :method: delete_vcl(vcl)
# You can also call
# vcl.delete!
##
+ # :method: delete_snippet(snippet)
+ # You can also call
+ # snippet.delete!
+
+ ##
# :method: delete_cache_setting(cache_setting)
# You can also call
# cache_setting.delete!
##
@@ -622,9 +638,13 @@
# Get a list of all syslogs
# :method: list_vcls(:service_id => service.id, :version => version.number)
#
# Get a list of all vcls
+
+ # :method: list_snippets(:service_id => service.id, :version => version.number)
+ #
+ # Get a list of all vcl snippets
# :method: list_conditions(:service_id => service.id, :version => version.number)
#
# Get a list of all conditions