ebay-ysr 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a9c8828902912a9b64c67fa7164647d61f23153
4
- data.tar.gz: 2dfd1222984e133e91fe54687d64d059a446f789
3
+ metadata.gz: e9ceaeb037dbac1c8446e7a264c17937b9cb261a
4
+ data.tar.gz: 3f14fdd56d14eaae09104435ec02f1ea6b57b7e1
5
5
  SHA512:
6
- metadata.gz: 6ab0c5139f1c21a0540625131589a889f6d058de9d45bf08276f35318077fbc068d33db9402adfa232e015f55e05387608cdd74fb2aed254ced9acd14dd23356
7
- data.tar.gz: 8f0a257af96a8a080c6096295b1476c16559449bbed01732fac8b774007240caa1f587aa80b79c636072fb0be1730dcbfb1abfc5cee28bee86d343667c12a0f3
6
+ metadata.gz: 792f572331bcaa99c5a47a53bc72035fb1d6b9f537f359fe57ba7ea573e15c38b0af827b2a7773ca40f74dfdb99f0d1d71933a9b0cc3433c753ccc66c7b6a5de
7
+ data.tar.gz: 1276c41bbecf87397c9c3cc2dd75fd5ec75d2de84105ffa5c87d80c396b109855d6bdad063a24ee0aba1b28326c201b7a9d07da468e665cc52ac42c0b5da27b1
@@ -2,8 +2,8 @@
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
4
  <list default="true" id="0f669997-968a-40a4-a873-94ec91691267" name="Default" comment="">
5
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
6
5
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/ebay/ysr/version.rb" afterPath="$PROJECT_DIR$/lib/ebay/ysr/version.rb" />
6
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
7
7
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/ebay/ysr.rb" afterPath="$PROJECT_DIR$/lib/ebay/ysr.rb" />
8
8
  </list>
9
9
  <ignored path="ebay-ysr.iws" />
@@ -45,7 +45,7 @@
45
45
  <entry file="file://$PROJECT_DIR$/ebay-ysr.gemspec">
46
46
  <provider selected="true" editor-type-id="text-editor">
47
47
  <state vertical-scroll-proportion="0.0">
48
- <caret line="12" column="58" selection-start-line="11" selection-start-column="26" selection-end-line="12" selection-end-column="58" />
48
+ <caret line="13" column="0" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
49
49
  <folding />
50
50
  </state>
51
51
  </provider>
@@ -53,21 +53,21 @@
53
53
  </file>
54
54
  <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
55
55
  <entry file="file://$PROJECT_DIR$/README.md">
56
- <provider editor-type-id="MarkdownPreviewEditor">
57
- <state />
58
- </provider>
59
56
  <provider selected="true" editor-type-id="text-editor">
60
- <state vertical-scroll-proportion="-16.258064">
57
+ <state vertical-scroll-proportion="0.0">
61
58
  <caret line="28" column="29" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" />
62
59
  <folding />
63
60
  </state>
64
61
  </provider>
62
+ <provider editor-type-id="MarkdownPreviewEditor">
63
+ <state />
64
+ </provider>
65
65
  </entry>
66
66
  </file>
67
67
  <file leaf-file-name="version.rb" pinned="false" current-in-tab="true">
68
68
  <entry file="file://$PROJECT_DIR$/lib/ebay/ysr/version.rb">
69
69
  <provider selected="true" editor-type-id="text-editor">
70
- <state vertical-scroll-proportion="0.06896552">
70
+ <state vertical-scroll-proportion="0.06101695">
71
71
  <caret line="2" column="20" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
72
72
  <folding />
73
73
  </state>
@@ -78,7 +78,7 @@
78
78
  <entry file="file://$PROJECT_DIR$/lib/ebay/ysr.rb">
79
79
  <provider selected="true" editor-type-id="text-editor">
80
80
  <state vertical-scroll-proportion="0.0">
81
- <caret line="7" column="0" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
81
+ <caret line="40" column="0" selection-start-line="40" selection-start-column="0" selection-end-line="40" selection-end-column="0" />
82
82
  <folding />
83
83
  </state>
84
84
  </provider>
@@ -108,9 +108,9 @@
108
108
  </component>
109
109
  <component name="ProjectFrameBounds">
110
110
  <option name="x" value="39" />
111
- <option name="y" value="52" />
112
- <option name="width" value="1231" />
113
- <option name="height" value="942" />
111
+ <option name="y" value="24" />
112
+ <option name="width" value="1241" />
113
+ <option name="height" value="1000" />
114
114
  </component>
115
115
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
116
116
  <OptionsSetting value="true" id="Add" />
@@ -135,7 +135,6 @@
135
135
  <sortByType />
136
136
  </navigator>
137
137
  <panes>
138
- <pane id="Scope" />
139
138
  <pane id="Scratches" />
140
139
  <pane id="ProjectPane">
141
140
  <subPane>
@@ -197,6 +196,7 @@
197
196
  </PATH>
198
197
  </subPane>
199
198
  </pane>
199
+ <pane id="Scope" />
200
200
  </panes>
201
201
  </component>
202
202
  <component name="PropertiesComponent">
@@ -204,9 +204,13 @@
204
204
  <property name="options.splitter.main.proportions" value="0.3" />
205
205
  <property name="options.splitter.details.proportions" value="0.2" />
206
206
  <property name="WebServerToolWindowFactoryState" value="false" />
207
- <property name="last_opened_file_path" value="$PROJECT_DIR$/../caller" />
207
+ <property name="last_opened_file_path" value="$USER_HOME$/Desktop/Izea prod api/IZEA-PD" />
208
+ <property name="FullScreen" value="false" />
208
209
  </component>
209
210
  <component name="ShelveChangesManager" show_recycled="false" />
211
+ <component name="SvnConfiguration">
212
+ <configuration />
213
+ </component>
210
214
  <component name="TaskManager">
211
215
  <task active="true" id="Default" summary="Default task">
212
216
  <changelist id="0f669997-968a-40a4-a873-94ec91691267" name="Default" comment="" />
@@ -217,17 +221,17 @@
217
221
  <servers />
218
222
  </component>
219
223
  <component name="ToolWindowManager">
220
- <frame x="39" y="52" width="1231" height="942" extended-state="0" />
224
+ <frame x="39" y="24" width="1241" height="1000" extended-state="6" />
221
225
  <editor active="true" />
222
226
  <layout>
223
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27763712" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
227
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.28786612" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
224
228
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
225
229
  <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="true" content_ui="tabs" />
226
230
  <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
227
- <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20675105" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
231
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20669456" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
228
232
  <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
229
233
  <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
230
- <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3676976" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
234
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3340494" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
231
235
  <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
232
236
  <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
233
237
  <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@@ -242,6 +246,14 @@
242
246
  <window_info id="Debug" active="false" anchor="bottom" auto_hide="true" internal_type="DOCKED" type="FLOATING" visible="false" weight="0.39849624" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" x="88" y="338" width="1169" height="371" />
243
247
  </layout>
244
248
  </component>
249
+ <component name="Vcs.Log.UiProperties">
250
+ <option name="RECENTLY_FILTERED_USER_GROUPS">
251
+ <collection />
252
+ </option>
253
+ <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
254
+ <collection />
255
+ </option>
256
+ </component>
245
257
  <component name="VcsContentAnnotationSettings">
246
258
  <option name="myLimit" value="2678400000" />
247
259
  </component>
@@ -267,27 +279,113 @@
267
279
  </provider>
268
280
  </entry>
269
281
  <entry file="file://$PROJECT_DIR$/README.md">
282
+ <provider selected="true" editor-type-id="text-editor">
283
+ <state vertical-scroll-proportion="0.0">
284
+ <caret line="28" column="29" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" />
285
+ <folding />
286
+ </state>
287
+ </provider>
270
288
  <provider editor-type-id="MarkdownPreviewEditor">
271
289
  <state />
272
290
  </provider>
291
+ </entry>
292
+ <entry file="file://$PROJECT_DIR$/lib/ebay/ysr/version.rb">
293
+ <provider selected="true" editor-type-id="text-editor">
294
+ <state vertical-scroll-proportion="0.0">
295
+ <caret line="5" column="0" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
296
+ <folding />
297
+ </state>
298
+ </provider>
299
+ </entry>
300
+ <entry file="file://$PROJECT_DIR$/lib/ebay/ysr.rb">
301
+ <provider selected="true" editor-type-id="text-editor">
302
+ <state vertical-scroll-proportion="0.0">
303
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
304
+ <folding />
305
+ </state>
306
+ </provider>
307
+ </entry>
308
+ <entry file="file://$PROJECT_DIR$/Gemfile">
309
+ <provider selected="true" editor-type-id="text-editor">
310
+ <state vertical-scroll-proportion="0.0">
311
+ <caret line="0" column="20" selection-start-line="0" selection-start-column="20" selection-end-line="0" selection-end-column="20" />
312
+ <folding />
313
+ </state>
314
+ </provider>
315
+ </entry>
316
+ <entry file="file://$PROJECT_DIR$/ebay-ysr.gemspec">
273
317
  <provider selected="true" editor-type-id="text-editor">
274
- <state vertical-scroll-proportion="-16.258064">
318
+ <state vertical-scroll-proportion="0.0">
319
+ <caret line="12" column="58" selection-start-line="11" selection-start-column="26" selection-end-line="12" selection-end-column="58" />
320
+ <folding />
321
+ </state>
322
+ </provider>
323
+ </entry>
324
+ <entry file="file://$PROJECT_DIR$/README.md">
325
+ <provider selected="true" editor-type-id="text-editor">
326
+ <state vertical-scroll-proportion="0.0">
275
327
  <caret line="28" column="29" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" />
276
328
  <folding />
277
329
  </state>
278
330
  </provider>
331
+ <provider editor-type-id="MarkdownPreviewEditor">
332
+ <state />
333
+ </provider>
334
+ </entry>
335
+ <entry file="file://$PROJECT_DIR$/lib/ebay/ysr/version.rb">
336
+ <provider selected="true" editor-type-id="text-editor">
337
+ <state vertical-scroll-proportion="0.0">
338
+ <caret line="5" column="0" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
339
+ <folding />
340
+ </state>
341
+ </provider>
279
342
  </entry>
280
343
  <entry file="file://$PROJECT_DIR$/lib/ebay/ysr.rb">
281
344
  <provider selected="true" editor-type-id="text-editor">
282
345
  <state vertical-scroll-proportion="0.0">
283
- <caret line="7" column="0" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
346
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
347
+ <folding />
348
+ </state>
349
+ </provider>
350
+ </entry>
351
+ <entry file="file://$PROJECT_DIR$/Gemfile">
352
+ <provider selected="true" editor-type-id="text-editor">
353
+ <state vertical-scroll-proportion="0.0">
354
+ <caret line="0" column="20" selection-start-line="0" selection-start-column="20" selection-end-line="0" selection-end-column="20" />
355
+ <folding />
356
+ </state>
357
+ </provider>
358
+ </entry>
359
+ <entry file="file://$PROJECT_DIR$/README.md">
360
+ <provider selected="true" editor-type-id="text-editor">
361
+ <state vertical-scroll-proportion="0.0">
362
+ <caret line="28" column="29" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" />
363
+ <folding />
364
+ </state>
365
+ </provider>
366
+ <provider editor-type-id="MarkdownPreviewEditor">
367
+ <state />
368
+ </provider>
369
+ </entry>
370
+ <entry file="file://$PROJECT_DIR$/lib/ebay/ysr.rb">
371
+ <provider selected="true" editor-type-id="text-editor">
372
+ <state vertical-scroll-proportion="0.0">
373
+ <caret line="40" column="0" selection-start-line="40" selection-start-column="0" selection-end-line="40" selection-end-column="0" />
374
+ <folding />
375
+ </state>
376
+ </provider>
377
+ </entry>
378
+ <entry file="file://$PROJECT_DIR$/ebay-ysr.gemspec">
379
+ <provider selected="true" editor-type-id="text-editor">
380
+ <state vertical-scroll-proportion="0.0">
381
+ <caret line="13" column="0" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
284
382
  <folding />
285
383
  </state>
286
384
  </provider>
287
385
  </entry>
288
386
  <entry file="file://$PROJECT_DIR$/lib/ebay/ysr/version.rb">
289
387
  <provider selected="true" editor-type-id="text-editor">
290
- <state vertical-scroll-proportion="0.06896552">
388
+ <state vertical-scroll-proportion="0.06101695">
291
389
  <caret line="2" column="20" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
292
390
  <folding />
293
391
  </state>
Binary file
@@ -7,19 +7,65 @@ module Ebay
7
7
  class FindingApi
8
8
 
9
9
  #GET REQUEST
10
- def self.search(word)
11
- encode = URI.encode(word)
12
- puts encode
13
- url = "http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=#{APPID.to_s}&RESPONSE-DATA-FORMAT=JSON&REST-PAYLOAD&keywords=#{encode.to_s}"
14
- postData = Net::HTTP.get(URI(url))
15
- parse = JSON.parse(postData)
16
- results = parse['findItemsByKeywordsResponse'][0]['searchResult']
17
- count = results[0]['@count']
18
- puts count
19
- gg = results
20
- a=0
21
- items = gg[0]['item']
22
- # puts items
10
+ def self.search(word=nil,categoryId=nil)
11
+ if categoryId == nil
12
+ encode = URI.encode(word)
13
+ puts encode
14
+ url = "http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=#{APPID.to_s}&RESPONSE-DATA-FORMAT=JSON&REST-PAYLOAD&keywords=#{encode.to_s}"
15
+ postData = Net::HTTP.get(URI(url))
16
+ parse = JSON.parse(postData)
17
+ results = parse['findItemsByKeywordsResponse'][0]['searchResult']
18
+ count = results[0]['@count']
19
+ puts count
20
+ gg = results
21
+ a=0
22
+ items = gg[0]['item']
23
+ return items
24
+ elsif word == nil
25
+ categoryId = categoryId
26
+ puts categoryId
27
+ url = "http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByCategory&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=#{APPID.to_s}&RESPONSE-DATA-FORMAT=JSON&REST-PAYLOAD&categoryId=#{categoryId}"
28
+ postData = Net::HTTP.get(URI(url))
29
+ parse = JSON.parse(postData)
30
+ results = parse['findItemsByCategoryResponse'][0]['searchResult']
31
+ count = results[0]['@count']
32
+ puts count
33
+ gg = results
34
+ a=0
35
+ items = gg[0]['item']
36
+ return items
37
+ elsif word != nil && categoryId != nil
38
+ encode = URI.encode(word)
39
+ Rails.logger.info categoryId
40
+ url = "http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsAdvanced&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=#{APPID.to_s}&RESPONSE-DATA-FORMAT=JSON&REST-PAYLOAD&categoryId=#{categoryId}&keywords=#{encode.to_s}"
41
+ uri = URI.parse(url)
42
+ postData = Net::HTTP.get(uri)
43
+ parse = JSON.parse(postData)
44
+ results = parse['findItemsAdvancedResponse'][0]['searchResult']
45
+ count = results[0]['@count']
46
+ puts count
47
+ gg = results
48
+ a=0
49
+ items = gg[0]['item']
50
+ return items
51
+ else
52
+ return nil
53
+ end
54
+
55
+ # encode = URI.encode(word)
56
+ # puts encode
57
+ # url = "http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=#{APPID.to_s}&RESPONSE-DATA-FORMAT=JSON&REST-PAYLOAD&keywords=#{encode.to_s}"
58
+ # postData = Net::HTTP.get(URI(url))
59
+ # parse = JSON.parse(postData)
60
+ # results = parse['findItemsByKeywordsResponse'][0]['searchResult']
61
+ # count = results[0]['@count']
62
+ # puts count
63
+ # gg = results
64
+ # a=0
65
+ # items = gg[0]['item']
66
+
67
+
68
+ # puts items
23
69
  # a=0
24
70
  # @@items.each do |f|
25
71
  # puts a
@@ -33,9 +79,11 @@ module Ebay
33
79
 
34
80
  # a+=1
35
81
  # end
36
- return items
37
82
 
83
+
84
+ # return items
85
+
86
+ end
38
87
  end
39
- end
40
88
 
41
89
  end
@@ -1,5 +1,5 @@
1
1
  module Ebay
2
2
  module Ysr
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebay-ysr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Syed Muhammad Yasir
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-30 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,6 +60,7 @@ files:
60
60
  - Rakefile
61
61
  - ebay-ysr-0.1.1.gem
62
62
  - ebay-ysr-0.1.3.gem
63
+ - ebay-ysr-0.1.4.gem
63
64
  - ebay-ysr.gemspec
64
65
  - lib/ebay/ysr.rb
65
66
  - lib/ebay/ysr/version.rb
@@ -83,9 +84,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
84
  version: '0'
84
85
  requirements: []
85
86
  rubyforge_project:
86
- rubygems_version: 2.4.3
87
+ rubygems_version: 2.4.6
87
88
  signing_key:
88
89
  specification_version: 4
89
90
  summary: Finding Api of Ebay
90
91
  test_files: []
91
- has_rdoc: