chunky_baconfile 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/.document +5 -0
  2. data/.gitignore +22 -0
  3. data/.yardoc/checksums +5 -0
  4. data/.yardoc/objects/ChunkyBaconfile.dat +0 -0
  5. data/.yardoc/objects/ChunkyBaconfile/Client.dat +0 -0
  6. data/.yardoc/objects/ChunkyBaconfile/Client/build_multipart_bodies_c.dat +0 -0
  7. data/.yardoc/objects/ChunkyBaconfile/Client/build_multipart_bodies_i.dat +0 -0
  8. data/.yardoc/objects/ChunkyBaconfile/Client/create_folder_i.dat +0 -0
  9. data/.yardoc/objects/ChunkyBaconfile/Client/delete_i.dat +0 -0
  10. data/.yardoc/objects/ChunkyBaconfile/Client/file_i.dat +0 -0
  11. data/.yardoc/objects/ChunkyBaconfile/Client/folder_i.dat +0 -0
  12. data/.yardoc/objects/ChunkyBaconfile/Client/initialize_i.dat +0 -0
  13. data/.yardoc/objects/ChunkyBaconfile/Client/mime_type_c.dat +0 -0
  14. data/.yardoc/objects/ChunkyBaconfile/Client/mime_type_i.dat +0 -0
  15. data/.yardoc/objects/ChunkyBaconfile/Client/public_i.dat +0 -0
  16. data/.yardoc/objects/ChunkyBaconfile/Client/upload_file_i.dat +0 -0
  17. data/.yardoc/objects/ChunkyBaconfile/Client/username_3D_i.dat +0 -0
  18. data/.yardoc/objects/ChunkyBaconfile/Client/username_i.dat +0 -0
  19. data/.yardoc/objects/ChunkyBaconfile/Client/verify_i.dat +0 -0
  20. data/.yardoc/objects/ChunkyBaconfile/FileInfo.dat +0 -0
  21. data/.yardoc/objects/ChunkyBaconfile/FileInfo/image_3F_i.dat +0 -0
  22. data/.yardoc/objects/ChunkyBaconfile/FileInfo/size_i.dat +0 -0
  23. data/.yardoc/objects/ChunkyBaconfile/FileInfo/time_modified_i.dat +0 -0
  24. data/.yardoc/objects/ChunkyBaconfile/FileInfo/type_i.dat +0 -0
  25. data/.yardoc/objects/ChunkyBaconfile/public_c.dat +0 -0
  26. data/.yardoc/objects/root.dat +0 -0
  27. data/.yardoc/proxy_types +0 -0
  28. data/LICENSE +20 -0
  29. data/README.md +47 -0
  30. data/Rakefile +60 -0
  31. data/VERSION +1 -0
  32. data/changelog.md +5 -0
  33. data/lib/chunky_baconfile.rb +24 -0
  34. data/lib/chunky_baconfile/client.rb +121 -0
  35. data/lib/chunky_baconfile/file_info.rb +19 -0
  36. data/test/fixtures/bacon.json +242 -0
  37. data/test/fixtures/cat.jpg +0 -0
  38. data/test/fixtures/cat.jpg.json +20 -0
  39. data/test/fixtures/delete.json +1 -0
  40. data/test/fixtures/error.json +1 -0
  41. data/test/fixtures/new_file.json +20 -0
  42. data/test/fixtures/new_folder.json +20 -0
  43. data/test/fixtures/public.json +402 -0
  44. data/test/fixtures/verify.json +1 -0
  45. data/test/helper.rb +43 -0
  46. data/test/test_chunky_baconfile.rb +87 -0
  47. metadata +171 -0
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,22 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+ doc
21
+
22
+ ## PROJECT::SPECIFIC
@@ -0,0 +1,5 @@
1
+ LICENSE 4c641d16b6c1534c7a8e6b29a08a4d46a0b85be9
2
+ README.rdoc d79d1a456cbecd5e5204905d0d6b5fde03dc9c87
3
+ lib/chunky_baconfile/file_info.rb 088daa5b027287b8b2f1f1c417c4493eb651f3b2
4
+ lib/chunky_baconfile/client.rb 054dbf60058272a45a29f4141298549da4aade0c
5
+ lib/chunky_baconfile.rb 258402a8abb2b18dd7649213630c800a92ba50b3
Binary file
Binary file
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Wynn Netherland
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,47 @@
1
+ # chunky-baconfile
2
+
3
+ Tasty wrapper for the [Baconfile API](http://baconfile.com/api). [Baconfile](http://baconfile.com) is a handy way to share, comment, and tweet about files uploaded to your [Amazon S3](https://s3.amazonaws.com/) account.
4
+
5
+ ## Installation
6
+
7
+ sudo gem install chunky_baconfile
8
+
9
+ ## Usage
10
+
11
+ # crank up a client object
12
+ >> client = ChunkyBaconfile::Client.new('username', 'password')
13
+
14
+ # create a folder
15
+ >> client.folder('test_folder')
16
+ => <#ChunkyBaconfile::FileInfo content_type="image/png" description="" file_url="http://s3.amazonaws.com:80/pengwynn.baconfile.com/test_folder%2Fwynn-120x120.png" id="3c05b1e667fc3cf4fd6219d146324bdd" is_folder=false name="wynn-120x120.png" path="pengwynn/test_folder/wynn-120x120.png" permalink="http://baconfile.com/pengwynn/test_folder/wynn-120x120.png/" size=7271 time_modified=1262755171 tiny_url="http://tinyb.cn/1qm" type="image" url="/pengwynn/">>
17
+
18
+ # get a list of files in a folder
19
+ >> client.folder('test_folder')
20
+ => [<#ChunkyBaconfile::FileInfo content_type="image/png" description="" file_url="http://s3.amazonaws.com:80/pengwynn.baconfile.com/test_folder%2Fwynn-120x120.png" id="3c05b1e667fc3cf4fd6219d146324bdd" is_folder=false name="wynn-120x120.png" path="pengwynn/test_folder/wynn-120x120.png" permalink="http://baconfile.com/pengwynn/test_folder/wynn-120x120.png/" size=7271 time_modified=1262755171 tiny_url="http://tinyb.cn/1qm" type="image" url="/pengwynn/test_folder/wynn-120x120.png/" user=<#Hashie::Mash id=947 timezone="America/Chicago" username="pengwynn">>]
21
+
22
+ # get info about a single item
23
+ >> client.file('test_folder', 'wynn-120x120.png')
24
+ => <#ChunkyBaconfile::FileInfo content_type="image/png" description="" file_url="http://s3.amazonaws.com:80/pengwynn.baconfile.com/test_folder%2Fwynn-120x120.png" id="3c05b1e667fc3cf4fd6219d146324bdd" is_folder=false name="wynn-120x120.png" path="pengwynn/test_folder/wynn-120x120.png" permalink="http://baconfile.com/pengwynn/test_folder/wynn-120x120.png/" size=7271 time_modified=1262755171 tiny_url="http://tinyb.cn/1qm" type="image" url="/pengwynn/test_folder/wynn-120x120.png/" user=<#Hashie::Mash id=947 timezone="America/Chicago" username="pengwynn">>
25
+
26
+ # upload a file
27
+ >> client.upload_file('cat.jpg')
28
+ => <#ChunkyBaconfile::FileInfo content_type="image/jpg" description="" file_url="http://s3.amazonaws.com:80/pengwynn.baconfile.com/cat.jpg" id="763e5559987f22aa710fdbd3bac0fc40" is_folder=false name="cat.jpg" path="pengwynn/cat.jpg" permalink="http://baconfile.com/pengwynn/cat.jpg/" size=39368 time_modified=1262884937 tiny_url="http://tinyb.cn/1qz" type="image" url="/pengwynn/cat.jpg/" user=<#Hashie::Mash id=947 timezone="America/Chicago" username="pengwynn">>
29
+
30
+ # Get the most recent public files
31
+ >> ChunkyBaconfile.public
32
+
33
+
34
+ ## Note on Patches/Pull Requests
35
+
36
+ * Fork the project.
37
+ * Make your feature addition or bug fix.
38
+ * Add tests for it. This is important so I don't break it in a
39
+ future version unintentionally.
40
+ * Commit, do not mess with rakefile, version, or history.
41
+ (if you want to have your own version, that is fine but
42
+ bump version in a commit by itself I can ignore when I pull)
43
+ * Send me a pull request. Bonus points for topic branches.
44
+
45
+ ## Copyright
46
+
47
+ Copyright (c) 2010 [Wynn Netherland](http://wynnnetherland.com). See LICENSE for details.
@@ -0,0 +1,60 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "chunky_baconfile"
8
+ gem.summary = %Q{Tasty wrapper for the Baconfile API}
9
+ gem.description = %Q{Tasty wrapper for the Baconfile API}
10
+ gem.email = "wynn.netherland@gmail.com"
11
+ gem.homepage = "http://github.com/pengwynn/chunky-baconfile"
12
+ gem.authors = ["Wynn Netherland"]
13
+
14
+ gem.add_dependency('hashie', '~> 0.1.3')
15
+ gem.add_dependency('httparty', '~> 0.4.5')
16
+
17
+ gem.add_development_dependency('shoulda', '>= 2.10.1')
18
+ gem.add_development_dependency('jnunemaker-matchy', '0.4.0')
19
+ gem.add_development_dependency('mocha', '0.9.4')
20
+ gem.add_development_dependency('fakeweb', '>= 1.2.5')
21
+ gem.add_development_dependency "yard", ">= 0"
22
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
23
+ end
24
+ Jeweler::GemcutterTasks.new
25
+ rescue LoadError
26
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
27
+ end
28
+
29
+ require 'rake/testtask'
30
+ Rake::TestTask.new(:test) do |test|
31
+ test.libs << 'lib' << 'test'
32
+ test.pattern = 'test/**/test_*.rb'
33
+ test.verbose = true
34
+ end
35
+
36
+ begin
37
+ require 'rcov/rcovtask'
38
+ Rcov::RcovTask.new do |test|
39
+ test.libs << 'test'
40
+ test.pattern = 'test/**/test_*.rb'
41
+ test.verbose = true
42
+ end
43
+ rescue LoadError
44
+ task :rcov do
45
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
46
+ end
47
+ end
48
+
49
+ task :test => :check_dependencies
50
+
51
+ task :default => :test
52
+
53
+ begin
54
+ require 'yard'
55
+ YARD::Rake::YardocTask.new
56
+ rescue LoadError
57
+ task :yardoc do
58
+ abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
59
+ end
60
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 - January 7, 2009
4
+
5
+ * Initial release
@@ -0,0 +1,24 @@
1
+ require 'rubygems'
2
+ require 'cgi'
3
+
4
+ gem 'hashie', '~> 0.1.3'
5
+ require 'hashie'
6
+
7
+ gem 'httparty', '~> 0.4.5'
8
+ require 'httparty'
9
+
10
+ module ChunkyBaconfile
11
+
12
+ # Fetch the latest public files
13
+ #
14
+ # @return [Array<FileInfo>] returns last 20 most recent public files
15
+ def self.public
16
+ ChunkyBaconfile::Client.new.public
17
+ end
18
+ end
19
+
20
+ Hash.send :include, Hashie::HashExtensions
21
+
22
+ directory = File.expand_path(File.dirname(__FILE__))
23
+ require File.join(directory, 'chunky_baconfile', 'file_info')
24
+ require File.join(directory, 'chunky_baconfile', 'client')
@@ -0,0 +1,121 @@
1
+ module ChunkyBaconfile
2
+ class Client
3
+ attr_accessor :username
4
+ include HTTParty
5
+ format :json
6
+ base_uri "http://baconfile.com"
7
+
8
+ # Intialize the client
9
+ #
10
+ # @param [optional, String] username your Baconfile username
11
+ # @param [optional, String] password your Baconfile password
12
+ # @return the client
13
+ def initialize(username=nil, password=nil)
14
+ @username = username
15
+ @auth = {:username => username, :password => password}
16
+ end
17
+
18
+ # Fetch the files in a folder
19
+ #
20
+ # @param [String] folder_name the name of the folder
21
+ # @return [Array<FileInfo>] the items in the folder
22
+ def folder(folder_name)
23
+ response = self.class.get("/#{@username}/#{folder_name}.json")
24
+ response['items'].map {|item| ChunkyBaconfile::FileInfo.new(item)}
25
+ end
26
+
27
+ # Fetch info about an item
28
+ #
29
+ # @param [String] folder_name the name of the folder
30
+ # @param [String] file_name the name of the file
31
+ # @return [FileInfo] the items in the folder
32
+ def file(folder_name, file_name)
33
+ ChunkyBaconfile::FileInfo.new(self.class.get("/#{@username}/#{folder_name}/#{file_name}.json"))
34
+ end
35
+
36
+ # Fetch the latest public files
37
+ #
38
+ # @return [Array<FileInfo>] returns last 20 most recent public files
39
+ def public
40
+ response = self.class.get("/public.json")
41
+ response['items'].map {|item| ChunkyBaconfile::FileInfo.new(item)}
42
+ end
43
+
44
+ # Create a new folder
45
+ #
46
+ # @param [String] folder_name the name of the folder to create
47
+ # @return [FileInfo] info about the new folder
48
+ def create_folder(folder_name)
49
+ ChunkyBaconfile::FileInfo.new(self.class.post("/#{@username}.json", :body => {:name => folder_name}, :basic_auth => @auth))
50
+ end
51
+
52
+ # Upload a new file
53
+ #
54
+ # @param [String, File] path or file object to upload
55
+ # @return [FileInfo] info about the new folder
56
+ def upload_file(file)
57
+ file = File.new(file) if file.is_a?(String)
58
+ body_options = {:file => file}
59
+ opts = build_multipart_bodies(body_options).merge({:basic_auth => @auth})
60
+ ChunkyBaconfile::FileInfo.new(self.class.post("/#{@username}.json", opts))
61
+ end
62
+
63
+ # Delete a folder or file
64
+ #
65
+ # @param [String] name the folder or file to delete
66
+ # @return [Hashie::Mash] :success or :error
67
+ def delete(name)
68
+ response = Hashie::Mash.new(self.class.delete("/#{username}/#{name}.json", :basic_auth => @auth))
69
+ end
70
+
71
+ # Verify credentials
72
+ #
73
+ # @return [true, false] whether or not the credentials are a match
74
+ def verify
75
+ response = Hashie::Mash.new(self.class.get("/verify.json", :basic_auth => @auth))
76
+ response.key?(:user)
77
+ end
78
+
79
+ # Return the MIME type for a file
80
+ #
81
+ # @param [File] file
82
+ # @return [String] mime type for the file
83
+ def mime_type(file)
84
+ case
85
+ when file =~ /\.jpg/ then 'image/jpg'
86
+ when file =~ /\.gif$/ then 'image/gif'
87
+ when file =~ /\.png$/ then 'image/png'
88
+ else 'application/octet-stream'
89
+ end
90
+ end
91
+
92
+
93
+ # Build multi-part POST form data from file
94
+ #
95
+ # @param [Hash] parts keys/values of items to convert for upload
96
+ # @return [Hash] encoded form data for POST
97
+ def build_multipart_bodies(parts)
98
+ boundary = Time.now.to_i.to_s(16)
99
+ body = ""
100
+ parts.each do |key, value|
101
+ esc_key = CGI.escape(key.to_s)
102
+ body << "--#{boundary}#{"\r\n"}"
103
+ if value.respond_to?(:read)
104
+ body << "Content-Disposition: form-data; name=\"#{esc_key}\"; filename=\"#{File.basename(value.path)}\"#{"\r\n"}"
105
+ body << "Content-Type: #{mime_type(value.path)}#{"\r\n"*2}"
106
+ body << value.read
107
+ else
108
+ body << "Content-Disposition: form-data; name=\"#{esc_key}\"#{"\r\n"*2}#{value}"
109
+ end
110
+ body << "\r\n"
111
+ end
112
+ body << "--#{boundary}--#{"\r\n"*2}"
113
+ {
114
+ :body => body,
115
+ :headers => {"Content-Type" => "multipart/form-data; boundary=#{boundary}"}
116
+ }
117
+ end
118
+
119
+
120
+ end
121
+ end
@@ -0,0 +1,19 @@
1
+ module ChunkyBaconfile
2
+ class FileInfo < Hashie::Mash
3
+ def size
4
+ self[:size]
5
+ end
6
+
7
+ def time_modified
8
+ Time.at(self[:time_modified])
9
+ end
10
+
11
+ def type
12
+ self[:type]
13
+ end
14
+
15
+ def image?
16
+ self.type == 'image'
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,242 @@
1
+ {
2
+ "items": [{
3
+ "size": 84295,
4
+ "permalink": "http://baconfile.com/leah/bacon/bacon-comic.gif/",
5
+ "name": "bacon-comic.gif",
6
+ "url": "/leah/bacon/bacon-comic.gif/",
7
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fbacon-comic.gif",
8
+ "time_modified": 1236039382,
9
+ "tiny_url": "http://tinyb.cn/3k",
10
+ "user": {
11
+ "username": "leah",
12
+ "timezone": "US/Pacific",
13
+ "id": 2
14
+ },
15
+ "is_folder": false,
16
+ "path": "leah/bacon/bacon-comic.gif",
17
+ "content_type": "image/gif",
18
+ "type": "image",
19
+ "id": "cd76f62baed8aa467a3f6d128c26a2b3",
20
+ "description": ""
21
+ },
22
+ {
23
+ "size": 13561,
24
+ "permalink": "http://baconfile.com/leah/bacon/bacon-success.gif/",
25
+ "name": "bacon-success.gif",
26
+ "url": "/leah/bacon/bacon-success.gif/",
27
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fbacon-success.gif",
28
+ "time_modified": 1236039530,
29
+ "tiny_url": "http://tinyb.cn/3l",
30
+ "user": {
31
+ "username": "leah",
32
+ "timezone": "US/Pacific",
33
+ "id": 2
34
+ },
35
+ "is_folder": false,
36
+ "path": "leah/bacon/bacon-success.gif",
37
+ "content_type": "image/gif",
38
+ "type": "image",
39
+ "id": "e44464592a11d810f74f98cc740f4962",
40
+ "description": ""
41
+ },
42
+ {
43
+ "size": 42736,
44
+ "permalink": "http://baconfile.com/leah/bacon/batteries-included.png/",
45
+ "name": "batteries-included.png",
46
+ "url": "/leah/bacon/batteries-included.png/",
47
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fbatteries-included.png",
48
+ "time_modified": 1236040250,
49
+ "tiny_url": "http://tinyb.cn/3m",
50
+ "user": {
51
+ "username": "leah",
52
+ "timezone": "US/Pacific",
53
+ "id": 2
54
+ },
55
+ "is_folder": false,
56
+ "path": "leah/bacon/batteries-included.png",
57
+ "content_type": "image/png",
58
+ "type": "image",
59
+ "id": "c325ae4e6319be2d386ea04e0a860cc5",
60
+ "description": ""
61
+ },
62
+ {
63
+ "size": 7048,
64
+ "permalink": "http://baconfile.com/leah/bacon/chunky-bacon-1.png/",
65
+ "name": "chunky-bacon-1.png",
66
+ "url": "/leah/bacon/chunky-bacon-1.png/",
67
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fchunky-bacon-1.png",
68
+ "time_modified": 1236040263,
69
+ "tiny_url": "http://tinyb.cn/3n",
70
+ "user": {
71
+ "username": "leah",
72
+ "timezone": "US/Pacific",
73
+ "id": 2
74
+ },
75
+ "is_folder": false,
76
+ "path": "leah/bacon/chunky-bacon-1.png",
77
+ "content_type": "image/png",
78
+ "type": "image",
79
+ "id": "9c1178f215c9a3fde07a3310989f126c",
80
+ "description": ""
81
+ },
82
+ {
83
+ "size": 7121,
84
+ "permalink": "http://baconfile.com/leah/bacon/chunky-bacon-2.png/",
85
+ "name": "chunky-bacon-2.png",
86
+ "url": "/leah/bacon/chunky-bacon-2.png/",
87
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fchunky-bacon-2.png",
88
+ "time_modified": 1236040273,
89
+ "tiny_url": "http://tinyb.cn/3o",
90
+ "user": {
91
+ "username": "leah",
92
+ "timezone": "US/Pacific",
93
+ "id": 2
94
+ },
95
+ "is_folder": false,
96
+ "path": "leah/bacon/chunky-bacon-2.png",
97
+ "content_type": "image/png",
98
+ "type": "image",
99
+ "id": "78934cb2815d94663167cc036ba56e5c",
100
+ "description": ""
101
+ },
102
+ {
103
+ "size": 11179,
104
+ "permalink": "http://baconfile.com/leah/bacon/chunky-bacon-3.png/",
105
+ "name": "chunky-bacon-3.png",
106
+ "url": "/leah/bacon/chunky-bacon-3.png/",
107
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fchunky-bacon-3.png",
108
+ "time_modified": 1236040283,
109
+ "tiny_url": "http://tinyb.cn/3p",
110
+ "user": {
111
+ "username": "leah",
112
+ "timezone": "US/Pacific",
113
+ "id": 2
114
+ },
115
+ "is_folder": false,
116
+ "path": "leah/bacon/chunky-bacon-3.png",
117
+ "content_type": "image/png",
118
+ "type": "image",
119
+ "id": "bc7077caa361f118ed0271c961b7ff59",
120
+ "description": ""
121
+ },
122
+ {
123
+ "size": 8928,
124
+ "permalink": "http://baconfile.com/leah/bacon/chunky-bacon-4.png/",
125
+ "name": "chunky-bacon-4.png",
126
+ "url": "/leah/bacon/chunky-bacon-4.png/",
127
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fchunky-bacon-4.png",
128
+ "time_modified": 1236040294,
129
+ "tiny_url": "http://tinyb.cn/3q",
130
+ "user": {
131
+ "username": "leah",
132
+ "timezone": "US/Pacific",
133
+ "id": 2
134
+ },
135
+ "is_folder": false,
136
+ "path": "leah/bacon/chunky-bacon-4.png",
137
+ "content_type": "image/png",
138
+ "type": "image",
139
+ "id": "be4a9ddcc1108996eca0fbd6318e0f8c",
140
+ "description": ""
141
+ },
142
+ {
143
+ "size": 8974,
144
+ "permalink": "http://baconfile.com/leah/bacon/chunky-bacon-5.png/",
145
+ "name": "chunky-bacon-5.png",
146
+ "url": "/leah/bacon/chunky-bacon-5.png/",
147
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fchunky-bacon-5.png",
148
+ "time_modified": 1236040302,
149
+ "tiny_url": "http://tinyb.cn/3r",
150
+ "user": {
151
+ "username": "leah",
152
+ "timezone": "US/Pacific",
153
+ "id": 2
154
+ },
155
+ "is_folder": false,
156
+ "path": "leah/bacon/chunky-bacon-5.png",
157
+ "content_type": "image/png",
158
+ "type": "image",
159
+ "id": "13235ca0849915fefb5ed8ef42a179f0",
160
+ "description": ""
161
+ },
162
+ {
163
+ "size": 46692,
164
+ "permalink": "http://baconfile.com/leah/bacon/diet-coke-bacon.jpg/",
165
+ "name": "diet-coke-bacon.jpg",
166
+ "url": "/leah/bacon/diet-coke-bacon.jpg/",
167
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fdiet-coke-bacon.jpg",
168
+ "time_modified": 1236040324,
169
+ "tiny_url": "http://tinyb.cn/3s",
170
+ "user": {
171
+ "username": "leah",
172
+ "timezone": "US/Pacific",
173
+ "id": 2
174
+ },
175
+ "is_folder": false,
176
+ "path": "leah/bacon/diet-coke-bacon.jpg",
177
+ "content_type": "image/jpeg",
178
+ "type": "image",
179
+ "id": "aac27db34704b9f94622b6d9edb78305",
180
+ "description": "Yum."
181
+ },
182
+ {
183
+ "size": 32925,
184
+ "permalink": "http://baconfile.com/leah/bacon/donuts-bacon-08.jpg/",
185
+ "name": "donuts-bacon-08.jpg",
186
+ "url": "/leah/bacon/donuts-bacon-08.jpg/",
187
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fdonuts-bacon-08.jpg",
188
+ "time_modified": 1236040334,
189
+ "tiny_url": "http://tinyb.cn/3t",
190
+ "user": {
191
+ "username": "leah",
192
+ "timezone": "US/Pacific",
193
+ "id": 2
194
+ },
195
+ "is_folder": false,
196
+ "path": "leah/bacon/donuts-bacon-08.jpg",
197
+ "content_type": "image/jpeg",
198
+ "type": "image",
199
+ "id": "8e33d98269e8f45a331f93d170317f4d",
200
+ "description": "A winning ticket."
201
+ },
202
+ {
203
+ "size": 25652,
204
+ "permalink": "http://baconfile.com/leah/bacon/press-button.jpg/",
205
+ "name": "press-button.jpg",
206
+ "url": "/leah/bacon/press-button.jpg/",
207
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fpress-button.jpg",
208
+ "time_modified": 1236040641,
209
+ "tiny_url": "http://tinyb.cn/3u",
210
+ "user": {
211
+ "username": "leah",
212
+ "timezone": "US/Pacific",
213
+ "id": 2
214
+ },
215
+ "is_folder": false,
216
+ "path": "leah/bacon/press-button.jpg",
217
+ "content_type": "image/jpeg",
218
+ "type": "image",
219
+ "id": "f4a24d2cb3b13e7dd66566a59967f2c5",
220
+ "description": ""
221
+ },
222
+ {
223
+ "size": 26067,
224
+ "permalink": "http://baconfile.com/leah/bacon/stove-ownership.png/",
225
+ "name": "stove-ownership.png",
226
+ "url": "/leah/bacon/stove-ownership.png/",
227
+ "file_url": "http://s3.amazonaws.com:80/leah.baconfile.com/bacon%2Fstove-ownership.png",
228
+ "time_modified": 1236040649,
229
+ "tiny_url": "http://tinyb.cn/3v",
230
+ "user": {
231
+ "username": "leah",
232
+ "timezone": "US/Pacific",
233
+ "id": 2
234
+ },
235
+ "is_folder": false,
236
+ "path": "leah/bacon/stove-ownership.png",
237
+ "content_type": "image/png",
238
+ "type": "image",
239
+ "id": "06b9948a55514eca25c364f90584e25b",
240
+ "description": "http://xkcd.com/418/"
241
+ }]
242
+ }