Remove unused API method

This commit is contained in:
The Magician 2024-05-19 15:01:52 +01:00
parent c8133803f7
commit e5b87bb8ae
1 changed files with 0 additions and 25 deletions

View File

@ -10,31 +10,6 @@ import (
var BULK_DATA_URI = "https://api.scryfall.com/bulk-data" var BULK_DATA_URI = "https://api.scryfall.com/bulk-data"
func GetBulkData() (types.BulkDataList, error) {
response, err := http.Get(BULK_DATA_URI)
if err != nil {
return types.BulkDataList{}, err
}
if response.StatusCode != http.StatusOK {
return types.BulkDataList{}, errors.New("HTTP request failed with code: " + string(response.StatusCode))
}
defer response.Body.Close()
bulkDataBytes, err := io.ReadAll(response.Body)
if err != nil {
return types.BulkDataList{}, err
}
var bulkDataList types.BulkDataList
err = json.Unmarshal(bulkDataBytes, &bulkDataList)
if err != nil {
return types.BulkDataList{}, err
}
return bulkDataList, nil
}
func GetBulkDataByType(bulkDataType string) (types.BulkData, error) { func GetBulkDataByType(bulkDataType string) (types.BulkData, error) {
response, err := http.Get(BULK_DATA_URI + "/" + bulkDataType) response, err := http.Get(BULK_DATA_URI + "/" + bulkDataType)
if err != nil { if err != nil {