socketry / cloudflare

An asynchronous Ruby wrapper for the CloudFlare V4 API.
138 stars 86 forks source link

[Feature] Add support for KV namespace write key value expiration and expiration_ttl #74

Open hnrqer opened 2 years ago

hnrqer commented 2 years ago

Looks like this isn't supported currently in the lib: https://api.cloudflare.com/#workers-kv-namespace-write-key-value-pair

Write a value identified by a key... Existing values and expirations will be overwritten. If neither expiration nor expiration_ttl is specified, the key-value pair will never expire. If both are set, expiration_ttl is used and expiration is ignored.

PUT accounts/:account_identifier/storage/kv/namespaces/:namespace_identifier/values/:key_name?expiration=:expiration&expiration_ttl=:expiration_tt