@@ -7,7 +7,27 @@ The intent is to simplify the request process by handling the tedious logic. It'
7
7
[ ![ npm version] ( https://badge.fury.io/js/ebay-node-api.svg )] ( https://badge.fury.io/js/ebay-node-api )
8
8
[ ![ Build Status] ( https://travis-ci.org/ajay2507/ebay-node-api.svg?branch=master )] ( https://travis-ci.org/ajay2507/ebay-node-api )
9
9
10
- # Installing
10
+
11
+ ## Table of Contents
12
+
13
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
14
+
15
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
16
+
17
+ * [ Installation] ( #installation )
18
+ * [ Usage] ( #usage )
19
+ * [ Examples] ( #examples )
20
+ * [ Getting Access Token] ( #getaccesstoken )
21
+ * [ Fetch Items By Keyword] ( #fetchitemsbykeyword )
22
+ * [ Get All Categories] ( #getallcategories )
23
+ * [ Get Items By Category] ( #getitemsbycategory )
24
+ * [ Test] ( #test )
25
+ * [ Issues] ( #issues )
26
+ * [ LICENSE] ( #license )
27
+
28
+
29
+
30
+ ## Installation
11
31
12
32
``` shell
13
33
npm install ebay-node-api
@@ -25,7 +45,7 @@ let ebay = new eBay({
25
45
```
26
46
Creates a new ` Ebay ` instance.
27
47
28
- ### How to get clientId :
48
+ ### Getting Client ID :
29
49
30
50
Join eBay developers program.
31
51
Register your app here https://go.developer.ebay.com/quick-start-guide .
@@ -36,7 +56,7 @@ Register your app here https://go.developer.ebay.com/quick-start-guide.
36
56
- ` limit ` - optional(` Number ` ) - fetch items functionality - Number that limits the number of data you need in response.
37
57
- ` details ` - optional(` Boolean ` ) - Get User Details functionality - true, if you need details about the user.
38
58
39
- #### Example
59
+ ## Example
40
60
41
61
## GetAccessToken
42
62
@@ -72,7 +92,37 @@ ebay.findItemsByKeywords("iphone").then((data) => {
72
92
});
73
93
```
74
94
75
- ## How do I run the tests?
95
+ ## GetAllCategories
96
+ ``` javascript
97
+ const Ebay = require (' ../src/index' );
98
+
99
+ let ebay = new Ebay ({
100
+ clientID: " -- Client App id ----" ,
101
+ details: " childCategories" // optional parameter
102
+ });
103
+
104
+ ebay .getAllCategories ().then ((data ) => {
105
+ console .log (data); // extract data.CategoryArray
106
+ }, (error ) => {
107
+ console .log (error);
108
+ })
109
+ ```
110
+ ## GetItemsByCategory
111
+ ``` javascript
112
+ const Ebay = require (' ../src/index' );
113
+
114
+ let ebay = new Ebay ({
115
+ clientID: " -- Client APP ID ----" ,
116
+ limit: 6
117
+ });
118
+ ebay .findItemsByCategory (10181 ).then ((data ) => {
119
+ console .log (data);
120
+ }, (error ) => {
121
+ console .log (error);
122
+ });
123
+ ```
124
+
125
+ ## Test
76
126
All test files are present inside test folder. You can run using
77
127
78
128
``` javascript
@@ -81,6 +131,8 @@ npm run test
81
131
## Issues:
82
132
If you are facing any issues, you can create the issues [ here] ( https://github.com/ajay2507/ebay-node-api/issues ) .
83
133
134
+ ## License:
135
+ MIT.
84
136
85
137
## Examples:
86
138
I have mentioned the examples here
0 commit comments