proxy-cheap-client 1.0.1 → 1.0.2
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 +4 -4
- data/README.md +19 -32
- data/lib/proxy_cheap_client/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76d5c831c3d9aedff3a621a4d02ebeba39bd7198e3a981de3168b7db3c4a03b7
|
|
4
|
+
data.tar.gz: 4f917584d1e3ba6608a863706616a1407fca78fe0e9fe0c6b7825e3e3a3c6403
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03d4375eed0c191edf673f99bbf37b0571fc20f3f4dd0301e11742232ea52b82d98aac19593000f0a7379b31468fd1c3c0b7d3fde308d21f28b6035f3a747415
|
|
7
|
+
data.tar.gz: 2c51736e975285c178c94186dc8fa39f2a70ed523270724f9a6faf32f5b9c9980f798c2e7f45520558f68fc3edac57260c0d61f832f79d28df1586d859927172
|
data/README.md
CHANGED
|
@@ -4,40 +4,27 @@ Ruby client for the Proxy-Cheap.com API.
|
|
|
4
4
|
|
|
5
5
|
[](https://rubygems.org/gems/proxy-cheap-client) [](./LICENSE.txt)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Features
|
|
8
8
|
|
|
9
9
|
* Retrieve account balance
|
|
10
10
|
* List proxies
|
|
11
11
|
* Enable/disable auto-extend on proxies
|
|
12
|
+
* Get list of supported countries
|
|
12
13
|
* Order new residential proxies
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
### Requirements
|
|
15
16
|
|
|
16
17
|
* Ruby 2.7+
|
|
17
18
|
* Internet access to Proxy-Cheap.com API
|
|
18
19
|
* API key and API secret from Proxy-Cheap.com
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Install from RubyGems:
|
|
21
|
+
### Installation
|
|
23
22
|
|
|
24
23
|
```bash
|
|
25
24
|
gem install proxy-cheap-client
|
|
26
25
|
```
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```ruby
|
|
31
|
-
gem "proxy-cheap-client"
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Then run:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
bundle install
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Configuration
|
|
27
|
+
### Configuration
|
|
41
28
|
|
|
42
29
|
The client requires both an API key and API secret.
|
|
43
30
|
|
|
@@ -50,10 +37,10 @@ client = ProxyCheapClient::Client.new(
|
|
|
50
37
|
)
|
|
51
38
|
```
|
|
52
39
|
|
|
53
|
-
|
|
40
|
+
### Usage Example
|
|
54
41
|
|
|
55
42
|
```ruby
|
|
56
|
-
require "
|
|
43
|
+
require "proxy-cheap-client"
|
|
57
44
|
|
|
58
45
|
client = ProxyCheapClient::Client.new(
|
|
59
46
|
api_key: "your_api_key_here",
|
|
@@ -65,7 +52,7 @@ balance = client.balance
|
|
|
65
52
|
puts "Balance: #{balance.amount} #{balance.currency}"
|
|
66
53
|
```
|
|
67
54
|
|
|
68
|
-
|
|
55
|
+
### Load Proxies
|
|
69
56
|
|
|
70
57
|
```ruby
|
|
71
58
|
proxies = client.proxies
|
|
@@ -74,35 +61,35 @@ proxies.each do |p|
|
|
|
74
61
|
end
|
|
75
62
|
```
|
|
76
63
|
|
|
77
|
-
|
|
64
|
+
### Load Specific Proxy
|
|
78
65
|
|
|
79
66
|
```ruby
|
|
80
|
-
proxy = ProxyCheapClient::Proxy.load(12345)
|
|
67
|
+
proxy = ProxyCheapClient::Proxy.load('12345')
|
|
81
68
|
puts "Proxy details: #{proxy.to_h}"
|
|
82
69
|
```
|
|
83
70
|
|
|
84
|
-
|
|
71
|
+
### Enable auto-extend for a proxy
|
|
85
72
|
|
|
86
73
|
```ruby
|
|
87
74
|
proxy.enable_auto_extend
|
|
88
75
|
puts "Auto-extend enabled"
|
|
89
76
|
```
|
|
90
77
|
|
|
91
|
-
|
|
78
|
+
### Disable auto-extend
|
|
92
79
|
|
|
93
80
|
```ruby
|
|
94
81
|
proxy.disable_auto_extend
|
|
95
82
|
puts "Auto-extend disabled"
|
|
96
83
|
```
|
|
97
84
|
|
|
98
|
-
|
|
85
|
+
### Supported Countries
|
|
99
86
|
|
|
100
87
|
```ruby
|
|
101
88
|
arr = client.countries
|
|
102
89
|
puts "Supported Countries: #{arr}"
|
|
103
90
|
```
|
|
104
91
|
|
|
105
|
-
|
|
92
|
+
### Order Residential Proxies
|
|
106
93
|
|
|
107
94
|
```ruby
|
|
108
95
|
order = client.order_static_residential_proxy(
|
|
@@ -112,13 +99,13 @@ order = client.order_static_residential_proxy(
|
|
|
112
99
|
)
|
|
113
100
|
```
|
|
114
101
|
|
|
115
|
-
|
|
102
|
+
### Order Proxies
|
|
116
103
|
|
|
117
104
|
```ruby
|
|
118
105
|
order.proxies
|
|
119
106
|
```
|
|
120
107
|
|
|
121
|
-
|
|
108
|
+
### Error Handling
|
|
122
109
|
|
|
123
110
|
The client raises specific exceptions for failure modes:
|
|
124
111
|
|
|
@@ -143,7 +130,7 @@ rescue ProxyCheapClient::Error => e
|
|
|
143
130
|
end
|
|
144
131
|
```
|
|
145
132
|
|
|
146
|
-
|
|
133
|
+
### Publishing
|
|
147
134
|
|
|
148
135
|
Build and push to RubyGems:
|
|
149
136
|
|
|
@@ -154,13 +141,13 @@ gem push proxy-cheap-client-#{ProxyCheapClient::VERSION}.gem
|
|
|
154
141
|
|
|
155
142
|
Make sure you have an account on RubyGems.org and appropriate credentials configured in `~/.gem/credentials`.
|
|
156
143
|
|
|
157
|
-
|
|
144
|
+
### Contributing
|
|
158
145
|
|
|
159
146
|
1. Fork the repository.
|
|
160
147
|
2. Create a feature branch: `git checkout -b feature/xyz`
|
|
161
148
|
3. Run tests (add test suite if missing).
|
|
162
149
|
4. Open a pull request with a clear description.
|
|
163
150
|
|
|
164
|
-
|
|
151
|
+
### License
|
|
165
152
|
|
|
166
153
|
This project is licensed under the MIT License. See `LICENSE.txt` for details.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: proxy-cheap-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Leandro Sardi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 2.
|
|
19
|
+
version: '2.13'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 2.
|
|
26
|
+
version: '2.13'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: json
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|