lib

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const API = "https://api.github.com"

Variables

This section is empty.

Functions

func DisplayReleases

func DisplayReleases(username string, repository string)

func DisplayRepositories

func DisplayRepositories(username string)

func GetResponse

func GetResponse[T Release | Repository](url string, result *[]T) error

Types

type Asset

type Asset struct {
	Url       string `json:"browser_download_url"`
	Name      string `json:"name"`
	Downloads int    `json:"download_count"`
}

type Author

type Author struct {
	Url  string `json:"html_url"`
	Name string `json:"login"`
}

type Error

type Error struct {
	Message string `json:"message"`
}

type Release

type Release struct {
	Url         string  `json:"html_url"`
	Name        string  `json:"name"`
	Author      Author  `json:"author"`
	Assets      []Asset `json:"assets"`
	CreatedAt   string  `json:"created_at"`
	PublishedAt string  `json:"published_at"`
}

type Repository

type Repository struct {
	Url       string `json:"html_url"`
	Name      string `json:"name"`
	PushedAt  string `json:"pushed_at"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL