extendi-instagram 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/.yardopts +9 -0
- data/Gemfile +3 -0
- data/LICENSE.md +30 -0
- data/PATENTS.md +23 -0
- data/README.md +260 -0
- data/Rakefile +27 -0
- data/instagram.gemspec +50 -0
- data/lib/faraday/loud_logger.rb +78 -0
- data/lib/faraday/oauth2.rb +45 -0
- data/lib/faraday/raise_http_exception.rb +73 -0
- data/lib/instagram/api.rb +31 -0
- data/lib/instagram/client/comments.rb +62 -0
- data/lib/instagram/client/embedding.rb +28 -0
- data/lib/instagram/client/geographies.rb +29 -0
- data/lib/instagram/client/likes.rb +58 -0
- data/lib/instagram/client/locations.rb +75 -0
- data/lib/instagram/client/media.rb +82 -0
- data/lib/instagram/client/subscriptions.rb +211 -0
- data/lib/instagram/client/tags.rb +59 -0
- data/lib/instagram/client/users.rb +310 -0
- data/lib/instagram/client/utils.rb +28 -0
- data/lib/instagram/client.rb +21 -0
- data/lib/instagram/configuration.rb +125 -0
- data/lib/instagram/connection.rb +31 -0
- data/lib/instagram/error.rb +34 -0
- data/lib/instagram/oauth.rb +36 -0
- data/lib/instagram/request.rb +83 -0
- data/lib/instagram/response.rb +22 -0
- data/lib/instagram/version.rb +3 -0
- data/lib/instagram.rb +27 -0
- data/spec/faraday/response_spec.rb +101 -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/location_search_facebook.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_shortcode.json +1 -0
- data/spec/fixtures/media_unliked.json +1 -0
- data/spec/fixtures/mikeyk.json +1 -0
- data/spec/fixtures/oembed.json +14 -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 +285 -0
- data/spec/instagram/client/comments_spec.rb +71 -0
- data/spec/instagram/client/embedding_spec.rb +36 -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 +127 -0
- data/spec/instagram/client/media_spec.rb +99 -0
- data/spec/instagram/client/subscriptions_spec.rb +174 -0
- data/spec/instagram/client/tags_spec.rb +79 -0
- data/spec/instagram/client/users_spec.rb +432 -0
- data/spec/instagram/client/utils_spec.rb +32 -0
- data/spec/instagram/client_spec.rb +23 -0
- data/spec/instagram/request_spec.rb +56 -0
- data/spec/instagram_spec.rb +109 -0
- data/spec/spec_helper.rb +71 -0
- metadata +322 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3db85613f140026a6aaba37c175af937cb999a56
|
4
|
+
data.tar.gz: d1317eaf31ae2b978c46d68aa10a63dea7d04367
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 85feeae6d732239bc73f0b6a7cf78a282583dacf7f1f8314cc1cfc0c6463d6bfa02a0ed35c71d939dac6c6cc0efdb17ddaba098274c8d259755e208df3595c46
|
7
|
+
data.tar.gz: fec0a6576908f04c02a3685a911416a8e2e6c867d542136bce1c8291c73726d2a6dd6348c1a5db0a8247fc4037f5ab1180de49a1adfd3f60d3b658666f448518
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/Gemfile
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
BSD License
|
2
|
+
|
3
|
+
For Ruby Instagram Gem software
|
4
|
+
|
5
|
+
Copyright (c) 2014, Facebook, Inc. All rights reserved.
|
6
|
+
|
7
|
+
Redistribution and use in source and binary forms, with or without modification,
|
8
|
+
are permitted provided that the following conditions are met:
|
9
|
+
|
10
|
+
* Redistributions of source code must retain the above copyright notice, this
|
11
|
+
list of conditions and the following disclaimer.
|
12
|
+
|
13
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
14
|
+
this list of conditions and the following disclaimer in the documentation
|
15
|
+
and/or other materials provided with the distribution.
|
16
|
+
|
17
|
+
* Neither the name Facebook nor the names of its contributors may be used to
|
18
|
+
endorse or promote products derived from this software without specific
|
19
|
+
prior written permission.
|
20
|
+
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
22
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
23
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
24
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
25
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
26
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
27
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
28
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
29
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
30
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/PATENTS.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Additional Grant of Patent Rights
|
2
|
+
|
3
|
+
"Software" means the Instagram Ruby Gem software distributed by Facebook, Inc.
|
4
|
+
|
5
|
+
Facebook hereby grants you a perpetual, worldwide, royalty-free, non-exclusive,
|
6
|
+
irrevocable (subject to the termination provision below) license under any
|
7
|
+
rights in any patent claims owned by Facebook, to make, have made, use, sell,
|
8
|
+
offer to sell, import, and otherwise transfer the Software. For avoidance of
|
9
|
+
doubt, no license is granted under Facebook’s rights in any patent claims that
|
10
|
+
are infringed by (i) modifications to the Software made by you or a third party,
|
11
|
+
or (ii) the Software in combination with any software or other technology
|
12
|
+
provided by you or a third party.
|
13
|
+
|
14
|
+
The license granted hereunder will terminate, automatically and without notice,
|
15
|
+
for anyone that makes any claim (including by filing any lawsuit, assertion or
|
16
|
+
other action) alleging (a) direct, indirect, or contributory infringement or
|
17
|
+
inducement to infringe any patent: (i) by Facebook or any of its subsidiaries or
|
18
|
+
affiliates, whether or not such claim is related to the Software, (ii) by any
|
19
|
+
party if such claim arises in whole or in part from any software, product or
|
20
|
+
service of Facebook or any of its subsidiaries or affiliates, whether or not
|
21
|
+
such claim is related to the Software, or (iii) by any party relating to the
|
22
|
+
Software; or (b) that any right in any patent claim of Facebook is invalid or
|
23
|
+
unenforceable.
|
data/README.md
ADDED
@@ -0,0 +1,260 @@
|
|
1
|
+
- - -
|
2
|
+
|
3
|
+
**_This project is not actively maintained. Proceed at your own risk!_**
|
4
|
+
|
5
|
+
- - -
|
6
|
+
|
7
|
+
The Instagram Ruby Gem
|
8
|
+
====================
|
9
|
+
A Ruby wrapper for the Instagram REST and Search APIs
|
10
|
+
|
11
|
+
|
12
|
+
Installation
|
13
|
+
------------
|
14
|
+
gem install instagram
|
15
|
+
|
16
|
+
Instagram REST and Search APIs
|
17
|
+
------------------------------
|
18
|
+
Our [developer site](http://instagram.com/developer) documents all the Instagram REST and Search APIs.
|
19
|
+
|
20
|
+
|
21
|
+
Blog
|
22
|
+
----------------------------
|
23
|
+
The [Developer Blog] features news and important announcements about the Instagram Platform. You will also find tutorials and best practices to help you build great platform integrations. Make sure to subscribe to the RSS feed not to miss out on new posts: [http://developers.instagram.com](http://developers.instagram.com).
|
24
|
+
|
25
|
+
|
26
|
+
Community
|
27
|
+
----------------------
|
28
|
+
The [Stack Overflow community](http://stackoverflow.com/questions/tagged/instagram/) is a great place to ask API related questions or if you need help with your code. Make sure to tag your questions with the Instagram tag to get fast answers from other fellow developers and members of the Instagram team.
|
29
|
+
|
30
|
+
|
31
|
+
Does your project or organization use this gem?
|
32
|
+
-----------------------------------------------
|
33
|
+
Add it to the [apps](http://github.com/Instagram/instagram-ruby-gem/wiki/apps) wiki!
|
34
|
+
|
35
|
+
|
36
|
+
Sample Application
|
37
|
+
------------------
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
require "sinatra"
|
41
|
+
require "instagram"
|
42
|
+
|
43
|
+
enable :sessions
|
44
|
+
|
45
|
+
CALLBACK_URL = "http://localhost:4567/oauth/callback"
|
46
|
+
|
47
|
+
Instagram.configure do |config|
|
48
|
+
config.client_id = "YOUR_CLIENT_ID"
|
49
|
+
config.client_secret = "YOUR_CLIENT_SECRET"
|
50
|
+
# For secured endpoints only
|
51
|
+
#config.client_ips = '<Comma separated list of IPs>'
|
52
|
+
end
|
53
|
+
|
54
|
+
get "/" do
|
55
|
+
'<a href="/oauth/connect">Connect with Instagram</a>'
|
56
|
+
end
|
57
|
+
|
58
|
+
get "/oauth/connect" do
|
59
|
+
redirect Instagram.authorize_url(:redirect_uri => CALLBACK_URL)
|
60
|
+
end
|
61
|
+
|
62
|
+
get "/oauth/callback" do
|
63
|
+
response = Instagram.get_access_token(params[:code], :redirect_uri => CALLBACK_URL)
|
64
|
+
session[:access_token] = response.access_token
|
65
|
+
redirect "/nav"
|
66
|
+
end
|
67
|
+
|
68
|
+
get "/nav" do
|
69
|
+
html =
|
70
|
+
"""
|
71
|
+
<h1>Ruby Instagram Gem Sample Application</h1>
|
72
|
+
<ol>
|
73
|
+
<li><a href='/user_recent_media'>User Recent Media</a> Calls user_recent_media - Get a list of a user's most recent media</li>
|
74
|
+
<li><a href='/user_media_feed'>User Media Feed</a> Calls user_media_feed - Get the currently authenticated user's media feed uses pagination</li>
|
75
|
+
<li><a href='/location_recent_media'>Location Recent Media</a> Calls location_recent_media - Get a list of recent media at a given location, in this case, the Instagram office</li>
|
76
|
+
<li><a href='/media_search'>Media Search</a> Calls media_search - Get a list of media close to a given latitude and longitude</li>
|
77
|
+
<li><a href='/media_popular'>Popular Media</a> Calls media_popular - Get a list of the overall most popular media items</li>
|
78
|
+
<li><a href='/user_search'>User Search</a> Calls user_search - Search for users on instagram, by name or username</li>
|
79
|
+
<li><a href='/location_search'>Location Search</a> Calls location_search - Search for a location by lat/lng</li>
|
80
|
+
<li><a href='/location_search_4square'>Location Search - 4Square</a> Calls location_search - Search for a location by Fousquare ID (v2)</li>
|
81
|
+
<li><a href='/tags'>Tags</a>Search for tags, view tag info and get media by tag</li>
|
82
|
+
<li><a href='/limits'>View Rate Limit and Remaining API calls</a>View remaining and ratelimit info.</li>
|
83
|
+
</ol>
|
84
|
+
"""
|
85
|
+
html
|
86
|
+
end
|
87
|
+
|
88
|
+
get "/user_recent_media" do
|
89
|
+
client = Instagram.client(:access_token => session[:access_token])
|
90
|
+
user = client.user
|
91
|
+
html = "<h1>#{user.username}'s recent media</h1>"
|
92
|
+
for media_item in client.user_recent_media
|
93
|
+
html << "<div style='float:left;'><img src='#{media_item.images.thumbnail.url}'><br/> <a href='/media_like/#{media_item.id}'>Like</a> <a href='/media_unlike/#{media_item.id}'>Un-Like</a> <br/>LikesCount=#{media_item.likes[:count]}</div>"
|
94
|
+
end
|
95
|
+
html
|
96
|
+
end
|
97
|
+
|
98
|
+
get '/media_like/:id' do
|
99
|
+
client = Instagram.client(:access_token => session[:access_token])
|
100
|
+
client.like_media("#{params[:id]}")
|
101
|
+
redirect "/user_recent_media"
|
102
|
+
end
|
103
|
+
|
104
|
+
get '/media_unlike/:id' do
|
105
|
+
client = Instagram.client(:access_token => session[:access_token])
|
106
|
+
client.unlike_media("#{params[:id]}")
|
107
|
+
redirect "/user_recent_media"
|
108
|
+
end
|
109
|
+
|
110
|
+
get "/user_media_feed" do
|
111
|
+
client = Instagram.client(:access_token => session[:access_token])
|
112
|
+
user = client.user
|
113
|
+
html = "<h1>#{user.username}'s media feed</h1>"
|
114
|
+
|
115
|
+
page_1 = client.user_media_feed(777)
|
116
|
+
page_2_max_id = page_1.pagination.next_max_id
|
117
|
+
page_2 = client.user_recent_media(777, :max_id => page_2_max_id ) unless page_2_max_id.nil?
|
118
|
+
html << "<h2>Page 1</h2><br/>"
|
119
|
+
for media_item in page_1
|
120
|
+
html << "<img src='#{media_item.images.thumbnail.url}'>"
|
121
|
+
end
|
122
|
+
html << "<h2>Page 2</h2><br/>"
|
123
|
+
for media_item in page_2
|
124
|
+
html << "<img src='#{media_item.images.thumbnail.url}'>"
|
125
|
+
end
|
126
|
+
html
|
127
|
+
end
|
128
|
+
|
129
|
+
get "/location_recent_media" do
|
130
|
+
client = Instagram.client(:access_token => session[:access_token])
|
131
|
+
html = "<h1>Media from the Instagram Office</h1>"
|
132
|
+
for media_item in client.location_recent_media(514276)
|
133
|
+
html << "<img src='#{media_item.images.thumbnail.url}'>"
|
134
|
+
end
|
135
|
+
html
|
136
|
+
end
|
137
|
+
|
138
|
+
get "/media_search" do
|
139
|
+
client = Instagram.client(:access_token => session[:access_token])
|
140
|
+
html = "<h1>Get a list of media close to a given latitude and longitude</h1>"
|
141
|
+
for media_item in client.media_search("37.7808851","-122.3948632")
|
142
|
+
html << "<img src='#{media_item.images.thumbnail.url}'>"
|
143
|
+
end
|
144
|
+
html
|
145
|
+
end
|
146
|
+
|
147
|
+
get "/media_popular" do
|
148
|
+
client = Instagram.client(:access_token => session[:access_token])
|
149
|
+
html = "<h1>Get a list of the overall most popular media items</h1>"
|
150
|
+
for media_item in client.media_popular
|
151
|
+
html << "<img src='#{media_item.images.thumbnail.url}'>"
|
152
|
+
end
|
153
|
+
html
|
154
|
+
end
|
155
|
+
|
156
|
+
get "/user_search" do
|
157
|
+
client = Instagram.client(:access_token => session[:access_token])
|
158
|
+
html = "<h1>Search for users on instagram, by name or usernames</h1>"
|
159
|
+
for user in client.user_search("instagram")
|
160
|
+
html << "<li> <img src='#{user.profile_picture}'> #{user.username} #{user.full_name}</li>"
|
161
|
+
end
|
162
|
+
html
|
163
|
+
end
|
164
|
+
|
165
|
+
get "/location_search" do
|
166
|
+
client = Instagram.client(:access_token => session[:access_token])
|
167
|
+
html = "<h1>Search for a location by lat/lng with a radius of 5000m</h1>"
|
168
|
+
for location in client.location_search("48.858844","2.294351","5000")
|
169
|
+
html << "<li> #{location.name} <a href='https://www.google.com/maps/preview/@#{location.latitude},#{location.longitude},19z'>Map</a></li>"
|
170
|
+
end
|
171
|
+
html
|
172
|
+
end
|
173
|
+
|
174
|
+
get "/location_search_4square" do
|
175
|
+
client = Instagram.client(:access_token => session[:access_token])
|
176
|
+
html = "<h1>Search for a location by Fousquare ID (v2)</h1>"
|
177
|
+
for location in client.location_search("3fd66200f964a520c5f11ee3")
|
178
|
+
html << "<li> #{location.name} <a href='https://www.google.com/maps/preview/@#{location.latitude},#{location.longitude},19z'>Map</a></li>"
|
179
|
+
end
|
180
|
+
html
|
181
|
+
end
|
182
|
+
|
183
|
+
get "/tags" do
|
184
|
+
client = Instagram.client(:access_token => session[:access_token])
|
185
|
+
html = "<h1>Search for tags, get tag info and get media by tag</h1>"
|
186
|
+
tags = client.tag_search('cat')
|
187
|
+
html << "<h2>Tag Name = #{tags[0].name}. Media Count = #{tags[0].media_count}. </h2><br/><br/>"
|
188
|
+
for media_item in client.tag_recent_media(tags[0].name)
|
189
|
+
html << "<img src='#{media_item.images.thumbnail.url}'>"
|
190
|
+
end
|
191
|
+
html
|
192
|
+
end
|
193
|
+
|
194
|
+
get "/limits" do
|
195
|
+
client = Instagram.client(:access_token => session[:access_token])
|
196
|
+
html = "<h1/>View API Rate Limit and calls remaining</h1>"
|
197
|
+
response = client.utils_raw_response
|
198
|
+
html << "Rate Limit = #{response.headers[:x_ratelimit_limit]}. <br/>Calls Remaining = #{response.headers[:x_ratelimit_remaining]}"
|
199
|
+
|
200
|
+
html
|
201
|
+
end
|
202
|
+
```
|
203
|
+
|
204
|
+
Contributing
|
205
|
+
------------
|
206
|
+
In the spirit of [free software](http://www.fsf.org/licensing/essays/free-sw.html), **everyone** is encouraged to help improve this project.
|
207
|
+
|
208
|
+
Here are some ways *you* can contribute:
|
209
|
+
|
210
|
+
* by using alpha, beta, and prerelease versions
|
211
|
+
* by reporting bugs
|
212
|
+
* by suggesting new features
|
213
|
+
* by writing or editing documentation
|
214
|
+
* by writing specifications
|
215
|
+
* by writing code (**no patch is too small**: fix typos, add comments, clean up inconsistent whitespace)
|
216
|
+
* by refactoring code
|
217
|
+
* by closing [issues](http://github.com/Instagram/instagram-ruby-gem/issues)
|
218
|
+
* by reviewing patches
|
219
|
+
|
220
|
+
|
221
|
+
Submitting an Issue
|
222
|
+
-------------------
|
223
|
+
We use the [GitHub issue tracker](http://github.com/Instagram/instagram-ruby-gem/issues) to track bugs and
|
224
|
+
features. Before submitting a bug report or feature request, check to make sure it hasn't already
|
225
|
+
been submitted. You can indicate support for an existing issue by voting it up. When submitting a
|
226
|
+
bug report, please include a [Gist](http://gist.github.com/) that includes a stack trace and any
|
227
|
+
details that may be necessary to reproduce the bug, including your gem version, Ruby version, and
|
228
|
+
operating system. Ideally, a bug report should include a pull request with failing specs.
|
229
|
+
|
230
|
+
Instagram has a [bounty program](https://www.facebook.com/whitehat/) for the safe
|
231
|
+
disclosure of security bugs. In those cases, please go through the process
|
232
|
+
outlined on that page and do not file a public issue.
|
233
|
+
|
234
|
+
|
235
|
+
Submitting a Pull Request
|
236
|
+
-------------------------
|
237
|
+
1. Fork the project.
|
238
|
+
2. Create a topic branch.
|
239
|
+
3. Implement your feature or bug fix.
|
240
|
+
4. Add documentation for your feature or bug fix.
|
241
|
+
5. Run <tt>rake doc:yard</tt>. If your changes are not 100% documented, go back to step 4.
|
242
|
+
6. Add specs for your feature or bug fix.
|
243
|
+
7. Run <tt>rake spec</tt>. If your changes are not 100% covered, go back to step 6.
|
244
|
+
8. Commit and push your changes.
|
245
|
+
9. Submit a pull request. Please do not include changes to the gemspec, version, or history file. (If you want to create your own version for some reason, please do so in a separate commit.)
|
246
|
+
10. If you haven't already, complete the Contributor License Agreement ("CLA").
|
247
|
+
|
248
|
+
Contributor License Agreement ("CLA")
|
249
|
+
_____________________________________
|
250
|
+
In order to accept your pull request, we need you to submit a CLA. You only need
|
251
|
+
to do this once to work on any of Instagram's or Facebook's open source projects.
|
252
|
+
|
253
|
+
Complete your CLA here: [https://code.facebook.com/cla](https://code.facebook.com/cla)
|
254
|
+
|
255
|
+
|
256
|
+
Copyright
|
257
|
+
---------
|
258
|
+
Copyright (c) 2014, Facebook, Inc. All rights reserved.
|
259
|
+
By contributing to Instagram Ruby Gem, you agree that your contributions will be licensed under its BSD license.
|
260
|
+
See [LICENSE](https://github.com/Instagram/instagram-ruby-gem/blob/master/LICENSE.md) for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
RSpec::Core::RakeTask.new(:spec)
|
6
|
+
|
7
|
+
task :default => :spec
|
8
|
+
|
9
|
+
namespace :doc do
|
10
|
+
begin
|
11
|
+
require 'yard'
|
12
|
+
rescue LoadError
|
13
|
+
# ignore
|
14
|
+
else
|
15
|
+
YARD::Rake::YardocTask.new do |task|
|
16
|
+
task.files = ['HISTORY.mkd', 'LICENSE.mkd', 'lib/**/*.rb']
|
17
|
+
task.options = [
|
18
|
+
'--protected',
|
19
|
+
'--output-dir', 'doc/yard',
|
20
|
+
'--tag', 'format:Supported formats',
|
21
|
+
'--tag', 'authenticated:Requires Authentication',
|
22
|
+
'--tag', 'rate_limited:Rate Limited',
|
23
|
+
'--markup', 'markdown',
|
24
|
+
]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/instagram.gemspec
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/instagram/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.add_development_dependency('rake', '~> 10.5.0')
|
6
|
+
s.add_development_dependency('rspec', '~> 3.4.0')
|
7
|
+
s.add_development_dependency('webmock', '~> 1.22.6')
|
8
|
+
s.add_development_dependency('bluecloth', '~> 2.2.0')
|
9
|
+
s.add_runtime_dependency('faraday', '~> 0.9')
|
10
|
+
s.add_runtime_dependency('faraday_middleware', '~> 0.10')
|
11
|
+
s.add_runtime_dependency('multi_json', '~> 1.11')
|
12
|
+
s.add_runtime_dependency('hashie', '~> 3.0')
|
13
|
+
s.authors = ["Shayne Sweeney", "extendi"]
|
14
|
+
s.description = %q{A Ruby wrapper for the Instagram REST and Search APIs}
|
15
|
+
s.post_install_message =<<eos
|
16
|
+
********************************************************************************
|
17
|
+
|
18
|
+
Instagram REST and Search APIs
|
19
|
+
------------------------------
|
20
|
+
Our developer site documents all the Instagram REST and Search APIs.
|
21
|
+
(http://instagram.com/developer)
|
22
|
+
|
23
|
+
Blog
|
24
|
+
----------------------------
|
25
|
+
The Developer Blog features news and important announcements about the Instagram Platform.
|
26
|
+
You will also find tutorials and best practices to help you build great platform integrations.
|
27
|
+
Make sure to subscribe to the RSS feed so you don't miss out on new posts:
|
28
|
+
(http://developers.instagram.com).
|
29
|
+
|
30
|
+
Community
|
31
|
+
----------------------
|
32
|
+
The Stack Overflow community is a great place to ask API related questions or if you need help with your code.
|
33
|
+
Make sure to tag your questions with the Instagram tag to get fast answers from other fellow developers and members of the Instagram team.
|
34
|
+
(http://stackoverflow.com/questions/tagged/instagram/)
|
35
|
+
|
36
|
+
********************************************************************************
|
37
|
+
eos
|
38
|
+
s.email = ['info@extendi.it']
|
39
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
40
|
+
s.files = `git ls-files`.split("\n")
|
41
|
+
s.homepage = 'https://github.com/Instagram/instagram-ruby-gem'
|
42
|
+
s.name = 'extendi-instagram'
|
43
|
+
s.platform = Gem::Platform::RUBY
|
44
|
+
s.require_paths = ['lib']
|
45
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if s.respond_to? :required_rubygems_version=
|
46
|
+
s.rubyforge_project = s.name
|
47
|
+
s.summary = %q{Ruby wrapper for the Instagram API}
|
48
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
49
|
+
s.version = Instagram::VERSION.dup
|
50
|
+
end
|