NAME
CloudApp::REST::Item - Base class for all items
SYNOPSIS
This is the base class (a Moose role) for all items. You cannot instantiate CloudApp::REST::Item, so use this as a reference of common attributes and methods.
ATTRIBUTES
Following attributes are valid for every CloudApp::REST::Item::*
instance:
id
The unique id of the CloudApp item.
view_counter
The current view count.
owner_id
The internal CloudApp owner ID.
item_type
The type of the item.
name
The given name of the item.
private_slug
This is the part of the URL after http://cl.ly/
, eg. TtS
for http://cl.ly/TtS
, if this item is private.
public_slug
This is the part of the URL after http://cl.ly/
, eg. 58c212593ebb890ebe1f
for http://cl.ly/58c212593ebb890ebe1f
, if this item is public.
slug
Returns the slug, no matter if it is private or public.
content_url
This is the URL of the content, eg. the file itself.
icon
The URL to the item icon at CloudApp.
href
The private URL to the item at CloudApp.
url
The public short URL to the item at CloudApp.
created_at
The date when this item was uploaded to/created at CloudApp. Returns a DateTime object.
updated_at
The date when this item was updated at CloudApp. If set, returns a DateTime object.
deleted_at
The date when this item was deleted at CloudApp. If set, returns a DateTime object.
SUBROUTINES/METHODS
Following methods are inherited by every CloudApp::REST::Item::*
module:
delete
Deletes the current item at CloudApp. The item instance can be used after deleting as long as the instance won't go out of scope, but won't be updated automatically. CloudApp moves this item to the trash after detelion.
Dies if the item is "strip"ed.
strip
Removes the reference to CloudApp::REST.
As long as an item is not stripped, every item instance contains a reference to the API instance, which may also contain the credentials of the user in cleartext! Strip an item before you pass it along to someone else to prevent unwanted or unauthorized reading of the users data!
SEE ALSO
CloudApp::REST::Item::Bookmark
AUTHOR
Matthias Dietrich, <perl@rainboxx.de>
LICENSE AND COPYRIGHT
Copyright 2010 Matthias Dietrich.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.