forked from rmpacheco/go-ebay
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathebay_test.go
34 lines (31 loc) · 894 Bytes
/
ebay_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package ebay
import (
"fmt"
"testing"
)
var (
test_application_id = "your_application_id_here"
)
func TestFindItemsByKeywords(t *testing.T) {
fmt.Println("ebay.FindItemsByKeywords")
e := New(test_application_id)
response, err := e.FindItemsByKeywords(GLOBAL_ID_EBAY_US, "DJM 900, DJM 850", 10, false)
if err != nil {
t.Errorf("ERROR: ", err)
} else {
fmt.Println("Timestamp: ", response.Timestamp)
fmt.Println("Items:")
fmt.Println("------")
for _, i := range response.Items {
fmt.Println("Title: ", i.Title)
fmt.Println("------")
fmt.Println("\tListing Url: ", i.ListingUrl)
fmt.Println("\tBin Price: ", i.BinPrice)
fmt.Println("\tCurrent Price: ", i.CurrentPrice)
fmt.Println("\tShipping Price: ", i.ShippingPrice)
fmt.Println("\tShips To: ", i.ShipsTo)
fmt.Println("\tSeller Location: ", i.Location)
fmt.Println()
}
}
}