Connection to the GitHub GraphQL api
The structure holding all the GitHub information
Repotomata.Repo
— TypeRepo
Wrapper representing the GitHub Repository.
Fields
owner::String
: the repository owner.name::String
: the repository name.languages::Vector{Language}
: the repositoryLanguage
s.stargazer_count::UInt
: the repository stargazer count.forks_count::UInt
: the repository forks count.watchers_count::UInt
: the repository watchers count.updatedat::DateTime
: the repository last update time.background_color::Colorant
: the chosen background color
See also: Language
Repotomata.Repo
— MethodRepo
The Repo
constructor will create a Connection
with the given owner/name
and query the needed information.
See also: Connection
The connection wrapper
Repotomata.Connection
— TypeConnection
Simple wrapper around Diana.Client
with the current repository name and owner.
Fields
owner::String
: the repository owner.name::String
: the repository name.client::Diana.Client
: the Diana.Client object.
The language structure
Repotomata.Language
— TypeLanguage
When parsed from GitHub a Language
has a name
, color
and the "usage" size
.
Fields
name::String
: the language name.color::Colorant
: the language color (provided by github/linguist).size::Int
: the relative usage of thisLanguage
in the repository.
See also: Repo
Utility functions
Repotomata.query
— Methodquery(connection::Connection, queryString)
The base function to make the queries. It wraps the provided query in a "repository" query. It also handles connection and result errors.
Repotomata.get_languages
— Methodget_languages(connection)
Utility function used to query all the languages of the repository. Return a Vector of Language
s sorted by size (bigger first).
Repotomata.create_palette
— Methodcreate_palette(repo)
Utility function used to create a color palette from the repositoty languages.
Repotomata.getparameters!
— Methodgetparameters(parameters, repo)
Dump the repo
parameters into the given parameters
Dict
Repotomata.make_language_query
— Functionmake_language_query(pageSize, after)
Provide access to all the languages from the repository given the correct pageSize
and after
.
Error handling
Repotomata.Error
— TypeError
Simple error wrapper.
Fields
name::String
: the error name.type::String
: the error type.message::String
: the error message.
Repotomata.GitHubError
— TypeGitHubError
Any error related to the repository connection.
The error is created with either:
- A
HTTP.ExceptionRequest.StatusError
- A failling
Diana.Result
- A string (for now only for the token error)
Fields
errors::Vector{Error}
: a collection ofError
s.