use("/catalog/person/:pid", new APICatalogPerson(config))
use("/catalog/person/:pid/maintaining", new APICatalogMaintaining(config))
use("/catalog/person/:pid/contributing", new APICatalogContributing(config))
+
+ use("/ini/desc/:id", new APIIniDesc(config))
+ use("/ini/git/:id", new APIIniGit(config))
+ use("/ini/clone/:id", new APIIniClone(config))
+ use("/ini/issues/:id", new APIIniIssues(config))
+ use("/ini/maintainer/:id", new APIIniMaintainer(config))
+ use("/ini/contributors/:id", new APIIniContributors(config))
+ use("/ini/license/:id", new APIIniLicense(config))
+ use("/ini/license-file/:id", new APIIniLicenseFile(config))
+ use("/ini/license-content/:id", new APIIniLicenseFileContent(config))
+ use("/ini/contrib-file/:id", new APIIniContribFile(config))
+ use("/ini/contrib-content/:id", new APIIniContribFileContent(config))
end
end
class APIList
super APICommand
- redef fun command do return new CmdModelEntities(config.view)
+ redef fun command do return new CmdModelEntities(config.model)
end
# Return a random list of MEntities.
class APIRandom
super APICommand
- redef fun command do return new CmdRandomEntities(config.view)
+ redef fun command do return new CmdRandomEntities(config.model)
end
# Search mentities from a cmd string.
class APISearch
super APIList
- redef fun command do return new CmdCatalogSearch(config.view, config.catalog)
+ redef fun command do return new CmdCatalogSearch(config.model, config.catalog)
end
# CmdEntity
class APIEntity
super APICommand
- redef fun command do return new CmdEntity(config.view)
+ redef fun command do return new CmdEntity(config.model)
end
# Return the full MDoc of a MEntity.
class APIEntityDoc
super APICommand
- redef fun command do return new CmdComment(config.view)
+ redef fun command do return new CmdComment(config.model)
end
# List MEntity ancestors
class APIEntityAncestors
super APICommand
- redef fun command do return new CmdAncestors(config.view)
+ redef fun command do return new CmdAncestors(config.model, config.mainmodule)
end
# List MEntity parents
class APIEntityParents
super APICommand
- redef fun command do return new CmdParents(config.view)
+ redef fun command do return new CmdParents(config.model, config.mainmodule)
end
# List MEntity children
class APIEntityChildren
super APICommand
- redef fun command do return new CmdChildren(config.view)
+ redef fun command do return new CmdChildren(config.model, config.mainmodule)
end
# List MEntity descendants
class APIEntityDescendants
super APICommand
- redef fun command do return new CmdDescendants(config.view)
+ redef fun command do return new CmdDescendants(config.model, config.mainmodule)
end
# Linearize super definitions of a MClassDef or a MPropDef if any.
class APIEntityLinearization
super APICommand
- redef fun command do return new CmdLinearization(config.view)
+ redef fun command do return new CmdLinearization(config.model, config.mainmodule)
end
# List definitions of a MEntity.
class APIEntityDefs
super APICommand
- redef fun command do return new CmdFeatures(config.view)
+ redef fun command do return new CmdFeatures(config.model)
end
# List intro definitions of a MEntity.
class APIEntityIntros
super APICommand
- redef fun command do return new CmdIntros(config.view)
+ redef fun command do return new CmdIntros(config.model, config.mainmodule)
end
# List redef definitions of a MEntity.
class APIEntityRedefs
super APICommand
- redef fun command do return new CmdRedefs(config.view)
+ redef fun command do return new CmdRedefs(config.model, config.mainmodule)
end
# List all definitions accessible from a MEntity.
class APIEntityAll
super APICommand
- redef fun command do return new CmdAllProps(config.view)
+ redef fun command do return new CmdAllProps(config.model, config.mainmodule)
end
# Return the source code of MEntity.
class APIEntityCode
super APICommand
- redef fun command do return new CmdEntityCode(config.view, config.modelbuilder)
+ redef fun command do return new CmdEntityCode(config.model, config.modelbuilder)
end
# Return the UML diagram for MEntity.
class APIEntityUML
super APICommand
- redef fun command do return new CmdUML(config.view)
+ redef fun command do return new CmdUML(config.model, config.mainmodule)
end
# Return the inheritance graph for MEntity.
class APIInheritanceGraph
super APICommand
- redef fun command do return new CmdInheritanceGraph(config.view)
+ redef fun command do return new CmdInheritanceGraph(config.model, config.mainmodule)
end
# CmdCatalog
class APICatalogPackages
super APICommand
- redef fun command do return new CmdCatalogPackages(config.view, config.catalog)
+ redef fun command do return new CmdCatalogPackages(config.model, config.catalog)
end
# Get the catalog statistics
class APICatalogStats
super APICommand
- redef fun command do return new CmdCatalogStats(config.view, config.catalog)
+ redef fun command do return new CmdCatalogStats(config.model, config.catalog)
end
# Get the package metadata
class APIEntityMetadata
super APICommand
- redef fun command do return new CmdMetadata(config.view)
+ redef fun command do return new CmdMetadata(config.model)
end
# Get all the tags from the catalog
class APICatalogTags
super APICommand
- redef fun command do return new CmdCatalogTags(config.view, config.catalog)
+ redef fun command do return new CmdCatalogTags(config.model, config.catalog)
end
# Get the packages related to a tag
class APICatalogTag
super APICommand
- redef fun command do return new CmdCatalogTag(config.view, config.catalog)
+ redef fun command do return new CmdCatalogTag(config.model, config.catalog)
end
# Get a person existing in the catalog
class APICatalogPerson
super APICommand
- redef fun command do return new CmdCatalogPerson(config.view, config.catalog)
+ redef fun command do return new CmdCatalogPerson(config.model, config.catalog)
end
# Get the list of mpackages maintained by a person
class APICatalogMaintaining
super APICommand
- redef fun command do return new CmdCatalogMaintaining(config.view, config.catalog)
+ redef fun command do return new CmdCatalogMaintaining(config.model, config.catalog)
end
# Get the list of mpackages contributed by a person
class APICatalogContributing
super APICommand
- redef fun command do return new CmdCatalogContributing(config.view, config.catalog)
+ redef fun command do return new CmdCatalogContributing(config.model, config.catalog)
+end
+
+# CmdIni
+
+# Get the package description from the ini file
+#
+# `GET /ini/desc/:pid`: return the package description
+class APIIniDesc
+ super APICommand
+
+ redef fun command do return new CmdIniDescription(config.model)
+end
+
+# Get the package Git URL from the ini file
+#
+# `GET /ini/git/:pid`: return the package Git URL
+class APIIniGit
+ super APICommand
+
+ redef fun command do return new CmdIniGitUrl(config.model)
+end
+
+# Get the package Git clone command from the ini file
+#
+# `GET /ini/clone/:pid`: return the package Git clone command
+class APIIniClone
+ super APICommand
+
+ redef fun command do return new CmdIniCloneCommand(config.model)
+end
+
+# Get the package issues URL from the ini file
+#
+# `GET /ini/issues/:pid`: return the package issues URL
+class APIIniIssues
+ super APICommand
+
+ redef fun command do return new CmdIniIssuesUrl(config.model)
+end
+
+# Get the package maintainer from the ini file
+#
+# `GET /ini/maintainer/:pid`: return the package maintainer
+class APIIniMaintainer
+ super APICommand
+
+ redef fun command do return new CmdIniMaintainer(config.model)
+end
+
+# Get the package contributors from the ini file
+#
+# `GET /ini/clone/:pid`: return the package contributors
+class APIIniContributors
+ super APICommand
+
+ redef fun command do return new CmdIniContributors(config.model)
+end
+
+# Get the package license from the ini file
+#
+# `GET /ini/clone/:pid`: return the package license
+class APIIniLicense
+ super APICommand
+
+ redef fun command do return new CmdIniLicense(config.model)
+end
+
+# Get the package license file
+#
+# `GET /ini/license-file/:pid`: return the package license file
+class APIIniLicenseFile
+ super APICommand
+
+ redef fun command do return new CmdLicenseFile(config.model)
+end
+
+# Get the package contrib file
+#
+# `GET /ini/contrib-file/:pid`: return the package contrib file
+class APIIniContribFile
+ super APICommand
+
+ redef fun command do return new CmdContribFile(config.model)
+end
+
+# Get the package license file content
+#
+# `GET /ini/license-file/:pid`: return the package license file content
+class APIIniLicenseFileContent
+ super APICommand
+
+ redef fun command do return new CmdLicenseFileContent(config.model)
+end
+
+# Get the package contrib file content
+#
+# `GET /ini/contrib-file/:pid`: return the package contrib file content
+class APIIniContribFileContent
+ super APICommand
+
+ redef fun command do return new CmdContribFileContent(config.model)
end