@@ -85,39 +85,6 @@ func (c *Client) GetMethodList(ctx context.Context, id string) (*MethodList, err
8585 return & res , nil
8686}
8787
88- // Repository List implementing by Paper's ID
89- type RepositoryList struct {
90- Count int `json:"count"`
91- Results []Repository `json:"results"`
92- }
93-
94- type Repository struct {
95- URL string `json:"url"`
96- IsOfficial bool `json:"is_official"`
97- Description string `json:"description"`
98- Stars int `json:"stars"`
99- Framework string `json:"framework"`
100- }
101-
102- func (c * Client ) GetRepositoryList (ctx context.Context , id string ) (* RepositoryList , error ) {
103- fmt .Println (id )
104- url := fmt .Sprintf ("%s/papers/%s/repositories" , c .BaseURL , url .QueryEscape (id ))
105- req , err := http .NewRequest ("GET" , url , nil )
106-
107- if err != nil {
108- return nil , err
109- }
110-
111- req = req .WithContext (ctx )
112-
113- res := RepositoryList {}
114- if err := c .sendRequest (req , & res ); err != nil {
115- return nil , err
116- }
117-
118- return & res , nil
119- }
120-
12188func (c * Client ) sendRequest (req * http.Request , v interface {}) error {
12289 req .Header .Set ("Content-Type" , "application/json; charset=utf-8" )
12390 req .Header .Set ("Accept" , "application/json; charset=utf-8" )
0 commit comments