nitc :: CmdCatalogPerson :: _person_name
Name of the person to retrievenitc :: CmdCatalogPerson :: defaultinit
nitc :: CmdCatalogPerson :: person_name
Name of the person to retrievenitc :: CmdCatalogPerson :: person_name=
Name of the person to retrievenitc $ CmdCatalogPerson :: SELF
Type of this instance, automatically specialized in every classnitc :: commands_http $ CmdCatalogPerson :: http_init
Init the command from an HTTPRequestnitc :: commands_parser $ CmdCatalogPerson :: parser_init
Initialize the command from the CommandParser datanitc :: json_commands $ CmdCatalogPerson :: to_json
Return a JSON Serializable representation ofself
results
nitc :: CmdCatalogPerson :: _person_name
Name of the person to retrievecore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: DocCommand :: cmd_filter
Return a new filter for that command execution.nitc :: CmdCatalogPerson :: defaultinit
core :: Object :: defaultinit
nitc :: CmdCatalog :: defaultinit
nitc :: DocCommand :: defaultinit
nitc :: DocCommand :: execute
nitc :: DocCommand :: filter=
ModelFilter to apply if anynitc :: DocCommand :: http_init
Init the command from an HTTPRequestcore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: DocCommand :: parser_init
Initialize the command from the CommandParser datanitc :: CmdCatalogPerson :: person_name
Name of the person to retrievenitc :: CmdCatalogPerson :: person_name=
Name of the person to retrievenitc :: DocCommand :: to_json
Return a JSON Serializable representation ofself
results
nitc :: CmdCatalogContributing
Retrieve the packages contributed by a person
# Retrieve a person from the catalog
class CmdCatalogPerson
super CmdCatalog
# Person to retrieve
#
# You can also pass a `person_name`.
var person: nullable Person = null is optional, writable
# Name of the person to retrieve
#
# You can also pass a `person` instance.
var person_name: nullable String = null is optional, writable
# Initialize the `person` result
fun init_person: CmdMessage do
var person = self.person
if person != null then
person_name = person.name
return new CmdSuccess
end
var name = self.person_name
if name == null then return new ErrorNoPerson
if not catalog.name2person.has_key(name) then return new ErrorPersonNotFound(name)
self.person = catalog.name2person[name]
return new CmdSuccess
end
redef fun init_command do
init_person
return super
end
end
src/doc/commands/commands_catalog.nit:236,1--269,3
redef class CmdCatalogPerson
redef fun parser_init(mentity_name, options) do
person_name = mentity_name
return super
end
end
src/doc/commands/commands_parser.nit:390,1--395,3
redef class CmdCatalogPerson
redef fun http_init(req) do
var name = req.param("pid")
if name != null then name = name.from_percent_encoding
self.person_name = name
return super
end
end
src/doc/commands/commands_http.nit:219,1--226,3
redef class CmdCatalogPerson
redef fun to_json do return person
end
src/doc/templates/json_commands.nit:134,1--136,3