BREAKING CHANGE: renamed NewClient function
Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
parent
5327d1bc0f
commit
bb652963ce
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
client := e621.NewE621Client(os.Getenv("API_USER"), os.Getenv("API_KEY"))
|
||||
client := e621.NewClient(os.Getenv("API_USER"), os.Getenv("API_KEY"))
|
||||
{
|
||||
favorites, err := client.GetFavoritesForUser("selloo")
|
||||
if err != nil {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
client := e621.NewE621Client(os.Getenv("API_USER"), os.Getenv("API_KEY"))
|
||||
client := e621.NewClient(os.Getenv("API_USER"), os.Getenv("API_KEY"))
|
||||
|
||||
posts, err := client.GetPosts().Execute()
|
||||
if err != nil {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
client := e621.NewE621Client(os.Getenv("API_USER"), os.Getenv("API_KEY"))
|
||||
client := e621.NewClient(os.Getenv("API_USER"), os.Getenv("API_KEY"))
|
||||
user, err := client.GetUserByName("selloo").Execute()
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
|
@ -17,8 +17,8 @@ type Client struct {
|
||||
RequestContext model.RequestContext
|
||||
}
|
||||
|
||||
// NewE621Client creates a new e621 client with the provided username and API key.
|
||||
func NewE621Client(username string, apiKey string) Client {
|
||||
// NewClient creates a new e621 client with the provided username and API key.
|
||||
func NewClient(username string, apiKey string) Client {
|
||||
// Create a new e621 client with the given username and API key.
|
||||
return Client{
|
||||
RequestContext: model.RequestContext{
|
||||
|
Reference in New Issue
Block a user