site
konigle.managers.website.site
¶
AsyncWebsiteManager
¶
Bases: BaseSiteManager, BaseAsyncManager
Async Manager for managing website related information and settings
add_url(pathname, url_type='page')
async
¶
Add URL to the website. This creates nested folders as needed. Args: pathname (str): The pathname to add. Returns: dict: Containing type of page and the ID.
get()
async
¶
Get a specific for the current site.
get_business_info()
async
¶
Get the business information content.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The business information content as markdown.
TYPE:
|
get_design_system()
async
¶
Get the design system content.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The design system content as markdown.
TYPE:
|
get_northstar()
async
¶
Get the business northstar content.
The northstar includes business information, branding, tone, goals, target audience etc.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The business northstar content as markdown.
TYPE:
|
get_robots_txt()
async
¶
Get the content of the robots.txt file for the website.
get_settings(site_id=None)
async
¶
Get website settings.
get_url(pathname, version=None)
async
¶
Get URL details from the website. Args: pathname (str): The pathname to get. version: Page version Returns: dict: Containing type of page and the ID.
get_website_info()
async
¶
Get the website information content.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The website information content as markdown.
TYPE:
|
search_urls(query, types=None, limit=None, path=None)
async
¶
Search URLs from the website. Args: query (str): The search query string. types (ContentType, optional): Filter results by content type. If None, search across all content types. Defaults to None. limit (int, optional): Maximum number of results to return. path (str, optional): The base path to search under. If None, search the entire site. Defaults to None. Returns: dict: Search results containing matching URLs and their details.
set_business_info(info)
async
¶
Set the business information content.
| PARAMETER | DESCRIPTION |
|---|---|
info
|
The business information content as markdown.
TYPE:
|
set_design_system(info)
async
¶
Set the design system content.
| PARAMETER | DESCRIPTION |
|---|---|
info
|
The design system content as markdown.
TYPE:
|
set_northstar(content)
async
¶
Set the business northstar content.
The northstar includes business information, branding, tone, goals, target audience etc.
| PARAMETER | DESCRIPTION |
|---|---|
content
|
The business northstar content as markdown.
TYPE:
|
set_robots_txt(content)
async
¶
Set the content of the robots.txt file for the website.
set_settings(settings)
async
¶
Set website settings. Refer to get_settings response for schema
set_website_info(info)
async
¶
Set the website information content.
| PARAMETER | DESCRIPTION |
|---|---|
info
|
The website information content as markdown.
TYPE:
|
update(data)
async
¶
Update an existing site.
BaseSiteManager
¶
Base configuration for Site resource managers.
base_path = '/admin/api/shops'
class-attribute
instance-attribute
¶
The API base path for this resource type.
business_info_doc_type = 'biz_info'
class-attribute
instance-attribute
¶
Document type for business information.
design_system_doc_type = 'design_system'
class-attribute
instance-attribute
¶
Document type for design system.
northstar_doc_type = 'northstar'
class-attribute
instance-attribute
¶
Document type for business northstar.
pages_base_path = '/admin/api/pages'
class-attribute
instance-attribute
¶
The API base path for pages.
resource_class = Site
class-attribute
instance-attribute
¶
The resource model class this manager handles.
resource_update_class = SiteUpdate
class-attribute
instance-attribute
¶
The model class used for updating resources.
site_documents_base_path = '/admin/api/site-documents'
class-attribute
instance-attribute
¶
The API base path for site documents.
site_settings_path = '/admin/api/site-settings'
class-attribute
instance-attribute
¶
The API base path for site settings.
website_info_doc_type = 'website_info'
class-attribute
instance-attribute
¶
Document type for website information.
WebsiteManager
¶
Bases: BaseSiteManager, BaseSyncManager
Manager for managing website related information and settings
add_url(pathname, url_type='page')
¶
Add URL to the website. This creates nested folders as needed. Args: pathname (str): The pathname to add. Returns: dict: Containing type of page and the ID.
get()
¶
Get a specific for the current site.
get_business_info()
¶
Get the business information content.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The business information content as markdown.
TYPE:
|
get_design_system()
¶
Get the design system content.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The design system content as markdown.
TYPE:
|
get_northstar()
¶
Get the business northstar content.
The northstar includes business information, branding, tone, goals, target audience etc.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The business northstar content as markdown.
TYPE:
|
get_robots_txt()
¶
Get the content of the robots.txt file for the website.
get_settings(site_id=None)
¶
Get website settings.
get_url(pathname, version=None)
¶
Get URL details from the website. Args: pathname (str): The pathname to get. version: Page version Returns: dict: Containing type of page and the ID.
get_website_info()
¶
Get the website information content.
| RETURNS | DESCRIPTION |
|---|---|
str
|
The website information content as markdown.
TYPE:
|
search_urls(query, types=None, limit=None, path=None)
¶
Search URLs from the website. Args: query (str): The search query string. types (ContentType, optional): Filter results by content type. limit (int, optional): Maximum number of results to return. path (str, optional): The base path to search under. If None, search the entire site. Defaults to None. Returns: dict: Search results containing matching URLs and their details.
set_business_info(info)
¶
Set the business information content.
| PARAMETER | DESCRIPTION |
|---|---|
info
|
The business information content as markdown.
TYPE:
|
set_design_system(info)
¶
Set the design system content.
| PARAMETER | DESCRIPTION |
|---|---|
info
|
The design system content as markdown.
TYPE:
|
set_northstar(content)
¶
Set the business northstar content.
The northstar includes business information, branding, tone, goals, target audience etc.
| PARAMETER | DESCRIPTION |
|---|---|
content
|
The business northstar content as markdown.
TYPE:
|
set_robots_txt(content)
¶
Set the content of the robots.txt file for the website.
set_settings(settings)
¶
Set website settings. Refer to get_settings response for schema
TODO: add schema to the docs
set_website_info(info)
¶
Set the website information content.
| PARAMETER | DESCRIPTION |
|---|---|
info
|
The website information content as markdown.
TYPE:
|
update(data)
¶
Update an existing site.