enconnect.reddit package#
Submodules#
enconnect.reddit.models module#
- class enconnect.reddit.models.RedditListing[source]#
Bases:
BaseModelContains information returned from the upstream response.
Fields# Field
Type
Required
Default
Yes
Yes
Yes
Yes
Yes
Yes
No
NoneYes
Yes
Yes
Yes
No
NoneYes
Yes
Yes
Yes
No
NoneYes
Yes
- name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- id: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- created: Annotated[int, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- title: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- selftext: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- author: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- url: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- permalink: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- url_dest: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- domain: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- medias: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- pinned: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- edited: Annotated[bool | float, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- stickied: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- archived: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- vote_downs: Annotated[int, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
enconnect.reddit.params module#
- class enconnect.reddit.params.RedditParams[source]#
Bases:
BaseModelProcess and validate the class configuration parameters.
Fields# Field
Type
Required
Default
Constraints
Yes
min_length=1
Yes
min_length=1
Yes
min_length=1
No
Nonemin_length=1
No
TrueNo
30ge=1, le=300
Yes
min_length=1
Yes
min_length=1
- timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
- username: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- password: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- client: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- secret: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- useragent: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
enconnect.reddit.reddit module#
- class enconnect.reddit.reddit.Reddit(params: RedditParams)[source]#
Bases:
objectInteract with the cloud service API with various methods.
- Parameters:
params – Parameters used to instantiate the class.
- property params: RedditParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property token: str | None#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- request_token_block() str[source]#
Establish new session obtaining token for authorization.
- Returns:
Access token used with authenticated requests.
- async request_token_async() str[source]#
Establish new session obtaining token for authorization.
- Returns:
Access token used with authenticated requests.
- request_block(method: Literal['get', 'post'], path: str, params: dict[str, Any] | None = None, data: dict[str, Any] | None = None, *, httpauth: tuple[str, str] | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
data – Optional dict payload included in request.
httpauth – Optional information for authentication.
- Returns:
Response from upstream request to the server.
- async request_async(method: Literal['get', 'post'], path: str, params: dict[str, Any] | None = None, data: dict[str, Any] | None = None, *, httpauth: tuple[str, str] | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
data – Optional dict payload included in request.
httpauth – Optional information for authentication.
- Returns:
Response from upstream request to the server.
- listing(unique: str) RedditListing[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- listing_block(unique: str) RedditListing[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- async listing_async(unique: str) RedditListing[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- latest(subred: str, params: dict[str, Any] | None = None) list[RedditListing][source]#
Return the new items within the provided subreddit path.
- Parameters:
subred – Path to subreddit containing the content.
params – Optional parameters included in request.
- Returns:
New items within the provided subreddit path.
- latest_block(subred: str, params: dict[str, Any] | None = None) list[RedditListing][source]#
Return the new items within the provided subreddit path.
- Parameters:
subred – Path to subreddit containing the content.
params – Optional parameters included in request.
- Returns:
New items within the provided subreddit path.
- async latest_async(subred: str, params: dict[str, Any] | None = None) list[RedditListing][source]#
Return the new items within the provided subreddit path.
- Parameters:
subred – Path to subreddit containing the content.
params – Optional parameters included in request.
- Returns:
New items within the provided subreddit path.
Module contents#
- class enconnect.reddit.Reddit(params: RedditParams)[source]#
Bases:
objectInteract with the cloud service API with various methods.
- Parameters:
params – Parameters used to instantiate the class.
- property params: RedditParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- property token: str | None#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- request_token_block() str[source]#
Establish new session obtaining token for authorization.
- Returns:
Access token used with authenticated requests.
- async request_token_async() str[source]#
Establish new session obtaining token for authorization.
- Returns:
Access token used with authenticated requests.
- request_block(method: Literal['get', 'post'], path: str, params: dict[str, Any] | None = None, data: dict[str, Any] | None = None, *, httpauth: tuple[str, str] | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
data – Optional dict payload included in request.
httpauth – Optional information for authentication.
- Returns:
Response from upstream request to the server.
- async request_async(method: Literal['get', 'post'], path: str, params: dict[str, Any] | None = None, data: dict[str, Any] | None = None, *, httpauth: tuple[str, str] | None = None) Response[source]#
Return the response for upstream request to the server.
- Parameters:
method – Method for operation with the API server.
path – Path for the location to upstream endpoint.
params – Optional parameters included in request.
data – Optional dict payload included in request.
httpauth – Optional information for authentication.
- Returns:
Response from upstream request to the server.
- listing(unique: str) RedditListing[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- listing_block(unique: str) RedditListing[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- async listing_async(unique: str) RedditListing[source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- latest(subred: str, params: dict[str, Any] | None = None) list[RedditListing][source]#
Return the new items within the provided subreddit path.
- Parameters:
subred – Path to subreddit containing the content.
params – Optional parameters included in request.
- Returns:
New items within the provided subreddit path.
- latest_block(subred: str, params: dict[str, Any] | None = None) list[RedditListing][source]#
Return the new items within the provided subreddit path.
- Parameters:
subred – Path to subreddit containing the content.
params – Optional parameters included in request.
- Returns:
New items within the provided subreddit path.
- async latest_async(subred: str, params: dict[str, Any] | None = None) list[RedditListing][source]#
Return the new items within the provided subreddit path.
- Parameters:
subred – Path to subreddit containing the content.
params – Optional parameters included in request.
- Returns:
New items within the provided subreddit path.
- class enconnect.reddit.RedditParams[source]#
Bases:
BaseModelProcess and validate the class configuration parameters.
Fields# Field
Type
Required
Default
Constraints
Yes
min_length=1
Yes
min_length=1
Yes
min_length=1
No
Nonemin_length=1
No
TrueNo
30ge=1, le=300
Yes
min_length=1
Yes
min_length=1
- timeout: Annotated[int, FieldInfo(annotation=NoneType, required=False, default=30, description='Timeout connecting to server', metadata=[Ge(ge=1), Le(le=300)])]#
- username: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- password: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- client: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- secret: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- useragent: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Parameter for the integration', metadata=[MinLen(min_length=1)])]#
- class enconnect.reddit.RedditListing[source]#
Bases:
BaseModelContains information returned from the upstream response.
Fields# Field
Type
Required
Default
Yes
Yes
Yes
Yes
Yes
Yes
No
NoneYes
Yes
Yes
Yes
No
NoneYes
Yes
Yes
Yes
No
NoneYes
Yes
- name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- id: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- created: Annotated[int, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- title: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- selftext: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- author: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- url: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- permalink: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- thumbnail: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- url_dest: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- domain: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- medias: Annotated[list[str] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')]#
- pinned: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- edited: Annotated[bool | float, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- stickied: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- archived: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#
- vote_downs: Annotated[int, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')]#