Qiniu.Resource
Module to managing resource
Summary↑
batch(ops) | |
chgm(entry_uri, mime) | Change type(MIME type) of the entry |
copy(source_uri, dest_uri) | Copy one entry to another dest key |
delete(uri) | Delete an entry |
fetch(url, entry_uri) | Fetch resource from a url, and store it in your own bucket |
list(bucket, opts \\ []) | List resources in one bucket |
move(source_uri, dest_uri) | Move an entry to another dest |
prefetch(uri) | For the bucket which sets image storing, fetch resource from image source and store to this bucket. If the entry exists in this bucket, override the entry with the resource of image storing |
stat(entry_uri) | Get the metadata of the resource |
Functions
Change type(MIME type) of the entry
Fields
uri
- URI of the entry, “: “ mime
- MIME type to change
Copy one entry to another dest key
Fields
source_uri
- uri of your source entry, “: “ dest_uri
- uri of your dest entry, “: “
Delete an entry
Fields
uri
- uri of your entry to delete, “: “
Fetch resource from a url, and store it in your own bucket
Fields
url
- URL of the external resourceentry_uri
- URI of your entry, “: “
List resources in one bucket
Fields
bucket
- the bucket to list
Options
:limit
- Number to list(1~1000), default is 1000:prefix
- Prefix of resources to list, default is""
:delimiter
- Directory separator to list common prefix, default is""
:marker
- Marker of last request, which can act as starting point of this request, default is""
Move an entry to another dest
Fields
source_uri
- uri of your source entry, “: “ dest_uri
- uri of your dest entry, “: “
For the bucket which sets image storing, fetch resource from image source and store to this bucket. If the entry exists in this bucket, override the entry with the resource of image storing.
Fields
uri
- URI of destiny entry, “: “
Get the metadata of the resource
Fields
entry_uri
- uri of your resource entry, “: “