vkontakte 0.0.4 → 0.0.5
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/lib/vkontakte/api/photos.rb +1 -16
- data/lib/vkontakte/version.rb +1 -1
- data/spec/api/photos_spec.rb +10 -1
- data/spec/api/wall_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9d397c9179bf659b869b1c4ba366b6f4681885e
|
|
4
|
+
data.tar.gz: 0d635cfcb33482c4949d19b4eb9c29c1db828532
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a9ebdabaa59a7c44d247a1cd93759013492ffe5ddfb900f6e0d620f6f73cde13f50cd590e9df28cb8f8260e1933b9d733ebd16886e18506a906feb552a2b63b
|
|
7
|
+
data.tar.gz: 62b0c96c63e386cb629c362f08b4020814825d4e1bd54b5954c646b80a26e56a8ae45b21a810694b35c216359e93e9d1aba6b3dfe4560b274956cf4f0f283e5d
|
data/lib/vkontakte/api/photos.rb
CHANGED
|
@@ -10,14 +10,6 @@ module Vkontakte
|
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
module Extended
|
|
14
|
-
def self.included(base)
|
|
15
|
-
base.define_method :photos do
|
|
16
|
-
@photos ||= Extend.new(self)
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
|
|
21
13
|
class Standart < Api::Base
|
|
22
14
|
|
|
23
15
|
# возвращает список альбомов пользователя.
|
|
@@ -121,12 +113,7 @@ module Vkontakte
|
|
|
121
113
|
def saveWallPhoto(options={})
|
|
122
114
|
call('photos.saveWallPhoto', options)
|
|
123
115
|
end
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
class Extend < Standart
|
|
116
|
+
|
|
130
117
|
# возвращает список комментариев к фотографии.
|
|
131
118
|
#
|
|
132
119
|
def getComments(options={})
|
|
@@ -211,8 +198,6 @@ module Vkontakte
|
|
|
211
198
|
call('photos.delete', options)
|
|
212
199
|
end
|
|
213
200
|
end
|
|
214
|
-
|
|
215
|
-
|
|
216
201
|
end
|
|
217
202
|
end
|
|
218
203
|
end
|
data/lib/vkontakte/version.rb
CHANGED
data/spec/api/photos_spec.rb
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
require "spec_helper"
|
|
3
2
|
|
|
4
3
|
describe Vkontakte::Api::Photos do
|
|
@@ -24,5 +23,15 @@ describe Vkontakte::Api::Photos do
|
|
|
24
23
|
@iframe.photos.getAlbums.should == [{"aid" => "17071606","thumb_id" => "98054577","owner_id" => "6492","title" => "", "description" => "","created" => "1204576880","updated" => "1229532461", "size" => "3","privacy" => "0"}]
|
|
25
24
|
end
|
|
26
25
|
|
|
26
|
+
it "should be call getAllComments method" do
|
|
27
|
+
response = '{"response": { "items": [1,2,3] }}'
|
|
28
|
+
|
|
29
|
+
FakeWeb.register_uri(:get,
|
|
30
|
+
"https://api.vk.com/method/photos.getAllComments?access_token=#{@token}&owner_id=2592709",
|
|
31
|
+
:body => response)
|
|
32
|
+
|
|
33
|
+
@iframe.photos.getAllComments(:owner_id => 2592709)["items"].size.should == 3
|
|
34
|
+
end
|
|
35
|
+
|
|
27
36
|
end
|
|
28
37
|
end
|
data/spec/api/wall_spec.rb
CHANGED
|
@@ -5,7 +5,7 @@ describe Vkontakte::Api::Wall do
|
|
|
5
5
|
Vkontakte::Api::Wall.should be_a(Module)
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
context '
|
|
8
|
+
context 'user' do
|
|
9
9
|
before(:each) do
|
|
10
10
|
@token = '3a3d250e705051b03ed479343c3ec2833783eea3eea29860182716ed1d40319'
|
|
11
11
|
@user = Vkontakte::App::User.new("2592709", :access_token => @token)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vkontakte
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Igor Galeta
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-08-
|
|
12
|
+
date: 2014-08-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|