Commit 35b00eaa authored by Hervé Pita's avatar Hervé Pita
Browse files

Add tokenize Resource usage

parent 8e3f3991
......@@ -349,6 +349,10 @@ $stream->resources()
// Retrieve one resource by its URL
$resource = $client->resource($url)
//If you need to retrieve resource properties such as flavors or widgets with a token (if resource is protected)
$resource = $client->resource($url,['with-token' => true])
//Then resource properties like widget iframe or flavor uri will contain a token
// Publish
$resource = new Resource($file)
$resource = $client->push($resource, $stream)
......@@ -370,6 +374,7 @@ $resource->embed // Embed of the resource (immutable)
$resource->metadata // Array of metadata
$resource->usages // Collection of usages
$resource->widgets // Collection of widgets
$resource->flavors // Collection of flavors
// Usage of widgets
foreach ($resource->widgets as $embed) echo urldecode($embed);
......@@ -396,6 +401,4 @@ foreach ($resources as $resource)
License
-------
See LICENSE file.
See LICENSE file.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment