proxycrawl 0.1.1 → 0.2.0

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: 1c4d6754bc9eeafeb6b1d6834111df156ee342a6
4
- data.tar.gz: e7f673ed4d6347fd1fbb73e8d60f8cf65b2ad046
3
+ metadata.gz: ab95c07f3180f82c6b77af90fa5c947fc2af592e
4
+ data.tar.gz: daa80f3339e9cefe929a9600c0865319cf790bbd
5
5
  SHA512:
6
- metadata.gz: 4ddee197bd9310b8b22f866a52980ca294c8bfd06513310d93affe9a41241b7cbace0ad63353f04dc9646723303e2f56075aa5746efe908bcd64b2759d135012
7
- data.tar.gz: 7e81282efbbf76d9b8d50e919de861baf09ca8e06af7a3266f33614bfdf8ee332a1b2c0e4b12f19fe1462d00966bd4563664a056e4494c166084f916d9bfeecd
6
+ metadata.gz: 5f9ce2ddfdfb1e2865f64c3a7f505fb6dadaaacb9a5a3c5ef337af1db83ded51dcb4d8e6bb67269876365f2f190f1231dba3477ae683f784aabd9770735e6133
7
+ data.tar.gz: b6eedbe01aa37e9a7bb3bd481a761460b98c1ba6be5f48e51fbcf5326e279bba7badc6eecc1337d6fba929d0326e12be29ba47b9a31cbe0894ba092f7a166ae2
data/README.md CHANGED
@@ -64,10 +64,8 @@ options = {
64
64
 
65
65
  response = api.get('https://www.reddit.com/r/pics/comments/5bx4bx/thanks_obama/', options)
66
66
 
67
- puts response.body
68
67
  puts response.status_code
69
- puts response.original_status
70
- puts response.pc_status
68
+ puts response.body # read the API json response
71
69
  ```
72
70
 
73
71
  ### POST requests
@@ -89,7 +87,7 @@ You can send the data as application/json instead of x-www-form-urlencoded by se
89
87
  ```ruby
90
88
  response = api.post('https://httpbin.org/post', { some_json: 'with some value' }, { post_content_type: 'json' })
91
89
 
92
- puts response.code
90
+ puts response.status_code
93
91
  puts response.body
94
92
 
95
93
  ```
@@ -67,12 +67,8 @@ module ProxyCrawl
67
67
 
68
68
  def prepare_response(response, format)
69
69
  if format == 'json'
70
- json_response = JSON.parse(response.body)
71
- @original_status = json_response['original_status'].to_i
72
70
  @status_code = response.code.to_i
73
- @pc_status = json_response['pc_status'].to_i
74
- @body = json_response['body']
75
- @url = json_response['url']
71
+ @body = response.body
76
72
  else
77
73
  @original_status = response['original_status'].to_i
78
74
  @status_code = response.code.to_i
@@ -1,3 +1,3 @@
1
- module Proxycrawl
2
- VERSION = "0.1.1"
1
+ module ProxyCrawl
2
+ VERSION = "0.2.0"
3
3
  end
@@ -5,7 +5,7 @@ require "proxycrawl/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "proxycrawl"
8
- spec.version = Proxycrawl::VERSION
8
+ spec.version = ProxyCrawl::VERSION
9
9
  spec.platform = Gem::Platform::RUBY
10
10
  spec.authors = ["proxycrawl"]
11
11
  spec.email = ["info@proxycrawl.com"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxycrawl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - proxycrawl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-27 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec