Skip to content

Elixir package for the KeyCDN API

Notifications You must be signed in to change notification settings

alexandrubagu/keycdn_ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeyCDN

TODO: Add description

Installation

If available in Hex, the package can be installed by adding keycdn to your list of dependencies in mix.exs:

def deps do
  [
    {:keycdn, "~> 0.1.0"}
  ]
end

Usage:

Returns all zones

  iex> client = KeyCDN.Client.new(<API_KEY>)
  iex> KeyCDN.list_zones(client)

Returns a specific zone

  iex> client = KeyCDN.Client.new(<API_KEY>)
  iex> KeyCDN.list_zones(client, <zone_id>)

Creates a zone

  iex> client = KeyCDN.Client.new(<API_KEY>)
  iex> KeyCDN.add_zone(client, %{name: "x", type: "push", ...})

Updates a specific zone

  iex> client = KeyCDN.Client.new(<API_KEY>)
  iex> KeyCDN.list_zones(client, <zone_id>, %{name: "x", type: "push", ...})

Deletes a specific zone

  iex> client = KeyCDN.Client.new(<API_KEY>)
  iex> KeyCDN.delete_zone(client, <zone_id>)

Purge zone cache

  iex> client = KeyCDN.Client.new(<API_KEY>)
  iex> KeyCDN.purge_zone_cache(client, <zone_id>)

Purge zone urls

  iex> client = KeyCDN.Client.new(<API_KEY>)
  iex> KeyCDN.purge_zone_url(client, <zone_id>, [
    "example.com/style.css",
    "example.com/image.png"
  ])

About

Elixir package for the KeyCDN API

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages