From 38ee9665f1190a45c080cd615b16144729e4d669 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Thu, 11 Jul 2019 00:46:47 +0200 Subject: [PATCH] updated github access mode --- functions.go | 3 +-- types.go | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/functions.go b/functions.go index d59d145..4433855 100644 --- a/functions.go +++ b/functions.go @@ -46,7 +46,6 @@ func GetConfig(config *Config) error { return err } - githubconfig.StarsPages = githubsection.Key("stars_pages").String() githubconfig.PageNum, err = githubsection.Key("page_num").Int() if err != nil { return err @@ -85,7 +84,7 @@ func GetReposFromGitHub(config *Config) ([]GitHubRepo, error) { var repo []GitHubRepo for num := 1; num <= config.githubconfig.PageNum; num++ { - url := fmt.Sprintf(config.githubconfig.StarsPages, config.githubconfig.AuthUsername, config.githubconfig.MaxPerPage, num) + url := fmt.Sprintf("https://api.github.com/users/%s/starred?per_page=%d&page=%d", config.githubconfig.AuthUsername, config.githubconfig.MaxPerPage, num) fmt.Println(url) fmt.Println("Getting GitHub starred repos") diff --git a/types.go b/types.go index 85150fd..a215849 100644 --- a/types.go +++ b/types.go @@ -38,7 +38,6 @@ type GlobalConfig struct { // GitHubConfig is the GitHub config type GitHubConfig struct { - StarsPages string MaxPerPage int PageNum int AuthUsername string