enconnect.instagram package#
Subpackages#
Submodules#
enconnect.instagram.instagram module#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enconnect.instagram.instagram.Instagram(params: InstagramParams)[source]#
Bases:
object
Interact with the cloud service API with various methods.
- Parameters:
params – Parameters used to instantiate the class.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- latest() list[InstagramMedia] [source]#
Return the posts from the account associated with user.
- Returns:
Posts from the account associated with user.
- async latest_async() list[InstagramMedia] [source]#
Return the posts from the account associated with user.
- Returns:
Posts from the account associated with user.
- latest_block() list[InstagramMedia] [source]#
Return the posts from the account associated with user.
- Returns:
Posts from the account associated with user.
- async media_async(unique: int | str) InstagramMedia [source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- media_block(unique: int | str) InstagramMedia [source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- property params: InstagramParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- async request_async(method: Literal['get'], path: str, params: dict[str, Any] | 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.
- Returns:
Response from upstream request to the server.
- request_block(method: Literal['get'], path: str, params: dict[str, Any] | 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.
- Returns:
Response from upstream request to the server.
enconnect.instagram.models module#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- pydantic model enconnect.instagram.models.InstagramMedia[source]#
Bases:
BaseModel
Contains information returned from the upstream response.
Show JSON schema
{ "title": "InstagramMedia", "description": "Contains information returned from the upstream response.", "type": "object", "properties": { "caption": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Caption" }, "id": { "description": "Value from the server response", "title": "Id", "type": "string" }, "shared": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Shared" }, "type": { "description": "Value from the server response", "title": "Type", "type": "string" }, "location": { "description": "Value from the server response", "title": "Location", "type": "string" }, "permalink": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Permalink" }, "thumbnail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Thumbnail" }, "timestamp": { "description": "Value from the server response", "title": "Timestamp", "type": "string" }, "username": { "description": "Value from the server response", "title": "Username", "type": "string" } }, "additionalProperties": true, "required": [ "id", "type", "location", "timestamp", "username" ] }
- Config:
extra: str = allow
- Fields:
- field caption: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field id: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field location: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field permalink: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
Value from the server response
- field thumbnail: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field timestamp: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
enconnect.instagram.params module#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- pydantic model enconnect.instagram.params.InstagramParams[source]#
Bases:
BaseModel
Process and validate the class configuration parameters.
Show JSON schema
{ "title": "InstagramParams", "description": "Process and validate the class configuration parameters.", "type": "object", "properties": { "timeout": { "default": 30, "description": "Timeout connecting to server", "maximum": 300, "minimum": 1, "title": "Timeout", "type": "integer" }, "token": { "description": "Parameter for the integration", "minLength": 1, "title": "Token", "type": "string" }, "ssl_verify": { "default": true, "description": "Verify the ceritifcate valid", "title": "Ssl Verify", "type": "boolean" }, "ssl_capem": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Verify the ceritifcate valid", "title": "Ssl Capem" } }, "additionalProperties": false, "required": [ "token" ] }
- Config:
extra: str = forbid
- Fields:
- field ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])] = None#
Verify the ceritifcate valid
- Constraints:
min_length = 1
- field ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')] = True#
Verify the ceritifcate valid
Module contents#
Functions and routines associated with Enasis Network Remote Connect.
This file is part of Enasis Network software eco-system. Distribution is permitted, for more information consult the project license file.
- class enconnect.instagram.Instagram(params: InstagramParams)[source]#
Bases:
object
Interact with the cloud service API with various methods.
- Parameters:
params – Parameters used to instantiate the class.
- property client: HTTPClient#
Return the value for the attribute from class instance.
- Returns:
Value for the attribute from class instance.
- latest() list[InstagramMedia] [source]#
Return the posts from the account associated with user.
- Returns:
Posts from the account associated with user.
- async latest_async() list[InstagramMedia] [source]#
Return the posts from the account associated with user.
- Returns:
Posts from the account associated with user.
- latest_block() list[InstagramMedia] [source]#
Return the posts from the account associated with user.
- Returns:
Posts from the account associated with user.
- async media_async(unique: int | str) InstagramMedia [source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- media_block(unique: int | str) InstagramMedia [source]#
Return the specific content within the social platform.
- Parameters:
unique – Unique identifier within social platform.
- Returns:
Specific content within the social platform.
- property params: InstagramParams#
Return the Pydantic model containing the configuration.
- Returns:
Pydantic model containing the configuration.
- async request_async(method: Literal['get'], path: str, params: dict[str, Any] | 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.
- Returns:
Response from upstream request to the server.
- request_block(method: Literal['get'], path: str, params: dict[str, Any] | 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.
- Returns:
Response from upstream request to the server.
- pydantic model enconnect.instagram.InstagramMedia[source]#
Bases:
BaseModel
Contains information returned from the upstream response.
Show JSON schema
{ "title": "InstagramMedia", "description": "Contains information returned from the upstream response.", "type": "object", "properties": { "caption": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Caption" }, "id": { "description": "Value from the server response", "title": "Id", "type": "string" }, "shared": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Shared" }, "type": { "description": "Value from the server response", "title": "Type", "type": "string" }, "location": { "description": "Value from the server response", "title": "Location", "type": "string" }, "permalink": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Permalink" }, "thumbnail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Value from the server response", "title": "Thumbnail" }, "timestamp": { "description": "Value from the server response", "title": "Timestamp", "type": "string" }, "username": { "description": "Value from the server response", "title": "Username", "type": "string" } }, "additionalProperties": true, "required": [ "id", "type", "location", "timestamp", "username" ] }
- Config:
extra: str = allow
- Fields:
- field caption: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field id: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field location: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- field permalink: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
Value from the server response
- field thumbnail: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Value from the server response')] = None#
Value from the server response
- field timestamp: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Value from the server response')] [Required]#
Value from the server response
- pydantic model enconnect.instagram.InstagramParams[source]#
Bases:
BaseModel
Process and validate the class configuration parameters.
Show JSON schema
{ "title": "InstagramParams", "description": "Process and validate the class configuration parameters.", "type": "object", "properties": { "timeout": { "default": 30, "description": "Timeout connecting to server", "maximum": 300, "minimum": 1, "title": "Timeout", "type": "integer" }, "token": { "description": "Parameter for the integration", "minLength": 1, "title": "Token", "type": "string" }, "ssl_verify": { "default": true, "description": "Verify the ceritifcate valid", "title": "Ssl Verify", "type": "boolean" }, "ssl_capem": { "anyOf": [ { "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "Verify the ceritifcate valid", "title": "Ssl Capem" } }, "additionalProperties": false, "required": [ "token" ] }
- Config:
extra: str = forbid
- Fields:
- field ssl_capem: Annotated[str | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Verify the ceritifcate valid', metadata=[MinLen(min_length=1)])] = None#
Verify the ceritifcate valid
- Constraints:
min_length = 1
- field ssl_verify: Annotated[bool, FieldInfo(annotation=NoneType, required=False, default=True, description='Verify the ceritifcate valid')] = True#
Verify the ceritifcate valid