-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "tonic-textual" | ||
version = "3.0.1" | ||
version = "3.0.2" | ||
description = "Wrappers around the Tonic Textual API" | ||
authors = ["Adam Kamor <[email protected]>", "Joe Ferrara <[email protected]>", "Ander Steele <[email protected]>", "Ethan Philpott <[email protected]>", "Lyon Van Voorhis <[email protected]>", "Kirill Medvedev <[email protected]>", "Travis Matthews <[email protected]>"] | ||
license = "MIT" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "3.0.1" | ||
__version__ = "3.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from typing import List, Optional | ||
|
||
|
||
class RecordApiRequestOptions(dict): | ||
""" | ||
Class to denote if an API request should be recorded. | ||
Parameters | ||
---------- | ||
record : bool | ||
Indicates whether the request should be recorded. | ||
retention_time_in_hours: int | ||
The number of hours to store the request. Afterwards, the request is automatically purged.. | ||
tags : Optional[List[str]] | ||
An optional list of tags to use for the request. Makes searching for requests in the UI easier. | ||
""" | ||
def __init__(self, record: bool, retention_time_in_hours: int, tags: Optional[List[str]] = []): | ||
self.record = record | ||
self.retention_time_in_hours = retention_time_in_hours | ||
self.tags = tags | ||
|
||
dict.__init__( | ||
self, | ||
record=record, | ||
retention_time_in_hours=retention_time_in_hours, | ||
tags = tags | ||
) | ||
|
||
def to_dict(self): | ||
return { | ||
"record": self.record, | ||
"retention_time_in_hours": self.retention_time_in_hours, | ||
"tags": self.tags, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters