class Forgejo::API

Defined in:

lib/forgejo/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(base_url : String, token : String, logging : Bool = true) #

[View source]

Instance Method Detail

def base_url : String #

[View source]
def client #

[View source]
def get_file(owner : String, repo_name : String, file_path : String, ref : String = "main") : String #

Get a file from a repository Returns raw file content.


[View source]
def logging : Bool #

[View source]
def logging=(logging : Bool) #

[View source]
def make_request(url, params = {} of String => String) #

[View source]
def repo(owner : String, repo_name : String) #

[View source]
def repo_languages(owner : String, repo : String) : Hash(String, Int64) #

Get languages and number of bytes of code written => {"Crystal" => 109927, "HTML" => 36888}


[View source]
def repo_releases(owner : String, repo : String) #

[View source]
def repos_search(query : String, topic : Bool = false, sort : String = "created", order : String = "asc", page : Int32 = 1, limit : Int32 = 100) #

[View source]
def token : String #

[View source]
def user(username : String) #

[View source]