social_net 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +11 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +94 -0
  5. data/MIT-LICENSE +20 -0
  6. data/README.md +264 -0
  7. data/Rakefile +2 -0
  8. data/coverage/.last_run.json +5 -0
  9. data/coverage/.resultset.json +847 -0
  10. data/coverage/.resultset.json.lock +0 -0
  11. data/coverage/assets/0.9.0/application.css +799 -0
  12. data/coverage/assets/0.9.0/application.js +1707 -0
  13. data/coverage/assets/0.9.0/colorbox/border.png +0 -0
  14. data/coverage/assets/0.9.0/colorbox/controls.png +0 -0
  15. data/coverage/assets/0.9.0/colorbox/loading.gif +0 -0
  16. data/coverage/assets/0.9.0/colorbox/loading_background.png +0 -0
  17. data/coverage/assets/0.9.0/favicon_green.png +0 -0
  18. data/coverage/assets/0.9.0/favicon_red.png +0 -0
  19. data/coverage/assets/0.9.0/favicon_yellow.png +0 -0
  20. data/coverage/assets/0.9.0/loading.gif +0 -0
  21. data/coverage/assets/0.9.0/magnify.png +0 -0
  22. data/coverage/assets/0.9.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  23. data/coverage/assets/0.9.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  24. data/coverage/assets/0.9.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  25. data/coverage/assets/0.9.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  26. data/coverage/assets/0.9.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  27. data/coverage/assets/0.9.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  28. data/coverage/assets/0.9.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  29. data/coverage/assets/0.9.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  30. data/coverage/assets/0.9.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  31. data/coverage/assets/0.9.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  32. data/coverage/assets/0.9.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  33. data/coverage/assets/0.9.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  34. data/coverage/assets/0.9.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  35. data/coverage/index.html +5624 -0
  36. data/lib/social_net/facebook/api/configuration.rb +14 -0
  37. data/lib/social_net/facebook/api/request.rb +66 -0
  38. data/lib/social_net/facebook/config.rb +16 -0
  39. data/lib/social_net/facebook/errors/response_error.rb +14 -0
  40. data/lib/social_net/facebook/errors/unknown_user.rb +11 -0
  41. data/lib/social_net/facebook/errors.rb +2 -0
  42. data/lib/social_net/facebook/models/page.rb +49 -0
  43. data/lib/social_net/facebook/models/user.rb +66 -0
  44. data/lib/social_net/facebook/models.rb +2 -0
  45. data/lib/social_net/facebook.rb +11 -0
  46. data/lib/social_net/instagram/api/configuration.rb +13 -0
  47. data/lib/social_net/instagram/api/request.rb +63 -0
  48. data/lib/social_net/instagram/config.rb +16 -0
  49. data/lib/social_net/instagram/errors/response_error.rb +14 -0
  50. data/lib/social_net/instagram/errors/unknown_user.rb +11 -0
  51. data/lib/social_net/instagram/errors.rb +2 -0
  52. data/lib/social_net/instagram/models/user.rb +70 -0
  53. data/lib/social_net/instagram/models.rb +1 -0
  54. data/lib/social_net/instagram.rb +10 -0
  55. data/lib/social_net/twitter/api/configuration.rb +16 -0
  56. data/lib/social_net/twitter/api/request.rb +121 -0
  57. data/lib/social_net/twitter/config.rb +15 -0
  58. data/lib/social_net/twitter/errors/response_error.rb +14 -0
  59. data/lib/social_net/twitter/errors/suspended_user.rb +11 -0
  60. data/lib/social_net/twitter/errors/too_many_users.rb +11 -0
  61. data/lib/social_net/twitter/errors/unknown_user.rb +11 -0
  62. data/lib/social_net/twitter/errors.rb +4 -0
  63. data/lib/social_net/twitter/models/user.rb +81 -0
  64. data/lib/social_net/twitter/models.rb +1 -0
  65. data/lib/social_net/twitter.rb +11 -0
  66. data/lib/social_net/version.rb +3 -0
  67. data/lib/social_net.rb +7 -0
  68. data/social_net-0.1.0.gem +0 -0
  69. data/social_net.gemspec +30 -0
  70. data/spec/social_net/facebook/models/pages_spec.rb +42 -0
  71. data/spec/social_net/facebook/models/users_spec.rb +44 -0
  72. data/spec/social_net/instagram/models/user_spec.rb +50 -0
  73. data/spec/social_net/twitter/models/user_spec.rb +98 -0
  74. data/spec/spec_helper.rb +11 -0
  75. data/spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml +106 -0
  76. data/spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_unknown_username/.yml +51 -0
  77. data/spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml +106 -0
  78. data/spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_unknown_username/.yml +51 -0
  79. data/spec/support/vcr.rb +22 -0
  80. metadata +245 -0
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.instagram.com/v1/users/search?access_token=INSTAGRAM_ACCESS_TOKEN&q=01LjqweoojkjR
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Content-Type:
22
+ - application/json; charset=utf-8
23
+ Vary:
24
+ - Cookie, Accept-Language
25
+ Cache-Control:
26
+ - private, no-cache, no-store, must-revalidate
27
+ Content-Language:
28
+ - en
29
+ Date:
30
+ - Mon, 13 Mar 2017 22:40:45 GMT
31
+ Expires:
32
+ - Sat, 01 Jan 2000 00:00:00 GMT
33
+ Pragma:
34
+ - no-cache
35
+ X-Ratelimit-Remaining:
36
+ - '477'
37
+ X-Ratelimit-Limit:
38
+ - '500'
39
+ Set-Cookie:
40
+ - csrftoken=pUh8JQ0dg8w3skYi7btRyxSuv40QaXSl; expires=Mon, 12-Mar-2018 22:40:45
41
+ GMT; Max-Age=31449600; Path=/; Secure
42
+ Connection:
43
+ - keep-alive
44
+ Content-Length:
45
+ - '35'
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"data": [], "meta": {"code": 200}}'
49
+ http_version:
50
+ recorded_at: Mon, 13 Mar 2017 22:40:46 GMT
51
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,22 @@
1
+ require 'webmock/rspec'
2
+ require 'vcr'
3
+
4
+ VCR.configure do |c|
5
+ c.configure_rspec_metadata!
6
+ c.cassette_library_dir = 'spec/support/cassettes'
7
+ c.hook_into :webmock
8
+ c.filter_sensitive_data('INSTAGRAM_ACCESS_TOKEN') { SocialNet::Instagram.configuration.access_token }
9
+ c.filter_sensitive_data('ACCESS_TOKEN') do |interaction|
10
+ if interaction.request.headers['Authorization']
11
+ interaction.request.headers['Authorization'].first
12
+ else
13
+ JSON(interaction.response.body)['access_token']
14
+ end
15
+ end
16
+ c.filter_sensitive_data(12345678) do |interaction|
17
+ if interaction.response.status.code == 429
18
+ interaction.response.headers['X-Rate-Limit-Reset'].first
19
+ end
20
+ end
21
+ c.ignore_hosts 'graph.facebook.com'
22
+ end
metadata ADDED
@@ -0,0 +1,245 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: social_net
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Jeremy Cohen Hoffing
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: yard
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.8.7
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.8.7
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.7.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.7.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: vcr
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.9'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2.9'
111
+ - !ruby/object:Gem::Dependency
112
+ name: webmock
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.19'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.19'
125
+ description: Retrieves information for Instagram users
126
+ email:
127
+ - jeremy@collabcreators.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - CHANGELOG.md
133
+ - Gemfile
134
+ - Gemfile.lock
135
+ - MIT-LICENSE
136
+ - README.md
137
+ - Rakefile
138
+ - coverage/.last_run.json
139
+ - coverage/.resultset.json
140
+ - coverage/.resultset.json.lock
141
+ - coverage/assets/0.9.0/application.css
142
+ - coverage/assets/0.9.0/application.js
143
+ - coverage/assets/0.9.0/colorbox/border.png
144
+ - coverage/assets/0.9.0/colorbox/controls.png
145
+ - coverage/assets/0.9.0/colorbox/loading.gif
146
+ - coverage/assets/0.9.0/colorbox/loading_background.png
147
+ - coverage/assets/0.9.0/favicon_green.png
148
+ - coverage/assets/0.9.0/favicon_red.png
149
+ - coverage/assets/0.9.0/favicon_yellow.png
150
+ - coverage/assets/0.9.0/loading.gif
151
+ - coverage/assets/0.9.0/magnify.png
152
+ - coverage/assets/0.9.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
153
+ - coverage/assets/0.9.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
154
+ - coverage/assets/0.9.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
155
+ - coverage/assets/0.9.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
156
+ - coverage/assets/0.9.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png
157
+ - coverage/assets/0.9.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
158
+ - coverage/assets/0.9.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
159
+ - coverage/assets/0.9.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
160
+ - coverage/assets/0.9.0/smoothness/images/ui-icons_222222_256x240.png
161
+ - coverage/assets/0.9.0/smoothness/images/ui-icons_2e83ff_256x240.png
162
+ - coverage/assets/0.9.0/smoothness/images/ui-icons_454545_256x240.png
163
+ - coverage/assets/0.9.0/smoothness/images/ui-icons_888888_256x240.png
164
+ - coverage/assets/0.9.0/smoothness/images/ui-icons_cd0a0a_256x240.png
165
+ - coverage/index.html
166
+ - lib/social_net.rb
167
+ - lib/social_net/facebook.rb
168
+ - lib/social_net/facebook/api/configuration.rb
169
+ - lib/social_net/facebook/api/request.rb
170
+ - lib/social_net/facebook/config.rb
171
+ - lib/social_net/facebook/errors.rb
172
+ - lib/social_net/facebook/errors/response_error.rb
173
+ - lib/social_net/facebook/errors/unknown_user.rb
174
+ - lib/social_net/facebook/models.rb
175
+ - lib/social_net/facebook/models/page.rb
176
+ - lib/social_net/facebook/models/user.rb
177
+ - lib/social_net/instagram.rb
178
+ - lib/social_net/instagram/api/configuration.rb
179
+ - lib/social_net/instagram/api/request.rb
180
+ - lib/social_net/instagram/config.rb
181
+ - lib/social_net/instagram/errors.rb
182
+ - lib/social_net/instagram/errors/response_error.rb
183
+ - lib/social_net/instagram/errors/unknown_user.rb
184
+ - lib/social_net/instagram/models.rb
185
+ - lib/social_net/instagram/models/user.rb
186
+ - lib/social_net/twitter.rb
187
+ - lib/social_net/twitter/api/configuration.rb
188
+ - lib/social_net/twitter/api/request.rb
189
+ - lib/social_net/twitter/config.rb
190
+ - lib/social_net/twitter/errors.rb
191
+ - lib/social_net/twitter/errors/response_error.rb
192
+ - lib/social_net/twitter/errors/suspended_user.rb
193
+ - lib/social_net/twitter/errors/too_many_users.rb
194
+ - lib/social_net/twitter/errors/unknown_user.rb
195
+ - lib/social_net/twitter/models.rb
196
+ - lib/social_net/twitter/models/user.rb
197
+ - lib/social_net/version.rb
198
+ - social_net-0.1.0.gem
199
+ - social_net.gemspec
200
+ - spec/social_net/facebook/models/pages_spec.rb
201
+ - spec/social_net/facebook/models/users_spec.rb
202
+ - spec/social_net/instagram/models/user_spec.rb
203
+ - spec/social_net/twitter/models/user_spec.rb
204
+ - spec/spec_helper.rb
205
+ - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
206
+ - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_unknown_username/.yml
207
+ - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
208
+ - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_unknown_username/.yml
209
+ - spec/support/vcr.rb
210
+ homepage: https://github.com/CollabCreators/social_net
211
+ licenses:
212
+ - MIT
213
+ metadata: {}
214
+ post_install_message:
215
+ rdoc_options: []
216
+ require_paths:
217
+ - lib
218
+ required_ruby_version: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ required_rubygems_version: !ruby/object:Gem::Requirement
224
+ requirements:
225
+ - - ">="
226
+ - !ruby/object:Gem::Version
227
+ version: '0'
228
+ requirements: []
229
+ rubyforge_project:
230
+ rubygems_version: 2.4.5.1
231
+ signing_key:
232
+ specification_version: 4
233
+ summary: An API Client for social networks
234
+ test_files:
235
+ - spec/social_net/facebook/models/pages_spec.rb
236
+ - spec/social_net/facebook/models/users_spec.rb
237
+ - spec/social_net/instagram/models/user_spec.rb
238
+ - spec/social_net/twitter/models/user_spec.rb
239
+ - spec/spec_helper.rb
240
+ - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
241
+ - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by/given_an_unknown_username/.yml
242
+ - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_existing_case-insensitive_username/returns_an_object_representing_that_user.yml
243
+ - spec/support/cassettes/SocialNet_Instagram_Models_User/_find_by_/given_an_unknown_username/.yml
244
+ - spec/support/vcr.rb
245
+ has_rdoc: