snapcat 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/snapcat/requestor.rb +3 -5
- data/snapcat.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bbe678c0f6fd991ae9e35c57e1e7f12fd3246615
|
|
4
|
+
data.tar.gz: aa74e743b1e2efad72d5bdad29fbdfda6431b0fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7676b65e134593a58052b99ca6191eeb0894f84787b596a72c364766aaf0391f23ada74e8dee5d3964a0ce261fb227f58d3641b14228325db50efa1b0d8bc82d
|
|
7
|
+
data.tar.gz: f01a12b1f3978bfd1d6409b282f0d4749816eac833d81663a229d3d354b33ef9f13c21c2de7c1ec8c91f4f5950fbfb354be4b5ff624e075b9f3561aafc49c2a8
|
data/README.md
CHANGED
data/lib/snapcat/requestor.rb
CHANGED
|
@@ -2,7 +2,6 @@ module Snapcat
|
|
|
2
2
|
class Requestor
|
|
3
3
|
include HTTMultiParty
|
|
4
4
|
|
|
5
|
-
APP_VERSION = '6.0.0'
|
|
6
5
|
SECRET = 'iEk21fuwZApXlz93750dmW22pw389dPwOk'
|
|
7
6
|
STATIC_TOKEN = 'm198sOkJEn37DjqZ32lpRu76xmw288xSQ9'
|
|
8
7
|
HASH_PATTERN = '0001110111101110001111010101111011010001001110011000110001000110'
|
|
@@ -19,11 +18,11 @@ module Snapcat
|
|
|
19
18
|
def request(endpoint, data = {})
|
|
20
19
|
response = self.class.post(
|
|
21
20
|
"/#{endpoint}",
|
|
22
|
-
|
|
21
|
+
body: merge_defaults_with(data)
|
|
23
22
|
)
|
|
24
23
|
|
|
25
24
|
additional_fields = additional_fields_for(data)
|
|
26
|
-
result =
|
|
25
|
+
result = Response.new(response, additional_fields)
|
|
27
26
|
|
|
28
27
|
auth_token_from(result, endpoint)
|
|
29
28
|
result
|
|
@@ -100,8 +99,7 @@ module Snapcat
|
|
|
100
99
|
|
|
101
100
|
data.merge!({
|
|
102
101
|
req_token: built_token(@auth_token, now),
|
|
103
|
-
timestamp: now
|
|
104
|
-
version: APP_VERSION
|
|
102
|
+
timestamp: now
|
|
105
103
|
})
|
|
106
104
|
end
|
|
107
105
|
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.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Neal Kemp
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-04-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httmultiparty
|
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
190
190
|
version: '0'
|
|
191
191
|
requirements: []
|
|
192
192
|
rubyforge_project:
|
|
193
|
-
rubygems_version: 2.2.
|
|
193
|
+
rubygems_version: 2.2.2
|
|
194
194
|
signing_key:
|
|
195
195
|
specification_version: 4
|
|
196
196
|
summary: Ruby wrapper for Snapchat's private API
|