Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						aaf697a005
	
				 | 
					
					
						|||
| 
						
						
							
						
						7ef9cb37e6
	
				 | 
					
					
						|||
| 
						
						
							
						
						87afdc63b8
	
				 | 
					
					
						
@@ -14,7 +14,7 @@ A Go client library for the IGDB (Internet Game Database) API v4. This library p
 | 
				
			|||||||
## Installation
 | 
					## Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
go get github.com/bestnite/go-igdb
 | 
					go get git.nite07.com/nite/go-igdb
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Quick Start
 | 
					## Quick Start
 | 
				
			||||||
@@ -25,7 +25,7 @@ package main
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"log"
 | 
						"log"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/bestnite/go-igdb"
 | 
						"git.nite07.com/nite/go-igdb"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func Test1(c *igdb.Client) {
 | 
					func Test1(c *igdb.Client) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,8 +5,8 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"git.nite07.com/nite/go-igdb/endpoint"
 | 
				
			||||||
	"github.com/bestnite/go-flaresolverr"
 | 
						"github.com/bestnite/go-flaresolverr"
 | 
				
			||||||
	"github.com/bestnite/go-igdb/endpoint"
 | 
					 | 
				
			||||||
	"golang.org/x/time/rate"
 | 
						"golang.org/x/time/rate"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/go-resty/resty/v2"
 | 
						"github.com/go-resty/resty/v2"
 | 
				
			||||||
@@ -113,7 +113,7 @@ func NewWithFlaresolverr(clientID, clientSecret string, f *flaresolverr.Flaresol
 | 
				
			|||||||
	return c
 | 
						return c
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (g *Client) Request(ctx context.Context, method string, URL string, dataBody any) (*resty.Response, error) {
 | 
					func (g *Client) Request(ctx context.Context, method string, requestURL string, dataBody any) (*resty.Response, error) {
 | 
				
			||||||
	err := g.limiter.Wait(ctx)
 | 
						err := g.limiter.Wait(ctx)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, fmt.Errorf("failed to get rate limiter token: %w", err)
 | 
							return nil, fmt.Errorf("failed to get rate limiter token: %w", err)
 | 
				
			||||||
@@ -129,14 +129,14 @@ func (g *Client) Request(ctx context.Context, method string, URL string, dataBod
 | 
				
			|||||||
		"Authorization": "Bearer " + t,
 | 
							"Authorization": "Bearer " + t,
 | 
				
			||||||
		"User-Agent":    "",
 | 
							"User-Agent":    "",
 | 
				
			||||||
		"Content-Type":  "text/plain",
 | 
							"Content-Type":  "text/plain",
 | 
				
			||||||
	}).Execute(strings.ToUpper(method), URL)
 | 
						}).Execute(strings.ToUpper(method), requestURL)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if resp.StatusCode() != 200 {
 | 
						if resp.StatusCode() != 200 {
 | 
				
			||||||
		return nil, fmt.Errorf("failed to request, expected 200 but got: %v", resp.StatusCode())
 | 
							return nil, fmt.Errorf("failed to request, expected 200 but got: %v", resp.StatusCode())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, fmt.Errorf("failed to request: %s: %w", URL, err)
 | 
							return nil, fmt.Errorf("failed to request: %s: %w", requestURL, err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return resp, nil
 | 
						return resp, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *AgeRatingCategories) Query(ctx context.Context, query string) ([]*pb.Ag
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Ageratingcategories) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Ageratingcategories, nil
 | 
						return data.Ageratingcategories, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *AgeRatingContentDescriptions) Query(ctx context.Context, query string)
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Ageratingcontentdescriptions) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Ageratingcontentdescriptions, nil
 | 
						return data.Ageratingcontentdescriptions, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *AgeRatingContentDescriptionsV2) Query(ctx context.Context, query string
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Ageratingcontentdescriptionsv2) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Ageratingcontentdescriptionsv2, nil
 | 
						return data.Ageratingcontentdescriptionsv2, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *AgeRatingOrganizations) Query(ctx context.Context, query string) ([]*pb
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Ageratingorganizations) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Ageratingorganizations, nil
 | 
						return data.Ageratingorganizations, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *AgeRatings) Query(ctx context.Context, query string) ([]*pb.AgeRating,
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Ageratings) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Ageratings, nil
 | 
						return data.Ageratings, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *AlternativeNames) Query(ctx context.Context, query string) ([]*pb.Alter
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Alternativenames) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Alternativenames, nil
 | 
						return data.Alternativenames, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Artworks) Query(ctx context.Context, query string) ([]*pb.Artwork, erro
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Artworks) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Artworks, nil
 | 
						return data.Artworks, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,11 +2,12 @@ package endpoint
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"context"
 | 
						"context"
 | 
				
			||||||
 | 
						"errors"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"strconv"
 | 
						"strconv"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/go-resty/resty/v2"
 | 
						"github.com/go-resty/resty/v2"
 | 
				
			||||||
