vkontakte_client 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7caa5eb916dc2794f24440aabd7b58090b89fdf2230a363d3e949a3403ca8a0
4
- data.tar.gz: f781826918653d3a1d65c7ef1c841c36881e0dab8d4f75715483068dced00a96
3
+ metadata.gz: b8d3a230ed8bef6aae1088c24a549aab7091b23607df29d03e14b457d7d99a93
4
+ data.tar.gz: ee3454be0e42025d186bab93212ef46400f5a57b542b976c827da7d5070b0404
5
5
  SHA512:
6
- metadata.gz: 65976cc3532beec29405f2a92d1ccb0cb6a759d171ec72f98e6aec2989647e32a909b4d76f620699530a42ff7610aba95c5b3bb3ca68a9ee014f7309b7daad5e
7
- data.tar.gz: 908def64e9eeb7d8566f3db6dce54733e9e811f2a5adde8b3db8731039ecdaa52d811c948edc5cf26dd10957387ed1658706e3c61abe7c6fde59c06eca9fd3fa
6
+ metadata.gz: ecf08ee6ef1ad27d6d1e81e85bf206a5a45b50ad0776ab2b0424eae17dc0e9cc0aee7a7c3e728993ee06533c5a99148ab2eca98b4f8b4af309aaabe359305ff1
7
+ data.tar.gz: b47c5720540656bb912047afeb71e094eb70648a81b44a88596e6ca0efa174d764065df319244cc2b035a8c9a332e02bd6654d97328ca01462b608e6bf2c0694
File without changes
data/README.md CHANGED
@@ -1,7 +1,19 @@
1
1
  # Vkontakte Client
2
2
 
3
+ [![Gem Version](https://img.shields.io/gem/v/vkontakte_client.svg?style=flat)](https://rubygems.org/gems/vkontakte_client)
4
+
3
5
  Ruby library for authorization of client applications and for access to the VK API
4
6
 
7
+ ## Installing
8
+
9
+ Add to your `Gemfile`:
10
+
11
+ ```ruby
12
+ gem 'vkontakte_client'
13
+ ```
14
+
15
+ Then `bundle install`
16
+
5
17
  ## Usage
6
18
 
7
19
  ``` ruby
@@ -38,7 +50,7 @@ The `login!` method takes the following arguments:
38
50
 
39
51
  * `email`: user login
40
52
  * `pass`: user password
41
- * `permissions`: requeste [application permissions](https://vk.com/dev/permissions)
53
+ * `permissions`: request [application permissions](https://vk.com/dev/permissions)
42
54
 
43
55
  ``` ruby
44
56
  vk.login!(email, pass, permissions: 'friends')
@@ -46,7 +58,7 @@ vk.login!(email, pass, permissions: 'friends')
46
58
 
47
59
  ### API Requests
48
60
 
49
- After successful authorization, you can [make requests to the API](http://vk.com/dev/api_requests) using the method name from the [API function list](http://vk.com/dev/methods).
61
+ After successful authorization, you can [make requests to the API](https://vk.com/dev/api_requests) using the method name from the [API function list](https://vk.com/dev/methods).
50
62
 
51
63
  The parameters of the corresponding API method are passed as `Hash`.
52
64
  Note that a method like `friends.get` needs to be passed as `friends_get`.
data/README.ru.md CHANGED
@@ -47,7 +47,7 @@ vk.login!(email, pass, permissions: 'friends')
47
47
 
48
48
  ### Вызов методов
49
49
 
50
- После успешной авторизации Вы можете [осуществлять запросы к API](http://vk.com/dev/api_requests) используя название метода из [списка функций API](http://vk.com/dev/methods).
50
+ После успешной авторизации Вы можете [осуществлять запросы к API](https://vk.com/dev/api_requests) используя название метода из [списка функций API](https://vk.com/dev/methods).
51
51
 
52
52
  Параметры соответствующего метода API передаются как `Hash`.
53
53
  Следует заметить что метод вида `friends.get` нужно передавать как `friends_get`.
@@ -16,7 +16,7 @@ if $PROGRAM_NAME == __FILE__
16
16
  vk = Vkontakte::Client.new(CLIENT_ID)
17
17
  vk.login!(email, pass)
18
18
 
19
- # http://vkontakte.ru/developers.php?o=-1&p=friends.get
19
+ # https://vk.com/dev/friends.get
20
20
  iam = vk.api.users_get(user_ids: vk.user_id, fields: 'online,last_seen').first
21
21
  friends = vk.api.friends_get(fields: 'online,last_seen')['items']
22
22
  friends << iam
data/lib/vkontakte/api.rb CHANGED
@@ -3,6 +3,8 @@
3
3
  module Vkontakte
4
4
  # Make Vkontakte API requests
5
5
  #
6
+ # https://vk.com/dev/api_requests
7
+ #
6
8
  class API
7
9
  attr_reader :access_token, :proxy, :api_version, :timeout
8
10
  attr_accessor :lang
@@ -5,6 +5,9 @@ module Vkontakte
5
5
  class Client
6
6
  attr_reader :api, :access_token, :user_id, :expires_in, :api_version
7
7
 
8
+ # Implicit Flow for User Access Token
9
+ #
10
+ # https://vk.com/dev/implicit_flow_user
8
11
  def initialize(
9
12
  client_id = nil,
10
13
  api_version: Vkontakte::API_VERSION,
@@ -45,9 +48,7 @@ module Vkontakte
45
48
  a.agent.set_proxy(@proxy.addr, @proxy.port) if @proxy&.http?
46
49
  end
47
50
 
48
- # https://vk.com/dev/implicit_flow_user
49
- #
50
- # Открытие диалога авторизации OAuth
51
+ # Opening Authorization Dialog
51
52
  #
52
53
  query_string = query.map { |k, v| "#{k}=#{v}" }.join('&')
53
54
  url = "https://oauth.vk.com/authorize?#{query_string}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vkontakte
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
@@ -14,5 +14,5 @@ require 'vkontakte/proxy'
14
14
  require 'vkontakte/ask_for_credentials'
15
15
 
16
16
  module Vkontakte
17
- API_VERSION = '5.101'
17
+ API_VERSION = '5.131'
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vkontakte_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Maminov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-08 00:00:00.000000000 Z
11
+ date: 2021-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -99,6 +99,7 @@ extra_rdoc_files: []
99
99
  files:
100
100
  - ".gitignore"
101
101
  - ".rubocop.yml"
102
+ - Gemfile
102
103
  - LICENSE
103
104
  - README.md
104
105
  - README.ru.md
@@ -114,7 +115,6 @@ files:
114
115
  - examples/remove_suspended_friends.rb
115
116
  - examples/users_get_offline.rb
116
117
  - examples/users_info.rb
117
- - gems.rb
118
118
  - lib/socksify_mechanize.rb
119
119
  - lib/vkontakte/api.rb
120
120
  - lib/vkontakte/api_error.rb