vkponchik 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +0 -0
- data/.gitignore +0 -0
- data/.rspec +0 -0
- data/.rubocop.yml +0 -0
- data/.ruby-version +1 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +21 -22
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/lib/vkponchik/client.rb +2 -15
- data/lib/vkponchik/response.rb +0 -0
- data/lib/vkponchik/version.rb +1 -1
- data/lib/vkponchik.rb +0 -0
- data/vkponchik.gemspec +7 -4
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2aabb37687485efb7d15a1d3f8e0ce8601cad57a58be4e1592f0cbc76b2c57b
|
4
|
+
data.tar.gz: 329566109b70a119945d369cbcc2731bfdffa9be7102be0b8ee400c5592f1b6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3261be899e0c0ec281aa836982d1985dae2476740a849bbd8ab0e10ce10cd842c0d66967596da7e3f33633bc81a988e969a190d48373de578a4b4c6c0d88a42e
|
7
|
+
data.tar.gz: 7522b26bf34e903c785c9b226c26f2773ebbfce3ef31f058e8a7cd3ca9390f5701dbef44eea6dc90c11cc035fe37d4e70ce0bf04804c40f3411f91f138fb1f07
|
data/.github/workflows/main.yml
CHANGED
File without changes
|
data/.gitignore
CHANGED
File without changes
|
data/.rspec
CHANGED
File without changes
|
data/.rubocop.yml
CHANGED
File without changes
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.7.2
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vkponchik (1.
|
4
|
+
vkponchik (1.1.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
9
|
+
ast (2.4.2)
|
10
10
|
diff-lcs (1.4.4)
|
11
|
-
docile (1.
|
11
|
+
docile (1.4.0)
|
12
12
|
dotenv (2.7.6)
|
13
|
-
parallel (1.
|
14
|
-
parser (3.0.
|
13
|
+
parallel (1.21.0)
|
14
|
+
parser (3.0.2.0)
|
15
15
|
ast (~> 2.4.1)
|
16
16
|
rainbow (3.0.0)
|
17
|
-
rake (13.0.
|
18
|
-
regexp_parser (2.
|
19
|
-
rexml (3.2.
|
17
|
+
rake (13.0.6)
|
18
|
+
regexp_parser (2.1.1)
|
19
|
+
rexml (3.2.5)
|
20
20
|
rspec (3.10.0)
|
21
21
|
rspec-core (~> 3.10.0)
|
22
22
|
rspec-expectations (~> 3.10.0)
|
@@ -26,34 +26,33 @@ GEM
|
|
26
26
|
rspec-expectations (3.10.1)
|
27
27
|
diff-lcs (>= 1.2.0, < 2.0)
|
28
28
|
rspec-support (~> 3.10.0)
|
29
|
-
rspec-mocks (3.10.
|
29
|
+
rspec-mocks (3.10.2)
|
30
30
|
diff-lcs (>= 1.2.0, < 2.0)
|
31
31
|
rspec-support (~> 3.10.0)
|
32
|
-
rspec-support (3.10.
|
33
|
-
rubocop (1.
|
32
|
+
rspec-support (3.10.3)
|
33
|
+
rubocop (1.23.0)
|
34
34
|
parallel (~> 1.10)
|
35
35
|
parser (>= 3.0.0.0)
|
36
36
|
rainbow (>= 2.2.2, < 4.0)
|
37
37
|
regexp_parser (>= 1.8, < 3.0)
|
38
38
|
rexml
|
39
|
-
rubocop-ast (>= 1.
|
39
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
40
40
|
ruby-progressbar (~> 1.7)
|
41
41
|
unicode-display_width (>= 1.4.0, < 3.0)
|
42
|
-
rubocop-ast (1.
|
43
|
-
parser (>=
|
44
|
-
rubocop-rake (0.
|
45
|
-
rubocop
|
46
|
-
rubocop-rspec (2.1.0)
|
42
|
+
rubocop-ast (1.13.0)
|
43
|
+
parser (>= 3.0.1.1)
|
44
|
+
rubocop-rake (0.6.0)
|
47
45
|
rubocop (~> 1.0)
|
48
|
-
|
46
|
+
rubocop-rspec (2.6.0)
|
47
|
+
rubocop (~> 1.19)
|
49
48
|
ruby-progressbar (1.11.0)
|
50
|
-
simplecov (0.21.
|
49
|
+
simplecov (0.21.2)
|
51
50
|
docile (~> 1.1)
|
52
51
|
simplecov-html (~> 0.11)
|
53
52
|
simplecov_json_formatter (~> 0.1)
|
54
53
|
simplecov-html (0.12.3)
|
55
|
-
simplecov_json_formatter (0.1.
|
56
|
-
unicode-display_width (2.
|
54
|
+
simplecov_json_formatter (0.1.3)
|
55
|
+
unicode-display_width (2.1.0)
|
57
56
|
|
58
57
|
PLATFORMS
|
59
58
|
x86_64-linux
|
@@ -69,4 +68,4 @@ DEPENDENCIES
|
|
69
68
|
vkponchik!
|
70
69
|
|
71
70
|
BUNDLED WITH
|
72
|
-
2.2.
|
71
|
+
2.2.27
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/lib/vkponchik/client.rb
CHANGED
@@ -7,13 +7,8 @@ module Vkponchik
|
|
7
7
|
# API client class
|
8
8
|
class Client
|
9
9
|
API_VERSION = 1
|
10
|
-
API_BASE = 'https://api.
|
10
|
+
API_BASE = 'https://api.keksik.io'
|
11
11
|
API_HEADERS = { 'Content-Type' => 'application/json' }.freeze
|
12
|
-
API_METHODS = [
|
13
|
-
'donates/get', 'donates/change-status', 'donates/answer', 'donates/change-reward-status',
|
14
|
-
'campaigns/get', 'campaigns/get-active', 'campaigns/get-rewards', 'campaigns/change',
|
15
|
-
'campaigns/change-reward', 'payments/get', 'payments/create', 'balance'
|
16
|
-
].freeze
|
17
12
|
|
18
13
|
# Initialize new client
|
19
14
|
# @param group [Integer] group ID
|
@@ -24,12 +19,10 @@ module Vkponchik
|
|
24
19
|
end
|
25
20
|
|
26
21
|
# Send POST request to API server
|
27
|
-
# @param method [String]
|
22
|
+
# @param method [String] method name
|
28
23
|
# @param params [Hash] parameters to pass in POST request
|
29
24
|
# @return [Hash]
|
30
25
|
def request(method, **params)
|
31
|
-
validate_request_options(method, **params)
|
32
|
-
|
33
26
|
params[:v] = API_VERSION
|
34
27
|
params[:group] = @group
|
35
28
|
params[:token] = @token
|
@@ -41,11 +34,5 @@ module Vkponchik
|
|
41
34
|
rescue StandardError
|
42
35
|
raise Vkponchik::Error, 'Request failure'
|
43
36
|
end
|
44
|
-
|
45
|
-
private
|
46
|
-
|
47
|
-
def validate_request_options(method, **_params)
|
48
|
-
raise Vkponchik::Error, 'Invalid request method' unless API_METHODS.include?(method)
|
49
|
-
end
|
50
37
|
end
|
51
38
|
end
|
data/lib/vkponchik/response.rb
CHANGED
File without changes
|
data/lib/vkponchik/version.rb
CHANGED
data/lib/vkponchik.rb
CHANGED
File without changes
|
data/vkponchik.gemspec
CHANGED
@@ -8,14 +8,17 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['Vladislav Kuznecov']
|
9
9
|
spec.email = ['fizvlad@mail.ru']
|
10
10
|
|
11
|
-
spec.summary = 'API client for VK Ponchik donations service.'
|
11
|
+
spec.summary = 'API client for VK Ponchik (Keksik) donations service.'
|
12
12
|
spec.homepage = 'https://github.com/fizvlad/vkponchik-rb'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
|
15
15
|
|
16
|
-
spec.metadata
|
17
|
-
|
18
|
-
|
16
|
+
spec.metadata = {
|
17
|
+
'rubygems_mfa_required' => 'true',
|
18
|
+
'homepage_uri' => spec.homepage,
|
19
|
+
'source_code_uri' => 'https://github.com/fizvlad/vkponchik-rb',
|
20
|
+
'changelog_uri' => 'https://github.com/fizvlad/vkponchik-rb/releases'
|
21
|
+
}
|
19
22
|
|
20
23
|
# Specify which files should be added to the gem when it is released.
|
21
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vkponchik
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Kuznecov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -21,6 +21,7 @@ files:
|
|
21
21
|
- ".gitignore"
|
22
22
|
- ".rspec"
|
23
23
|
- ".rubocop.yml"
|
24
|
+
- ".ruby-version"
|
24
25
|
- Gemfile
|
25
26
|
- Gemfile.lock
|
26
27
|
- LICENSE.txt
|
@@ -37,6 +38,7 @@ homepage: https://github.com/fizvlad/vkponchik-rb
|
|
37
38
|
licenses:
|
38
39
|
- MIT
|
39
40
|
metadata:
|
41
|
+
rubygems_mfa_required: 'true'
|
40
42
|
homepage_uri: https://github.com/fizvlad/vkponchik-rb
|
41
43
|
source_code_uri: https://github.com/fizvlad/vkponchik-rb
|
42
44
|
changelog_uri: https://github.com/fizvlad/vkponchik-rb/releases
|
@@ -55,8 +57,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
57
|
- !ruby/object:Gem::Version
|
56
58
|
version: '0'
|
57
59
|
requirements: []
|
58
|
-
rubygems_version: 3.2.
|
60
|
+
rubygems_version: 3.2.27
|
59
61
|
signing_key:
|
60
62
|
specification_version: 4
|
61
|
-
summary: API client for VK Ponchik donations service.
|
63
|
+
summary: API client for VK Ponchik (Keksik) donations service.
|
62
64
|
test_files: []
|