wakatime

package
v0.0.0-...-20ecdb9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIs

type APIs struct {
	CodeActivity string `json:"code_activity"`
	Languages    string `json:"languages"`
}

APIs define supported wakatime api.

func (*APIs) GetCodeActivity

func (a *APIs) GetCodeActivity() (ca *CodeActivity, err error)

GetCodeActivity fetch wakatime code activity api.

func (*APIs) GetLanguages

func (a *APIs) GetLanguages() (l *Languages, err error)

GetLanguages fetch wakatime code activity api.

type CodeActivity

type CodeActivity struct {
	Data []struct {
		GrandTotal struct {
			Decimal      string  `json:"decimal"`
			Digital      string  `json:"digital"`
			Hours        int     `json:"hours"`
			Minutes      int     `json:"minutes"`
			Text         string  `json:"text"`
			TotalSeconds float64 `json:"total_seconds"`
		} `json:"grand_total"`
		Range struct {
			Date     string    `json:"date"`
			End      time.Time `json:"end"`
			Start    time.Time `json:"start"`
			Text     string    `json:"text"`
			Timezone string    `json:"timezone"`
		} `json:"range"`
	} `json:"data"`
}

CodeActivity defines the strut of wakatime code activity.

type Languages

type Languages struct {
	Data []struct {
		Color   string  `json:"color"`
		Name    string  `json:"name"`
		Percent float64 `json:"percent"`
	} `json:"data"`
}

Languages defines the strut of wakatime code languages.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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