Class: BunBun::Client::PullZone
- Defined in:
- lib/bunbun/client/pull_zone.rb
Defined Under Namespace
Classes: EdgeRules
Instance Attribute Summary collapse
-
#edge_rules ⇒ Object
readonly
Returns the value of attribute edge_rules.
Instance Method Summary collapse
- #create(body_params) ⇒ Object
- #delete(id) ⇒ Object
- #get(id) ⇒ Object
-
#initialize(client) ⇒ PullZone
constructor
A new instance of PullZone.
- #list ⇒ Object
- #purge(id) ⇒ Object
- #update(id, body_params) ⇒ Object
Methods inherited from Namespace
Constructor Details
Instance Attribute Details
#edge_rules ⇒ Object (readonly)
Returns the value of attribute edge_rules.
20 21 22 |
# File 'lib/bunbun/client/pull_zone.rb', line 20 def edge_rules @edge_rules end |
Instance Method Details
#create(body_params) ⇒ Object
12 13 14 |
# File 'lib/bunbun/client/pull_zone.rb', line 12 def create(body_params) @client.post('/pullzone', BunBun::Body.transform_keys(body_params)) end |
#delete(id) ⇒ Object
16 17 18 |
# File 'lib/bunbun/client/pull_zone.rb', line 16 def delete(id) @client.delete("/pullzone/#{id}") end |
#get(id) ⇒ Object
22 23 24 |
# File 'lib/bunbun/client/pull_zone.rb', line 22 def get(id) @client.get("/pullzone/#{id}") end |
#list ⇒ Object
26 27 28 |
# File 'lib/bunbun/client/pull_zone.rb', line 26 def list @client.get('/pullzone') end |
#purge(id) ⇒ Object
30 31 32 |
# File 'lib/bunbun/client/pull_zone.rb', line 30 def purge(id) @client.post("/pullzone/#{id}/purgeCache") end |
#update(id, body_params) ⇒ Object
34 35 36 |
# File 'lib/bunbun/client/pull_zone.rb', line 34 def update(id, body_params) @client.post("/pullzone/#{id}", BunBun::Body.transform_keys(body_params)) end |