instagram-fixed 0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.yardopts +9 -0
- data/Gemfile +3 -0
- data/LICENSE.md +20 -0
- data/README.md +145 -0
- data/Rakefile +27 -0
- data/instagram.gemspec +37 -0
- data/lib/faraday/oauth2.rb +36 -0
- data/lib/faraday/raise_http_4xx.rb +37 -0
- data/lib/faraday/raise_http_5xx.rb +29 -0
- data/lib/instagram.rb +26 -0
- data/lib/instagram/api.rb +23 -0
- data/lib/instagram/client.rb +20 -0
- data/lib/instagram/client/comments.rb +62 -0
- data/lib/instagram/client/geographies.rb +29 -0
- data/lib/instagram/client/likes.rb +58 -0
- data/lib/instagram/client/locations.rb +59 -0
- data/lib/instagram/client/media.rb +63 -0
- data/lib/instagram/client/subscriptions.rb +157 -0
- data/lib/instagram/client/tags.rb +59 -0
- data/lib/instagram/client/users.rb +309 -0
- data/lib/instagram/client/utils.rb +15 -0
- data/lib/instagram/configuration.rb +90 -0
- data/lib/instagram/connection.rb +31 -0
- data/lib/instagram/error.rb +19 -0
- data/lib/instagram/oauth.rb +27 -0
- data/lib/instagram/request.rb +45 -0
- data/lib/instagram/version.rb +3 -0
- data/spec/faraday/response_spec.rb +28 -0
- data/spec/fixtures/access_token.json +9 -0
- data/spec/fixtures/approve_user.json +8 -0
- data/spec/fixtures/block_user.json +8 -0
- data/spec/fixtures/deny_user.json +8 -0
- data/spec/fixtures/follow_user.json +8 -0
- data/spec/fixtures/followed_by.json +1 -0
- data/spec/fixtures/follows.json +1 -0
- data/spec/fixtures/geography_recent_media.json +1 -0
- data/spec/fixtures/liked_media.json +1 -0
- data/spec/fixtures/location.json +1 -0
- data/spec/fixtures/location_recent_media.json +1 -0
- data/spec/fixtures/location_search.json +1 -0
- data/spec/fixtures/media.json +1 -0
- data/spec/fixtures/media_comment.json +1 -0
- data/spec/fixtures/media_comment_deleted.json +1 -0
- data/spec/fixtures/media_comments.json +1 -0
- data/spec/fixtures/media_liked.json +1 -0
- data/spec/fixtures/media_likes.json +1 -0
- data/spec/fixtures/media_popular.json +1 -0
- data/spec/fixtures/media_search.json +1 -0
- data/spec/fixtures/media_unliked.json +1 -0
- data/spec/fixtures/mikeyk.json +1 -0
- data/spec/fixtures/recent_media.json +1 -0
- data/spec/fixtures/relationship.json +9 -0
- data/spec/fixtures/requested_by.json +12 -0
- data/spec/fixtures/shayne.json +1 -0
- data/spec/fixtures/subscription.json +12 -0
- data/spec/fixtures/subscription_deleted.json +1 -0
- data/spec/fixtures/subscription_payload.json +14 -0
- data/spec/fixtures/subscriptions.json +22 -0
- data/spec/fixtures/tag.json +1 -0
- data/spec/fixtures/tag_recent_media.json +1 -0
- data/spec/fixtures/tag_search.json +1 -0
- data/spec/fixtures/unblock_user.json +8 -0
- data/spec/fixtures/unfollow_user.json +8 -0
- data/spec/fixtures/user_media_feed.json +1 -0
- data/spec/fixtures/user_search.json +1 -0
- data/spec/instagram/api_spec.rb +110 -0
- data/spec/instagram/client/comments_spec.rb +71 -0
- data/spec/instagram/client/geography_spec.rb +37 -0
- data/spec/instagram/client/likes_spec.rb +66 -0
- data/spec/instagram/client/locations_spec.rb +78 -0
- data/spec/instagram/client/media_spec.rb +78 -0
- data/spec/instagram/client/subscriptions_spec.rb +148 -0
- data/spec/instagram/client/tags_spec.rb +78 -0
- data/spec/instagram/client/users_spec.rb +400 -0
- data/spec/instagram/client_spec.rb +23 -0
- data/spec/instagram_spec.rb +97 -0
- data/spec/spec_helper.rb +59 -0
- metadata +253 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
begin
|
2
|
+
require 'simplecov'
|
3
|
+
rescue LoadError
|
4
|
+
# ignore
|
5
|
+
else
|
6
|
+
SimpleCov.start do
|
7
|
+
add_group 'Instagram', 'lib/instagram'
|
8
|
+
add_group 'Faraday Middleware', 'lib/faraday'
|
9
|
+
add_group 'Specs', 'spec'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
require File.expand_path('../../lib/instagram', __FILE__)
|
14
|
+
|
15
|
+
require 'rspec'
|
16
|
+
require 'webmock/rspec'
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.include WebMock::API
|
19
|
+
end
|
20
|
+
|
21
|
+
def a_delete(path)
|
22
|
+
a_request(:delete, Instagram.endpoint + path)
|
23
|
+
end
|
24
|
+
|
25
|
+
def a_get(path)
|
26
|
+
a_request(:get, Instagram.endpoint + path)
|
27
|
+
end
|
28
|
+
|
29
|
+
def a_post(path)
|
30
|
+
a_request(:post, Instagram.endpoint + path)
|
31
|
+
end
|
32
|
+
|
33
|
+
def a_put(path)
|
34
|
+
a_request(:put, Instagram.endpoint + path)
|
35
|
+
end
|
36
|
+
|
37
|
+
def stub_delete(path)
|
38
|
+
stub_request(:delete, Instagram.endpoint + path)
|
39
|
+
end
|
40
|
+
|
41
|
+
def stub_get(path)
|
42
|
+
stub_request(:get, Instagram.endpoint + path)
|
43
|
+
end
|
44
|
+
|
45
|
+
def stub_post(path)
|
46
|
+
stub_request(:post, Instagram.endpoint + path)
|
47
|
+
end
|
48
|
+
|
49
|
+
def stub_put(path)
|
50
|
+
stub_request(:put, Instagram.endpoint + path)
|
51
|
+
end
|
52
|
+
|
53
|
+
def fixture_path
|
54
|
+
File.expand_path("../fixtures", __FILE__)
|
55
|
+
end
|
56
|
+
|
57
|
+
def fixture(file)
|
58
|
+
File.new(fixture_path + '/' + file)
|
59
|
+
end
|
metadata
ADDED
@@ -0,0 +1,253 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: instagram-fixed
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.8'
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Shayne Sweeney
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-10-06 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: &2152368780 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.4'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2152368780
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: webmock
|
27
|
+
requirement: &2152367520 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.6'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *2152367520
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: bluecloth
|
38
|
+
requirement: &2152366560 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 2.0.11
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *2152366560
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: faraday
|
49
|
+
requirement: &2152365880 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *2152365880
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: faraday_middleware
|
60
|
+
requirement: &2152365220 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :runtime
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *2152365220
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: multi_json
|
71
|
+
requirement: &2152364660 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *2152364660
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: hashie
|
82
|
+
requirement: &2152364040 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *2152364040
|
91
|
+
description: A Ruby wrapper for the Instagram REST and Search APIs
|
92
|
+
email:
|
93
|
+
- shayne@instagr.am
|
94
|
+
executables: []
|
95
|
+
extensions: []
|
96
|
+
extra_rdoc_files: []
|
97
|
+
files:
|
98
|
+
- .gitignore
|
99
|
+
- .rspec
|
100
|
+
- .yardopts
|
101
|
+
- Gemfile
|
102
|
+
- LICENSE.md
|
103
|
+
- README.md
|
104
|
+
- Rakefile
|
105
|
+
- instagram.gemspec
|
106
|
+
- lib/faraday/oauth2.rb
|
107
|
+
- lib/faraday/raise_http_4xx.rb
|
108
|
+
- lib/faraday/raise_http_5xx.rb
|
109
|
+
- lib/instagram.rb
|
110
|
+
- lib/instagram/api.rb
|
111
|
+
- lib/instagram/client.rb
|
112
|
+
- lib/instagram/client/comments.rb
|
113
|
+
- lib/instagram/client/geographies.rb
|
114
|
+
- lib/instagram/client/likes.rb
|
115
|
+
- lib/instagram/client/locations.rb
|
116
|
+
- lib/instagram/client/media.rb
|
117
|
+
- lib/instagram/client/subscriptions.rb
|
118
|
+
- lib/instagram/client/tags.rb
|
119
|
+
- lib/instagram/client/users.rb
|
120
|
+
- lib/instagram/client/utils.rb
|
121
|
+
- lib/instagram/configuration.rb
|
122
|
+
- lib/instagram/connection.rb
|
123
|
+
- lib/instagram/error.rb
|
124
|
+
- lib/instagram/oauth.rb
|
125
|
+
- lib/instagram/request.rb
|
126
|
+
- lib/instagram/version.rb
|
127
|
+
- spec/faraday/response_spec.rb
|
128
|
+
- spec/fixtures/access_token.json
|
129
|
+
- spec/fixtures/approve_user.json
|
130
|
+
- spec/fixtures/block_user.json
|
131
|
+
- spec/fixtures/deny_user.json
|
132
|
+
- spec/fixtures/follow_user.json
|
133
|
+
- spec/fixtures/followed_by.json
|
134
|
+
- spec/fixtures/follows.json
|
135
|
+
- spec/fixtures/geography_recent_media.json
|
136
|
+
- spec/fixtures/liked_media.json
|
137
|
+
- spec/fixtures/location.json
|
138
|
+
- spec/fixtures/location_recent_media.json
|
139
|
+
- spec/fixtures/location_search.json
|
140
|
+
- spec/fixtures/media.json
|
141
|
+
- spec/fixtures/media_comment.json
|
142
|
+
- spec/fixtures/media_comment_deleted.json
|
143
|
+
- spec/fixtures/media_comments.json
|
144
|
+
- spec/fixtures/media_liked.json
|
145
|
+
- spec/fixtures/media_likes.json
|
146
|
+
- spec/fixtures/media_popular.json
|
147
|
+
- spec/fixtures/media_search.json
|
148
|
+
- spec/fixtures/media_unliked.json
|
149
|
+
- spec/fixtures/mikeyk.json
|
150
|
+
- spec/fixtures/recent_media.json
|
151
|
+
- spec/fixtures/relationship.json
|
152
|
+
- spec/fixtures/requested_by.json
|
153
|
+
- spec/fixtures/shayne.json
|
154
|
+
- spec/fixtures/subscription.json
|
155
|
+
- spec/fixtures/subscription_deleted.json
|
156
|
+
- spec/fixtures/subscription_payload.json
|
157
|
+
- spec/fixtures/subscriptions.json
|
158
|
+
- spec/fixtures/tag.json
|
159
|
+
- spec/fixtures/tag_recent_media.json
|
160
|
+
- spec/fixtures/tag_search.json
|
161
|
+
- spec/fixtures/unblock_user.json
|
162
|
+
- spec/fixtures/unfollow_user.json
|
163
|
+
- spec/fixtures/user_media_feed.json
|
164
|
+
- spec/fixtures/user_search.json
|
165
|
+
- spec/instagram/api_spec.rb
|
166
|
+
- spec/instagram/client/comments_spec.rb
|
167
|
+
- spec/instagram/client/geography_spec.rb
|
168
|
+
- spec/instagram/client/likes_spec.rb
|
169
|
+
- spec/instagram/client/locations_spec.rb
|
170
|
+
- spec/instagram/client/media_spec.rb
|
171
|
+
- spec/instagram/client/subscriptions_spec.rb
|
172
|
+
- spec/instagram/client/tags_spec.rb
|
173
|
+
- spec/instagram/client/users_spec.rb
|
174
|
+
- spec/instagram/client_spec.rb
|
175
|
+
- spec/instagram_spec.rb
|
176
|
+
- spec/spec_helper.rb
|
177
|
+
homepage: https://github.com/Instagram/instagramrb
|
178
|
+
licenses: []
|
179
|
+
post_install_message: ! "********************************************************************************\n\n
|
180
|
+
\ Follow @instagram on Twitter for announcements, updates, and news.\n https://twitter.com/instagramapi\n\n
|
181
|
+
\ Join the mailing list!\n https://groups.google.com/group/instagram-ruby-gem\n\n********************************************************************************\n"
|
182
|
+
rdoc_options: []
|
183
|
+
require_paths:
|
184
|
+
- lib
|
185
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
186
|
+
none: false
|
187
|
+
requirements:
|
188
|
+
- - ! '>='
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: '0'
|
191
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
|
+
none: false
|
193
|
+
requirements:
|
194
|
+
- - ! '>='
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: 1.3.6
|
197
|
+
requirements: []
|
198
|
+
rubyforge_project: instagram-fixed
|
199
|
+
rubygems_version: 1.8.10
|
200
|
+
signing_key:
|
201
|
+
specification_version: 3
|
202
|
+
summary: Ruby wrapper for the Instagram API
|
203
|
+
test_files:
|
204
|
+
- spec/faraday/response_spec.rb
|
205
|
+
- spec/fixtures/access_token.json
|
206
|
+
- spec/fixtures/approve_user.json
|
207
|
+
- spec/fixtures/block_user.json
|
208
|
+
- spec/fixtures/deny_user.json
|
209
|
+
- spec/fixtures/follow_user.json
|
210
|
+
- spec/fixtures/followed_by.json
|
211
|
+
- spec/fixtures/follows.json
|
212
|
+
- spec/fixtures/geography_recent_media.json
|
213
|
+
- spec/fixtures/liked_media.json
|
214
|
+
- spec/fixtures/location.json
|
215
|
+
- spec/fixtures/location_recent_media.json
|
216
|
+
- spec/fixtures/location_search.json
|
217
|
+
- spec/fixtures/media.json
|
218
|
+
- spec/fixtures/media_comment.json
|
219
|
+
- spec/fixtures/media_comment_deleted.json
|
220
|
+
- spec/fixtures/media_comments.json
|
221
|
+
- spec/fixtures/media_liked.json
|
222
|
+
- spec/fixtures/media_likes.json
|
223
|
+
- spec/fixtures/media_popular.json
|
224
|
+
- spec/fixtures/media_search.json
|
225
|
+
- spec/fixtures/media_unliked.json
|
226
|
+
- spec/fixtures/mikeyk.json
|
227
|
+
- spec/fixtures/recent_media.json
|
228
|
+
- spec/fixtures/relationship.json
|
229
|
+
- spec/fixtures/requested_by.json
|
230
|
+
- spec/fixtures/shayne.json
|
231
|
+
- spec/fixtures/subscription.json
|
232
|
+
- spec/fixtures/subscription_deleted.json
|
233
|
+
- spec/fixtures/subscription_payload.json
|
234
|
+
- spec/fixtures/subscriptions.json
|
235
|
+
- spec/fixtures/tag.json
|
236
|
+
- spec/fixtures/tag_recent_media.json
|
237
|
+
- spec/fixtures/tag_search.json
|
238
|
+
- spec/fixtures/unblock_user.json
|
239
|
+
- spec/fixtures/unfollow_user.json
|
240
|
+
- spec/fixtures/user_media_feed.json
|
241
|
+
- spec/fixtures/user_search.json
|
242
|
+
- spec/instagram/api_spec.rb
|
243
|
+
- spec/instagram/client/comments_spec.rb
|
244
|
+
- spec/instagram/client/geography_spec.rb
|
245
|
+
- spec/instagram/client/likes_spec.rb
|
246
|
+
- spec/instagram/client/locations_spec.rb
|
247
|
+
- spec/instagram/client/media_spec.rb
|
248
|
+
- spec/instagram/client/subscriptions_spec.rb
|
249
|
+
- spec/instagram/client/tags_spec.rb
|
250
|
+
- spec/instagram/client/users_spec.rb
|
251
|
+
- spec/instagram/client_spec.rb
|
252
|
+
- spec/instagram_spec.rb
|
253
|
+
- spec/spec_helper.rb
|