Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 46 lines (27 sloc) 1.225 kb
0d89980 @mislav Instagram is ours
authored
1 # Instagram Ruby library
2
3 So far, the only way to browse [Instagram][] photos was their iPhone app. Well, no more.
4
5 This library acts as a client for the [unofficial Instagram API][wiki]. You can:
6
7 * fetch popular photos;
8 * get user info;
9 * browse photos by a user.
10
11 Caveat: you need to know user IDs; usernames can't be used. However, you can start from the popular feed and drill down from there.
12
13 ## Example usage
14
15 require 'instagram'
16
17 photos = Instagram::popular
18 photo = photos.first
19
20 photo.caption #=> "Extreme dog closeup"
21 photo.likes.size #=> 54
22
23 photo.user.username #=> "johndoe"
24 photo.user.full_name #=> "John Doe"
25 photo.comments[1].text #=> "That's so cute"
26 photo.images.last.width #=> 612
27
28
29 # fetch extended info for John
30 john_info = Instagram::user_info(photo.user.id)
31
32 john_info.media_count #=> 32
33 john_info.followers #=> 160
34
35
36 # find more photos by John
37 photos_by_john = Instagram::by_user(photo.user.id)
38
39
40 ## Credits
41
42 Instagram API reverse-engineered and Ruby library written by Mislav Marohnić.
43
44
45 [instagram]: http://instagr.am/
46 [wiki]: https://github.com/mislav/instagram/wiki "Instagram API"
Something went wrong with that request. Please try again.