Add timestamps to repository api response (#34)
Add created_at and updated_at properties to repository api response
This commit is contained in:
parent
872cf281aa
commit
ee68cd9eef
1 changed files with 3 additions and 0 deletions
3
repo.go
3
repo.go
|
@ -9,6 +9,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Permission represents a API permission.
|
// Permission represents a API permission.
|
||||||
|
@ -33,6 +34,8 @@ type Repository struct {
|
||||||
Forks int `json:"forks_count"`
|
Forks int `json:"forks_count"`
|
||||||
Watchers int `json:"watchers_count"`
|
Watchers int `json:"watchers_count"`
|
||||||
OpenIssues int `json:"open_issues_count"`
|
OpenIssues int `json:"open_issues_count"`
|
||||||
|
Created time.Time `json:"created_at"`
|
||||||
|
Updated time.Time `json:"updated_at"`
|
||||||
Permissions Permission `json:"permissions"`
|
Permissions Permission `json:"permissions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue