Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/packagist/lister.py
Show All 27 Lines | |||||
class PackagistLister(ListerOnePageApiTransport, SimpleLister): | class PackagistLister(ListerOnePageApiTransport, SimpleLister): | ||||
"""List packages available in the Packagist package manager. | """List packages available in the Packagist package manager. | ||||
The lister sends the request to the url present in the class | The lister sends the request to the url present in the class | ||||
variable `PAGE`, to receive a list of all the package names | variable `PAGE`, to receive a list of all the package names | ||||
present in the Packagist package manager. Iterates over all the | present in the Packagist package manager. Iterates over all the | ||||
packages and constructs the metadata url of the package from | packages and constructs the metadata url of the package from | ||||
the name of the package and creates a loading task. | the name of the package and creates a loading task:: | ||||
Task: | Task: | ||||
Type: load-packagist | Type: load-packagist | ||||
Policy: recurring | Policy: recurring | ||||
Args: | Args: | ||||
<package_name> | <package_name> | ||||
<package_metadata_url> | <package_metadata_url> | ||||
Example: | Example:: | ||||
Task: | |||||
Type: load-packagist | Type: load-packagist | ||||
Policy: recurring | Policy: recurring | ||||
Args: | Args: | ||||
'hypejunction/hypegamemechanics' | 'hypejunction/hypegamemechanics' | ||||
'https://repo.packagist.org/p/hypejunction/hypegamemechanics.json' | 'https://repo.packagist.org/p/hypejunction/hypegamemechanics.json' | ||||
""" | """ | ||||
MODEL = PackagistModel | MODEL = PackagistModel | ||||
LISTER_NAME = 'packagist' | LISTER_NAME = 'packagist' | ||||
PAGE = 'https://packagist.org/packages/list.json' | PAGE = 'https://packagist.org/packages/list.json' | ||||
instance = 'packagist' | instance = 'packagist' | ||||
def __init__(self, override_config=None): | def __init__(self, override_config=None): | ||||
Show All 40 Lines |