<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title> Bugzilla::User::APIKey</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" title="style" type="text/css" href="../.././../../../../style.css" media="all" > </head> <body id="pod"> <p class="backlinktop"><b><a name="___top" href="../../index.html" accesskey="1" title="All Documents"><<</a></b></p> <h1>Bugzilla::User::APIKey</h1> <div class='indexgroup'> <ul class='indexList indexList1'> <li class='indexItem indexItem1'><a href='#NAME'>NAME</a> <li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a> <li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a> <li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a> <ul class='indexList indexList2'> <li class='indexItem indexItem2'><a href='#Accessor_Methods'>Accessor Methods</a> </ul> </ul> </div> <h1><a class='u' href='#___top' title='click to go to top of document' name="NAME" >NAME</a></h1> <p>Bugzilla::User::APIKey - Model for an api key belonging to a user.</p> <h1><a class='u' href='#___top' title='click to go to top of document' name="SYNOPSIS" >SYNOPSIS</a></h1> <pre class="code"> use Bugzilla::User::APIKey; my $api_key = Bugzilla::User::APIKey->new($id); my $api_key = Bugzilla::User::APIKey->new({ name => $api_key }); # Class Functions $user_api_key = Bugzilla::User::APIKey->create({ description => $description, });</pre> <h1><a class='u' href='#___top' title='click to go to top of document' name="DESCRIPTION" >DESCRIPTION</a></h1> <p>This package handles Bugzilla User::APIKey.</p> <p><code class="code">Bugzilla::User::APIKey</code> is an implementation of <a href="../../Bugzilla/Object.html" class="podlinkpod" >Bugzilla::Object</a>, and thus provides all the methods of <a href="../../Bugzilla/Object.html" class="podlinkpod" >Bugzilla::Object</a> in addition to the methods listed below.</p> <h1><a class='u' href='#___top' title='click to go to top of document' name="METHODS" >METHODS</a></h1> <h2><a class='u' href='#___top' title='click to go to top of document' name="Accessor_Methods" >Accessor Methods</a></h2> <dl> <dt><a name="id" ><code class="code">id</code></a></dt> <dd> <p>The internal id of the api key.</p> <dt><a name="user" ><code class="code">user</code></a></dt> <dd> <p>The Bugzilla::User object that this api key belongs to.</p> <dt><a name="user_id" ><code class="code">user_id</code></a></dt> <dd> <p>The user id that this api key belongs to.</p> <dt><a name="api_key" ><code class="code">api_key</code></a></dt> <dd> <p>The API key, which is a random string.</p> <dt><a name="description" ><code class="code">description</code></a></dt> <dd> <p>An optional string that lets the user describe what a key is used for. For example: "Dashboard key", "Application X key".</p> <dt><a name="revoked" ><code class="code">revoked</code></a></dt> <dd> <p>If true, this api key cannot be used.</p> <dt><a name="last_used" ><code class="code">last_used</code></a></dt> <dd> <p>The date that this key was last used. undef if never used.</p> <dt><a name="update_last_used" ><code class="code">update_last_used</code></a></dt> <dd> <p>Updates the last used value to the current timestamp. This is updated even if the RPC call resulted in an error. It is not updated when the description or the revoked flag is changed.</p> <dt><a name="set_description" ><code class="code">set_description</code></a></dt> <dd> <p>Sets the new description</p> <dt><a name="set_revoked" ><code class="code">set_revoked</code></a></dt> <dd> <p>Sets the revoked flag</p> </dd> </dl> <p class="backlinkbottom"><b><a name="___bottom" href="../../index.html" title="All Documents"><<</a></b></p> <!-- end doc --> </body></html>