rbtools.api.resource.api_token¶
Resource definitions for API tokens.
Added in version 6.0.
Classes
|
Item resource for API tokens. |
|
List resource for API tokens. |
- class rbtools.api.resource.api_token.APITokenItemResource(transport: Transport, payload: JSONDict, url: str, token: str | None = None, **kwargs)[source]¶
Bases:
ItemResourceItem resource for API tokens.
This corresponds to Review Board’s API Token Resource.
Added in version 6.0.
- __firstlineno__ = 23¶
- __static_attributes__ = ()¶
- deprecated: bool¶
Whether the token is deprecated.
This will be
Trueif the token was generated by a deprecated token generator.
- expires: str | None¶
An optional field for the date and time that the token will expire.
This is in ISO-8601 format. The token will be invalid and unusable for authentication after this point.
- extra_data: ResourceExtraDataField¶
Extra data as part of the token.
- last_used: str | None¶
The date and time the token was last used, in ISO-8601 format.
If the token has never been used, this will be
None.
- policy: JSONDict¶
The access policies for the token.
- class rbtools.api.resource.api_token.APITokenListResource(transport: Transport, payload: JSONDict, url: str, token: str | None = None, item_mime_type: str | None = None, **kwargs)[source]¶
Bases:
ListResource[APITokenItemResource]List resource for API tokens.
This corresponds to Review Board’s API Token List Resource.
Added in version 6.0.
- __firstlineno__ = 91¶
- __static_attributes__ = ()¶