Skip to content

loona-gg/PM-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

PM-Example

Example PM Plugin for querying Spiget.

Loona will auto import PMPlugin and PluginQueryResult when Plugin is loaded

Documentation

class LoonaPlugin:
    def __init__(self, ...):
        self.name = name
        self.description = description
        self.version = version
        self.author = author
        self.plugin_type = plugin_type
    def log(log_type: int, msg: str) -> None: ...
class PMPlugin(LoonaPlugin):
    def query(self, query: str, page: int = 0, limit: int = 25) -> List[PluginQueryResult] | None: ...
    def install(self, install_url: str) -> None: ...
class PluginQueryResult(BaseModel):
    id: Any  # Plugin ID
    name: str
    description: Optional[str] = None
    tags: Optional[Union[list, str]] = []  # List of strings
    premium: Optional[bool] = False  # Is the plugin premium? (paid)

    icon: Optional[Union[str, bytes]] = None  # URL or Base64 encoded bytes

    size: Union[int, float]
    views: Optional[int] = 0
    likes: Optional[int] = 0
    downloads: Optional[int] = 0

    versions: Optional[list] = []  # List of strings

    url: str  # URL to the plugin page
    install_url: Optional[str] = None  # URL to the plugin file
    external: Optional[bool] = False  # Install link is on external website?

    releaseDate: Optional[datetime] = None

    service_name: str  # Name of Website or API result is from

This repo will obviously be updated

About

Example PM Plugin for querying Spiget

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages