vkontakte 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/vkontakte.rb +1 -0
- data/lib/vkontakte/api/wall.rb +40 -0
- data/lib/vkontakte/app/user.rb +2 -0
- data/lib/vkontakte/version.rb +1 -1
- data/spec/api/wall_spec.rb +23 -0
- metadata +41 -34
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f9e74a6e041cf6c861a1931db68847b0fb8cc1ca
|
4
|
+
data.tar.gz: f12cd6096df03bec7a6a5ef0ed23abcc8f9cbd2f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 13024ef674630096d85152148973e3fa22169e346e745edec0310742ac43ed57ebb092cbf89a5092f877b578ab63853cddca01da1ccaecf6cdf04d4123a55e34
|
7
|
+
data.tar.gz: 5ad0580013d97120f28f819ef3032a83085ca44bbc9a44c9528b59f18e378f7770160336458300dddf800c69f4b7756a806fb84e514e1d637581add0baa836a5
|
data/lib/vkontakte.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
module Vkontakte
|
2
|
+
module Api
|
3
|
+
module Wall
|
4
|
+
|
5
|
+
def self.included(base)
|
6
|
+
base.class_eval do
|
7
|
+
define_method :wall do
|
8
|
+
@wall ||= Standart.new(self)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class Standart < Api::Base
|
14
|
+
# https://vk.com/dev/wall.get
|
15
|
+
#
|
16
|
+
def get(options = {})
|
17
|
+
call('wall.get', options)
|
18
|
+
end
|
19
|
+
|
20
|
+
# https://vk.com/dev/wall.getById
|
21
|
+
#
|
22
|
+
def getById(options = {})
|
23
|
+
call('wall.getById', options)
|
24
|
+
end
|
25
|
+
|
26
|
+
# https://vk.com/dev/wall.getComments
|
27
|
+
#
|
28
|
+
def getComments(options = {})
|
29
|
+
call('wall.getComments', options)
|
30
|
+
end
|
31
|
+
|
32
|
+
# https://vk.com/dev/wall.getReposts
|
33
|
+
#
|
34
|
+
def getReposts(options = {})
|
35
|
+
call('wall.getReposts', options)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/vkontakte/app/user.rb
CHANGED
data/lib/vkontakte/version.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Vkontakte::Api::Wall do
|
4
|
+
it 'should be valid' do
|
5
|
+
Vkontakte::Api::Wall.should be_a(Module)
|
6
|
+
end
|
7
|
+
|
8
|
+
context 'iframe' do
|
9
|
+
before(:each) do
|
10
|
+
@token = '3a3d250e705051b03ed479343c3ec2833783eea3eea29860182716ed1d40319'
|
11
|
+
@user = Vkontakte::App::User.new("2592709", :access_token => @token)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should return user wall posts' do
|
15
|
+
FakeWeb.register_uri(:get,
|
16
|
+
"https://api.vk.com/method/wall.get?owner_id=2592709&access_token=#{@token}",
|
17
|
+
:body => '{"response":{"count":2,"items":[1,2]}}')
|
18
|
+
|
19
|
+
@user.wall.get(:owner_id => 2592709).should eq ({"count" => 2, "items" => [1, 2]})
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vkontakte
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Igor Galeta
|
@@ -10,100 +9,108 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-08-14 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: activesupport
|
17
|
-
requirement:
|
18
|
-
none: false
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - '>='
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
|
-
version_requirements:
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
26
28
|
- !ruby/object:Gem::Dependency
|
27
29
|
name: httparty
|
28
|
-
requirement:
|
29
|
-
none: false
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
|
-
- -
|
32
|
+
- - '>='
|
32
33
|
- !ruby/object:Gem::Version
|
33
34
|
version: '0'
|
34
35
|
type: :runtime
|
35
36
|
prerelease: false
|
36
|
-
version_requirements:
|
37
|
-
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
description: 'The easiest way to access Vkontakte API and some other utils. '
|
38
43
|
email: galeta.igor@gmail.com
|
39
44
|
executables: []
|
40
45
|
extensions: []
|
41
46
|
extra_rdoc_files:
|
42
47
|
- README.rdoc
|
43
48
|
files:
|
44
|
-
- lib/vkontakte/
|
45
|
-
- lib/vkontakte/app/iframe.rb
|
46
|
-
- lib/vkontakte/app/base.rb
|
47
|
-
- lib/vkontakte/app/user.rb
|
48
|
-
- lib/vkontakte/utils.rb
|
49
|
-
- lib/vkontakte/api/secure.rb
|
50
|
-
- lib/vkontakte/api/profile.rb
|
49
|
+
- lib/vkontakte/api/base.rb
|
51
50
|
- lib/vkontakte/api/friends.rb
|
52
51
|
- lib/vkontakte/api/groups.rb
|
53
|
-
- lib/vkontakte/api/base.rb
|
54
52
|
- lib/vkontakte/api/likes.rb
|
55
53
|
- lib/vkontakte/api/photos.rb
|
54
|
+
- lib/vkontakte/api/profile.rb
|
55
|
+
- lib/vkontakte/api/secure.rb
|
56
|
+
- lib/vkontakte/api/wall.rb
|
57
|
+
- lib/vkontakte/app/base.rb
|
58
|
+
- lib/vkontakte/app/iframe.rb
|
59
|
+
- lib/vkontakte/app/secure.rb
|
60
|
+
- lib/vkontakte/app/user.rb
|
56
61
|
- lib/vkontakte/config.rb
|
62
|
+
- lib/vkontakte/utils.rb
|
57
63
|
- lib/vkontakte/version.rb
|
58
64
|
- lib/vkontakte.rb
|
59
65
|
- MIT-LICENSE
|
60
66
|
- Rakefile
|
61
67
|
- Gemfile
|
62
68
|
- README.rdoc
|
63
|
-
- spec/api/profile_spec.rb
|
64
|
-
- spec/api/secure_spec.rb
|
65
69
|
- spec/api/friends_spec.rb
|
70
|
+
- spec/api/groups_spec.rb
|
66
71
|
- spec/api/likes_spec.rb
|
67
72
|
- spec/api/photos_spec.rb
|
68
|
-
- spec/api/
|
69
|
-
- spec/
|
73
|
+
- spec/api/profile_spec.rb
|
74
|
+
- spec/api/secure_spec.rb
|
75
|
+
- spec/api/wall_spec.rb
|
70
76
|
- spec/apps/base_spec.rb
|
71
77
|
- spec/apps/iframe_spec.rb
|
72
78
|
- spec/apps/user_spec.rb
|
73
79
|
- spec/spec_helper.rb
|
80
|
+
- spec/vkontakte_spec.rb
|
74
81
|
homepage: https://github.com/galetahub/vkontakte
|
75
82
|
licenses: []
|
83
|
+
metadata: {}
|
76
84
|
post_install_message:
|
77
85
|
rdoc_options: []
|
78
86
|
require_paths:
|
79
87
|
- lib
|
80
88
|
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
89
|
requirements:
|
83
|
-
- -
|
90
|
+
- - '>='
|
84
91
|
- !ruby/object:Gem::Version
|
85
92
|
version: '0'
|
86
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
94
|
requirements:
|
89
|
-
- -
|
95
|
+
- - '>='
|
90
96
|
- !ruby/object:Gem::Version
|
91
97
|
version: '0'
|
92
98
|
requirements: []
|
93
99
|
rubyforge_project:
|
94
|
-
rubygems_version: 1.
|
100
|
+
rubygems_version: 2.1.11
|
95
101
|
signing_key:
|
96
|
-
specification_version:
|
102
|
+
specification_version: 4
|
97
103
|
summary: Vkontakte API
|
98
104
|
test_files:
|
99
|
-
- spec/api/profile_spec.rb
|
100
|
-
- spec/api/secure_spec.rb
|
101
105
|
- spec/api/friends_spec.rb
|
106
|
+
- spec/api/groups_spec.rb
|
102
107
|
- spec/api/likes_spec.rb
|
103
108
|
- spec/api/photos_spec.rb
|
104
|
-
- spec/api/
|
105
|
-
- spec/
|
109
|
+
- spec/api/profile_spec.rb
|
110
|
+
- spec/api/secure_spec.rb
|
111
|
+
- spec/api/wall_spec.rb
|
106
112
|
- spec/apps/base_spec.rb
|
107
113
|
- spec/apps/iframe_spec.rb
|
108
114
|
- spec/apps/user_spec.rb
|
109
115
|
- spec/spec_helper.rb
|
116
|
+
- spec/vkontakte_spec.rb
|