snapcat 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/snapcat/media.rb +12 -8
- data/snapcat.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1458ee24fb19bd6a13181c418acd1a98b428d9f
|
4
|
+
data.tar.gz: 87f76a449bcb15ceac064f9d988be98240fb23e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 117c5507b0efc95a7d1823ca48106f592cc8c990633da11da8f61cc2460511fcde30c0711b61b6aef5b22fc83051f18f5f6f171803386c424a4da6476a84f5c5
|
7
|
+
data.tar.gz: 9812ee8724a913615469e99bfe18e1daa86472951c66352b5db56f0118ece99f7b53a988512198d2be22be55d1a9c2851e695fc2b48cfcf82593da3b3559315b
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Snapcat
|
2
2
|
=======
|
3
|
-
[![Build Status](https://travis-ci.org/
|
3
|
+
[![Build Status](https://travis-ci.org/nneal/snapcat.png)](https://travis-ci.org/nneal/snapcat)
|
4
4
|
|
5
5
|
|
6
6
|
A cat-tastic Ruby wrapper for the [Snapchat](http://snapchat.com) private API.
|
data/lib/snapcat/media.rb
CHANGED
@@ -5,16 +5,12 @@ module Snapcat
|
|
5
5
|
@type = Type.new(code: type_code, data: @data)
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
@type.
|
8
|
+
def file_extension
|
9
|
+
@type.file_extension
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
|
14
|
-
'jpg'
|
15
|
-
elsif video?
|
16
|
-
'mp4'
|
17
|
-
end
|
12
|
+
def image?
|
13
|
+
@type.image?
|
18
14
|
end
|
19
15
|
|
20
16
|
def generate_id(username)
|
@@ -48,6 +44,14 @@ module Snapcat
|
|
48
44
|
@code = code_from(options[:code], options[:data])
|
49
45
|
end
|
50
46
|
|
47
|
+
def file_extension
|
48
|
+
if image?
|
49
|
+
'jpg'
|
50
|
+
elsif video?
|
51
|
+
'mp4'
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
51
55
|
def image?
|
52
56
|
[IMAGE, FRIEND_REQUEST_IMAGE].include? @code
|
53
57
|
end
|
data/snapcat.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neal Kemp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httmultiparty
|