Jump to >

reviewboard.webapi.models

class WebAPIToken(*args, **kwargs)[source]

Bases: djblets.webapi.models.BaseWebAPIToken

An access token used for authenticating with the API.

Each token can be used to authenticate the token’s owner with the API, without requiring a username or password to be provided. Tokens can be revoked, and new tokens added.

Tokens can store policy information, which will later be used for restricting access to the API.

local_site[source]

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

classmethod get_root_resource()[source]
get_extra_data_json()[source]
get_next_by_last_updated(**morekwargs)[source]
get_next_by_time_added(**morekwargs)[source]
get_policy_json()[source]
get_previous_by_last_updated(**morekwargs)[source]
get_previous_by_time_added(**morekwargs)[source]
id[source]

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

local_site_id[source]

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

set_extra_data_json(json)[source]
set_policy_json(json)[source]
user[source]

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.