vk-api 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a51735df839675e8b4bd1681670325ae3a83a0ad
4
- data.tar.gz: 2899b4dd5a3a6b69ce68dc98613224618e4c83ec
3
+ metadata.gz: 6cbdb5f395faef86473de2a9ce2a1f520508d7a8
4
+ data.tar.gz: fdbe4a5208dff10562bcc29d4f5506b9aea03702
5
5
  SHA512:
6
- metadata.gz: 0baf7361e41bf151715ffc403cf4d6aa6d7c81491a7a3675789136e4bdbcc4aa823cb13d49292d25d50648591e3869212c46b18edd7b95708a7f5095d71ab110
7
- data.tar.gz: eb740c3ae171c6f06b1895be4033ee7e038eff242d315f32167db3123a7a97b8cf0d73fd5de8bc1c958eae15d62e02f765999de32b7d5d1c5e6a7e30c4d6febe
6
+ metadata.gz: a63fe064984bc797eb4f452934da7cdb6bb605e2c686ba572eabb4a10970c85e66357af808da4369f73931b056ec63669b25c84e218d3b40fe0c6b3131c4af30
7
+ data.tar.gz: 870fec11783870275979f0982cec0795f597c2e24a0a32ca2a88204a237b0e3f9c83f87a39e71f1c950792d43c080709a9926316a4c27c6d71901944f715fcfb
@@ -2,10 +2,10 @@ class VkApi::Client
2
2
  attr_accessor :access_token
3
3
  attr_reader :expires_in
4
4
 
5
- def initialize(params)
5
+ def initialize(params = {})
6
6
  @params = {
7
7
  redirect_url: 'https://oauth.vk.com/blank.html',
8
- version: '5.28',
8
+ v: '5.28',
9
9
  settings: 'notify,friends,offline',
10
10
  display: 'page',
11
11
  host: 'https://api.vk.com'
@@ -15,7 +15,7 @@ class VkApi::Client
15
15
  end
16
16
 
17
17
  def api(method, params = {})
18
- params[:version] ||= @params[:version]
18
+ params[:v] ||= @params[:v]
19
19
  params[:access_token] ||= @access_token
20
20
 
21
21
  url = URI.encode_www_form(params)
@@ -23,7 +23,7 @@ class VkApi::Client
23
23
 
24
24
  res = browser.request url
25
25
  if res['error']
26
- if res['error']['code'] == 14 && @params[:antigate]
26
+ if res['error']['error_code'] == 14 && @params[:antigate]
27
27
  min = @params[:antigate_min]
28
28
  if !min || min > Antigate.balance(@params[:antigate])
29
29
  gate = Antigate.wrap @params[:antigate]
@@ -1,3 +1,3 @@
1
1
  module VkApi
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vk-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - JWo1F
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-02 00:00:00.000000000 Z
11
+ date: 2015-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler