-
Notifications
You must be signed in to change notification settings - Fork 1
Package Repositories
Packages are tracked by repositories. An mpm user will choose one or more repositories to install packages from. A database in the repository is used to store information on tracked packages. MPM will sync with these databases, storing a local copy of all package listings and their versions. The client should include a "LastSync" parameter with a request for the list of all packages. The client should also be able to store a cache of package metadata such that bandwidth of the repository is conserved and operations requiring the data may be sped up.
MPM will include a variety of routes for fetching package information, while also providing means of uploading packages into the repository.
Many multi-return routes will use a specialized short version for identifying their subjects, with the primary purpose being to minimize server work where it is not necessary to retrieve the full set of information. These shortened versions contain only specific identifying information to that subject instance. As an example, the full listing of packages will only contain the package's ID, Version, Arch, Platform, and Side, along with the last updated time for that particular package.
Collection routes will be returned as a JSON Collection, which is an object containing the Items and Data properties, with the former containing the contents of the collection and the latter containing any additional data the particular route may send for that route.
Non-collection routes will return a similar construct with the Items property replaced with Item, which contains the direct value of the object. Data may still be added by the route for that object in the Data property.
Route Types | Property | Type | Notes |
---|---|---|---|
Collection ([] ) |
Items | T[] | The subject items |
Single (# ) |
Item | T | The subject item |
Collection & Single | Data | Object | Properties containing route-specific data that is not part of the subject object or pertains to the entire collection |
Provides listings for all registered packages meeting the specified filters. If no parameters are defaulted, left unspecified, or "All", the similarly-named Single(#) route will be used instead.
Routes | Type |
---|---|
/packages/<Arch> |
PackageListing[] |
/packages/<Arch>/<Platform> |
PackageListing[] |
/packages/<Arch>/<Platform>/<Side> |
PackageListing[] |
Parameters | Type | Default | Purpose |
---|---|---|---|
Arch |
String (Arch) | All | Arch by which to select packages |
Platform |
String (Platform) | All | Platform by which to select packages |
Side |
String (Side) | All | Side by which to select packages |
ID |
String (ID) | All | Package ID by which to select packages |
Version |
String (Version) | All | Version by which to select packages |
?After |
Integer (Timestamp) | 0 (Unix Epoch) | Timestamp indicating when a package must have changed to be a returned subject item. |
Data Key | Value |
---|---|
Arch |
Arch |
Platform |
Platform |
Side |
Side |
ID |
ID |
Version |
Version |
After |
?After |
Provides the particular package or null if the package complying the filters does not exist.
Routes | Type |
---|---|
/packages/<Arch>/<Platform>/<Side>/<ID>/<Version> |
Package |
Parameters | Type | Purpose |
---|---|---|
Arch |
String (Arch) | Arch by which to select packages |
Platform |
String (Platform) | Platform by which to select packages |
Side |
String (Side) | Side by which to select packages |
ID |
String (ID) | Package ID by which to select packages |
Version |
String (Version) | Version by which to select packages |
Data Key | Value |
---|---|
Updated |
The time the entry was added or last changed on the repository |