@@ -32,6 +33,9 @@ func (b *BaseEndpoint[T]) Query(ctx context.Context, query string) ([]*T, error)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (b *BaseEndpoint[T]) GetByID(ctx context.Context, id uint64) (*T, error) {
 | 
					func (b *BaseEndpoint[T]) GetByID(ctx context.Context, id uint64) (*T, error) {
 | 
				
			||||||
 | 
						if id == 0 {
 | 
				
			||||||
 | 
							return nil, errors.New("id cant be 0")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	res, err := b.Query(ctx, fmt.Sprintf("where id = %d; fields *;", id))
 | 
						res, err := b.Query(ctx, fmt.Sprintf("where id = %d; fields *;", id))
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
@@ -44,7 +48,7 @@ func (b *BaseEndpoint[T]) GetByID(ctx context.Context, id uint64) (*T, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func (b *BaseEndpoint[T]) GetByIDs(ctx context.Context, ids []uint64) ([]*T, error) {
 | 
					func (b *BaseEndpoint[T]) GetByIDs(ctx context.Context, ids []uint64) ([]*T, error) {
 | 
				
			||||||
	if len(ids) == 0 {
 | 
						if len(ids) == 0 {
 | 
				
			||||||
		return nil, fmt.Errorf("ids cant be empty")
 | 
							return []*T{}, nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	batches := make([][]uint64, 0)
 | 
						batches := make([][]uint64, 0)
 | 
				
			||||||
	for i := 0; i < len(ids); i += 500 {
 | 
						for i := 0; i < len(ids); i += 500 {
 | 
				
			||||||
@@ -80,7 +84,11 @@ func (b *BaseEndpoint[T]) Count(ctx context.Context) (uint64, error) {
 | 
				
			|||||||
		return 0, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return 0, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return uint64(res.Count), nil
 | 
						if res.Count > 0 {
 | 
				
			||||||
 | 
							return uint64(res.Count), nil
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							return 0, fmt.Errorf("failed to count, count should larger than 0, but got %v", res.Count)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (b *BaseEndpoint[T]) Paginated(ctx context.Context, offset, limit uint64) ([]*T, error) {
 | 
					func (b *BaseEndpoint[T]) Paginated(ctx context.Context, offset, limit uint64) ([]*T, error) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CharacterGenders) Query(ctx context.Context, query string) ([]*pb.Chara
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Charactergenders) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Charactergenders, nil
 | 
						return data.Charactergenders, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CharacterMugShots) Query(ctx context.Context, query string) ([]*pb.Char
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Charactermugshots) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Charactermugshots, nil
 | 
						return data.Charactermugshots, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CharacterSpecies) Query(ctx context.Context, query string) ([]*pb.Chara
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Characterspecies) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Characterspecies, nil
 | 
						return data.Characterspecies, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Characters) Query(ctx context.Context, query string) ([]*pb.Character,
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Characters) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Characters, nil
 | 
						return data.Characters, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CollectionMembershipTypes) Query(ctx context.Context, query string) ([]
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Collectionmembershiptypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Collectionmembershiptypes, nil
 | 
						return data.Collectionmembershiptypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CollectionMemberships) Query(ctx context.Context, query string) ([]*pb.
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Collectionmemberships) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Collectionmemberships, nil
 | 
						return data.Collectionmemberships, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CollectionRelationTypes) Query(ctx context.Context, query string) ([]*p
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Collectionrelationtypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Collectionrelationtypes, nil
 | 
						return data.Collectionrelationtypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CollectionRelations) Query(ctx context.Context, query string) ([]*pb.Co
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Collectionrelations) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Collectionrelations, nil
 | 
						return data.Collectionrelations, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CollectionTypes) Query(ctx context.Context, query string) ([]*pb.Collec
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Collectiontypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Collectiontypes, nil
 | 
						return data.Collectiontypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Collections) Query(ctx context.Context, query string) ([]*pb.Collection
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Collections) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Collections, nil
 | 
						return data.Collections, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,10 +2,9 @@ package endpoint
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"errors"
 | 
					 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -36,9 +35,5 @@ func (a *Companies) Query(ctx context.Context, query string) ([]*pb.Company, err
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Companies) == 0 {
 | 
					 | 
				
			||||||
		return nil, errors.New("no results")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Companies, nil
 | 
						return data.Companies, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CompanyLogos) Query(ctx context.Context, query string) ([]*pb.CompanyLo
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Companylogos) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Companylogos, nil
 | 
						return data.Companylogos, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CompanyStatuses) Query(ctx context.Context, query string) ([]*pb.Compan
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Companystatuses) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Companystatuses, nil
 | 
						return data.Companystatuses, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *CompanyWebsites) Query(ctx context.Context, query string) ([]*pb.Compan
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Companywebsites) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Companywebsites, nil
 | 
						return data.Companywebsites, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Covers) Query(ctx context.Context, query string) ([]*pb.Cover, error) {
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Covers) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Covers, nil
 | 
						return data.Covers, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *DateFormats) Query(ctx context.Context, query string) ([]*pb.DateFormat
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Dateformats) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Dateformats, nil
 | 
						return data.Dateformats, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *EventLogos) Query(ctx context.Context, query string) ([]*pb.EventLogo,
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Eventlogos) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Eventlogos, nil
 | 
						return data.Eventlogos, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *EventNetworks) Query(ctx context.Context, query string) ([]*pb.EventNet
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Eventnetworks) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Eventnetworks, nil
 | 
						return data.Eventnetworks, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Events) Query(ctx context.Context, query string) ([]*pb.Event, error) {
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Events) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Events, nil
 | 
						return data.Events, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *ExternalGameSources) Query(ctx context.Context, query string) ([]*pb.Ex
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Externalgamesources) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Externalgamesources, nil
 | 
						return data.Externalgamesources, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *ExternalGames) Query(ctx context.Context, query string) ([]*pb.External
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Externalgames) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Externalgames, nil
 | 
						return data.Externalgames, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Franchises) Query(ctx context.Context, query string) ([]*pb.Franchise,
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Franchises) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Franchises, nil
 | 
						return data.Franchises, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameEngineLogos) Query(ctx context.Context, query string) ([]*pb.GameEn
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gameenginelogos) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gameenginelogos, nil
 | 
						return data.Gameenginelogos, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameEngines) Query(ctx context.Context, query string) ([]*pb.GameEngine
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gameengines) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gameengines, nil
 | 
						return data.Gameengines, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameLocalizations) Query(ctx context.Context, query string) ([]*pb.Game
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gamelocalizations) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gamelocalizations, nil
 | 
						return data.Gamelocalizations, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameModes) Query(ctx context.Context, query string) ([]*pb.GameMode, er
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gamemodes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gamemodes, nil
 | 
						return data.Gamemodes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameReleaseFormats) Query(ctx context.Context, query string) ([]*pb.Gam
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gamereleaseformats) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gamereleaseformats, nil
 | 
						return data.Gamereleaseformats, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameStatuses) Query(ctx context.Context, query string) ([]*pb.GameStatu
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gamestatuses) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gamestatuses, nil
 | 
						return data.Gamestatuses, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameTimeToBeats) Query(ctx context.Context, query string) ([]*pb.GameTi
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gametimetobeats) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gametimetobeats, nil
 | 
						return data.Gametimetobeats, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameTypes) Query(ctx context.Context, query string) ([]*pb.GameType, er
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gametypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gametypes, nil
 | 
						return data.Gametypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameVersionFeatureValues) Query(ctx context.Context, query string) ([]*
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gameversionfeaturevalues) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gameversionfeaturevalues, nil
 | 
						return data.Gameversionfeaturevalues, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameVersionFeatures) Query(ctx context.Context, query string) ([]*pb.Ga
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gameversionfeatures) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gameversionfeatures, nil
 | 
						return data.Gameversionfeatures, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameVersions) Query(ctx context.Context, query string) ([]*pb.GameVersi
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gameversions) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gameversions, nil
 | 
						return data.Gameversions, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *GameVideos) Query(ctx context.Context, query string) ([]*pb.GameVideo,
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Gamevideos) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Gamevideos, nil
 | 
						return data.Gamevideos, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Games) Query(ctx context.Context, query string) ([]*pb.Game, error) {
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Games) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Games, nil
 | 
						return data.Games, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Genres) Query(ctx context.Context, query string) ([]*pb.Genre, error) {
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Genres) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Genres, nil
 | 
						return data.Genres, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *InvolvedCompanies) Query(ctx context.Context, query string) ([]*pb.Invo
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Involvedcompanies) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Involvedcompanies, nil
 | 
						return data.Involvedcompanies, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Keywords) Query(ctx context.Context, query string) ([]*pb.Keyword, erro
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Keywords) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Keywords, nil
 | 
						return data.Keywords, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *LanguageSupportTypes) Query(ctx context.Context, query string) ([]*pb.L
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Languagesupporttypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Languagesupporttypes, nil
 | 
						return data.Languagesupporttypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *LanguageSupports) Query(ctx context.Context, query string) ([]*pb.Langu
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Languagesupports) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Languagesupports, nil
 | 
						return data.Languagesupports, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Languages) Query(ctx context.Context, query string) ([]*pb.Language, er
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Languages) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Languages, nil
 | 
						return data.Languages, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *MultiplayerModes) Query(ctx context.Context, query string) ([]*pb.Multi
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Multiplayermodes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Multiplayermodes, nil
 | 
						return data.Multiplayermodes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *NetworkTypes) Query(ctx context.Context, query string) ([]*pb.NetworkTy
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Networktypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Networktypes, nil
 | 
						return data.Networktypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PlatformFamilies) Query(ctx context.Context, query string) ([]*pb.Platf
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Platformfamilies) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Platformfamilies, nil
 | 
						return data.Platformfamilies, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PlatformLogos) Query(ctx context.Context, query string) ([]*pb.Platform
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Platformlogos) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Platformlogos, nil
 | 
						return data.Platformlogos, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PlatformTypes) Query(ctx context.Context, query string) ([]*pb.Platform
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Platformtypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Platformtypes, nil
 | 
						return data.Platformtypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PlatformVersionCompanies) Query(ctx context.Context, query string) ([]*
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Platformversioncompanies) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Platformversioncompanies, nil
 | 
						return data.Platformversioncompanies, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PlatformVersionReleaseDates) Query(ctx context.Context, query string) (
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Platformversionreleasedates) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Platformversionreleasedates, nil
 | 
						return data.Platformversionreleasedates, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PlatformVersions) Query(ctx context.Context, query string) ([]*pb.Platf
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Platformversions) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Platformversions, nil
 | 
						return data.Platformversions, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PlatformWebsites) Query(ctx context.Context, query string) ([]*pb.Platf
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Platformwebsites) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Platformwebsites, nil
 | 
						return data.Platformwebsites, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,8 +35,5 @@ func (a *Platforms) Query(ctx context.Context, query string) ([]*pb.Platform, er
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Platforms) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return data.Platforms, nil
 | 
						return data.Platforms, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PlayerPerspectives) Query(ctx context.Context, query string) ([]*pb.Pla
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Playerperspectives) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Playerperspectives, nil
 | 
						return data.Playerperspectives, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PopularityPrimitives) Query(ctx context.Context, query string) ([]*pb.P
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Popularityprimitives) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Popularityprimitives, nil
 | 
						return data.Popularityprimitives, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *PopularityTypes) Query(ctx context.Context, query string) ([]*pb.Popula
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Popularitytypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Popularitytypes, nil
 | 
						return data.Popularitytypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Regions) Query(ctx context.Context, query string) ([]*pb.Region, error)
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Regions) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Regions, nil
 | 
						return data.Regions, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *ReleaseDateRegions) Query(ctx context.Context, query string) ([]*pb.Rel
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Releasedateregions) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Releasedateregions, nil
 | 
						return data.Releasedateregions, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *ReleaseDateStatuses) Query(ctx context.Context, query string) ([]*pb.Re
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Releasedatestatuses) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Releasedatestatuses, nil
 | 
						return data.Releasedatestatuses, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *ReleaseDates) Query(ctx context.Context, query string) ([]*pb.ReleaseDa
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Releasedates) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Releasedates, nil
 | 
						return data.Releasedates, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Screenshots) Query(ctx context.Context, query string) ([]*pb.Screenshot
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Screenshots) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Screenshots, nil
 | 
						return data.Screenshots, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,7 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/PuerkitoBio/goquery"
 | 
						"github.com/PuerkitoBio/goquery"
 | 
				
			||||||
	"github.com/bestnite/go-flaresolverr"
 | 
						"github.com/bestnite/go-flaresolverr"
 | 
				
			||||||
