Skip to content

Commit

Permalink
feat: add nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdargan committed Apr 18, 2024
1 parent 528a823 commit db9713e
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 41 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.direnv
.pre-commit-config.yaml
46 changes: 5 additions & 41 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package ebay_test

import (
"context"
"fmt"
"net/http"
"time"

Expand All @@ -24,14 +23,7 @@ func ExampleFindingClient_FindItemsAdvanced() {
c := &http.Client{Timeout: time.Second * 5}
appID := "your_app_id"
client := ebay.NewFindingClient(c, appID)
resp, err := client.FindItemsAdvanced(context.Background(), params)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(resp)
}
// Output:
// ebay: failed to perform eBay Finding API request with status code: 500
_, _ = client.FindItemsAdvanced(context.Background(), params)
}

func ExampleFindingClient_FindItemsByCategory() {
Expand All @@ -45,14 +37,7 @@ func ExampleFindingClient_FindItemsByCategory() {
c := &http.Client{Timeout: time.Second * 5}
appID := "your_app_id"
client := ebay.NewFindingClient(c, appID)
resp, err := client.FindItemsByCategory(context.Background(), params)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(resp)
}
// Output:
// ebay: failed to perform eBay Finding API request with status code: 500
_, _ = client.FindItemsByCategory(context.Background(), params)
}

func ExampleFindingClient_FindItemsByKeywords() {
Expand All @@ -66,14 +51,7 @@ func ExampleFindingClient_FindItemsByKeywords() {
c := &http.Client{Timeout: time.Second * 5}
appID := "your_app_id"
client := ebay.NewFindingClient(c, appID)
resp, err := client.FindItemsByKeywords(context.Background(), params)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(resp)
}
// Output:
// ebay: failed to perform eBay Finding API request with status code: 500
_, _ = client.FindItemsByKeywords(context.Background(), params)
}

func ExampleFindingClient_FindItemsByProduct() {
Expand All @@ -88,14 +66,7 @@ func ExampleFindingClient_FindItemsByProduct() {
c := &http.Client{Timeout: time.Second * 5}
appID := "your_app_id"
client := ebay.NewFindingClient(c, appID)
resp, err := client.FindItemsByProduct(context.Background(), params)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(resp)
}
// Output:
// ebay: failed to perform eBay Finding API request with status code: 500
_, _ = client.FindItemsByProduct(context.Background(), params)
}

func ExampleFindingClient_FindItemsInEBayStores() {
Expand All @@ -109,12 +80,5 @@ func ExampleFindingClient_FindItemsInEBayStores() {
c := &http.Client{Timeout: time.Second * 5}
appID := "your_app_id"
client := ebay.NewFindingClient(c, appID)
resp, err := client.FindItemsInEBayStores(context.Background(), params)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(resp)
}
// Output:
// ebay: failed to perform eBay Finding API request with status code: 500
_, _ = client.FindItemsInEBayStores(context.Background(), params)
}
Loading

0 comments on commit db9713e

Please sign in to comment.