View Source GitHub.Licenses (GitHub REST API Client v0.2.0)
Provides API endpoints related to licenses
Link to this section Summary
Link to this section Functions
@spec get( String.t(), keyword() ) :: {:ok, GitHub.License.t()} | {:error, GitHub.Error.t()}
Get a license
Gets information about a specific license. For more information, see "Licensing a repository ."
resources
Resources
@spec get_all_commonly_used(keyword()) :: {:ok, [GitHub.License.simple()]} | {:error, GitHub.Error.t()}
Get all commonly used licenses
Lists the most commonly used licenses on GitHub. For more information, see "Licensing a repository ."
options
Options
featured
per_page
: The number of results per page (max 100).page
: Page number of the results to fetch.
resources
Resources
@spec get_for_repo(String.t(), String.t(), keyword()) :: {:ok, GitHub.License.Content.t()} | {:error, GitHub.Error.t()}
Get the license for a repository
This method returns the contents of the repository's license file, if one is detected.
Similar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.