@@ -46,10 +46,6 @@ func (a *Search) Search(ctx context.Context, query string) ([]*pb.Search, error)
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Searches) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Searches, nil
 | 
						return data.Searches, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Themes) Query(ctx context.Context, query string) ([]*pb.Theme, error) {
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Themes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Themes, nil
 | 
						return data.Themes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *WebsiteTypes) Query(ctx context.Context, query string) ([]*pb.WebsiteTy
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Websitetypes) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Websitetypes, nil
 | 
						return data.Websitetypes, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ import (
 | 
				
			|||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pb "github.com/bestnite/go-igdb/proto"
 | 
						pb "git.nite07.com/nite/go-igdb/proto"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"google.golang.org/protobuf/proto"
 | 
						"google.golang.org/protobuf/proto"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -35,9 +35,5 @@ func (a *Websites) Query(ctx context.Context, query string) ([]*pb.Website, erro
 | 
				
			|||||||
		return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
							return nil, fmt.Errorf("failed to unmarshal: %w", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(data.Websites) == 0 {
 | 
					 | 
				
			||||||
		return nil, fmt.Errorf("no results: %s", query)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return data.Websites, nil
 | 
						return data.Websites, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
module github.com/bestnite/go-igdb
 | 
					module git.nite07.com/nite/go-igdb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
go 1.24.1
 | 
					go 1.24.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
package igdb
 | 
					package igdb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"github.com/bestnite/go-igdb/endpoint"
 | 
						"git.nite07.com/nite/go-igdb/endpoint"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func registerAllEndpoints(c *Client) {
 | 
					func registerAllEndpoints(c *Client) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user