Provides access to Github user data.
Should be accessed from GithubAPI::get_user
.
github :: User :: _avatar_url
Avatar image url for this user.github :: User :: avatar_url=
Avatar image url for this user.github :: User :: defaultinit
github :: User :: find_previous_rating
Find a previous rating ofself
for mentity
and dimension
self
github $ User :: core_serialize_to
Actual serialization ofself
to serializer
github $ User :: from_deserializer
Create an instance of this class from thedeserializer
github :: User :: _avatar_url
Avatar image url for this user.serialization :: Serializable :: accept_inspect_serializer_core
serialization :: Serializable :: accept_json_serializer
Refinable service to customize the serialization of this class to JSONserialization :: Serializable :: accept_msgpack_attribute_counter
Hook to customize the behavior of theAttributeCounter
serialization :: Serializable :: accept_msgpack_serializer
Hook to customize the serialization of this class to MessagePackserialization :: Serializable :: add_to_bundle
Called by[]=
to dynamically choose the appropriate method according
github :: User :: avatar_url=
Avatar image url for this user.core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
serialization :: Serializable :: core_serialize_to
Actual serialization ofself
to serializer
github :: GitUser :: defaultinit
core :: Object :: defaultinit
github :: User :: defaultinit
github :: User :: find_previous_rating
Find a previous rating ofself
for mentity
and dimension
serialization :: Serializable :: from_deserializer
Create an instance of this class from thedeserializer
core :: 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.
serialization :: Serializable :: msgpack_extra_array_items
Hook to request a larger than usual metadata arraycore :: 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).self
serialization :: Serializable :: serialize_msgpack
Serializeself
to MessagePack bytes
serialization :: Serializable :: serialize_to
Serializeself
to serializer
serialization :: Serializable :: serialize_to_json
Serializeself
to JSON
serialization :: Serializable :: serialize_to_or_delay
Accept references or force direct serialization (usingserialize_to
)
serialization :: Serializable :: to_pretty_json
Serializeself
to plain pretty JSON
Serializer::serialize
# A Github user
#
# Provides access to [Github user data](https://developer.github.com/v3/users/).
# Should be accessed from `GithubAPI::get_user`.
class User
super GitUser
serialize
# Github login.
var login: String is writable
# Avatar image url for this user.
var avatar_url: nullable String is writable
# User public name if any.
var name: nullable String is writable
# User public email if any.
var email: nullable String is writable
# User public blog if any.
var blog: nullable String is writable
end
lib/github/api.nit:502,1--524,3
redef class User
# Find a previous rating of `self` for `mentity` and `dimension`
fun find_previous_rating(config: NitwebConfig, mentity: MEntity, dimension: nullable String): nullable StarRating do
var match = new MongoMatch
match.eq("mentity", mentity.full_name)
match.eq("dimension", dimension)
match.eq("user", login)
return config.stars.find(match)
end
# Find all ratings by `self`
fun ratings(config: NitwebConfig): Array[StarRating] do
return config.stars.find_all((new MongoMatch).eq("user", login))
end
end
src/doc/api/api_feedback.nit:197,1--212,3