snapcat 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1458ee24fb19bd6a13181c418acd1a98b428d9f
4
- data.tar.gz: 87f76a449bcb15ceac064f9d988be98240fb23e2
3
+ metadata.gz: 6f2cfaf1b082d45d7eee9dc9ba54952ae1b398a5
4
+ data.tar.gz: 72cf2dbebb6b2c327eba9ac54848b588e5b5dd81
5
5
  SHA512:
6
- metadata.gz: 117c5507b0efc95a7d1823ca48106f592cc8c990633da11da8f61cc2460511fcde30c0711b61b6aef5b22fc83051f18f5f6f171803386c424a4da6476a84f5c5
7
- data.tar.gz: 9812ee8724a913615469e99bfe18e1daa86472951c66352b5db56f0118ece99f7b53a988512198d2be22be55d1a9c2851e695fc2b48cfcf82593da3b3559315b
6
+ metadata.gz: 088b65cf956ef42d22587b6450e5939d08c5b7d7e9bb880db640953f69d81fc01bfc3befa26bad0f35e0981e8e59126aeacf3a52de30897329665d75e52b301d
7
+ data.tar.gz: 151f723cda3ca65ae9ec9f9c2325ddec7859dc487bd87aff3978db4b5e0d671419f509e9bb65a96561ae2606959038aa1fc168ac0d974881480e2e6e1f2a8b9d
data/README.md CHANGED
@@ -13,7 +13,7 @@ Installation
13
13
 
14
14
  Add this line to your application's `Gemfile`:
15
15
 
16
- gem 'snapcat', '0.0.1'
16
+ gem 'snapcat', '0.0.5'
17
17
 
18
18
  And then execute:
19
19
 
@@ -144,6 +144,14 @@ snap = user.snaps_received.first
144
144
  media_response = snapcat.media_for(snap.id)
145
145
  media = media_response.data[:media]
146
146
 
147
+ # Record a view
148
+ snapcat.view(snap.id)
149
+
150
+ # Record a screenshot
151
+ snapcat.screenshot(snap.id)
152
+
153
+ # Record a screenshot
154
+
147
155
  # Learn more about the media
148
156
  media.image?
149
157
  media.video?
@@ -85,11 +85,9 @@ module Snapcat
85
85
  end
86
86
 
87
87
  def screenshot(snap_id, view_duration = 1)
88
- raise NotImplementedError
89
-
90
88
  snap_data = {
91
89
  snap_id => {
92
- c: Status::SCREENSHOT,
90
+ c: Snap::Status::SCREENSHOT,
93
91
  sv: view_duration,
94
92
  t: Timestamp.float
95
93
  }
@@ -102,7 +100,11 @@ module Snapcat
102
100
  }
103
101
  ]
104
102
 
105
- request_events(events, snap_data)
103
+ @requestor.request_with_username(
104
+ 'update_snaps',
105
+ events: events.to_json,
106
+ json: snap_data.to_json
107
+ )
106
108
  end
107
109
 
108
110
  def send_media(data, recipients, options = {})
@@ -131,8 +133,6 @@ module Snapcat
131
133
  end
132
134
 
133
135
  def view(snap_id, view_duration = 1)
134
- raise NotImplementedError
135
-
136
136
  snap_data = {
137
137
  snap_id => { t: Timestamp.float, sv: view_duration }
138
138
  }
@@ -149,7 +149,11 @@ module Snapcat
149
149
  }
150
150
  ]
151
151
 
152
- request_events(events, snap_data)
152
+ @requestor.request_with_username(
153
+ 'update_snaps',
154
+ events: events.to_json,
155
+ json: snap_data.to_json
156
+ )
153
157
  end
154
158
 
155
159
  def update_email(email)
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'snapcat'
7
- spec.version = '0.0.4'
7
+ spec.version = '0.0.5'
8
8
  spec.authors = ['Neal Kemp']
9
9
  spec.email = ['']
10
10
  spec.description = %q{Snapchat API wrapper}
@@ -157,7 +157,7 @@ describe Snapcat::Client do
157
157
 
158
158
  describe '#screenshot' do
159
159
  it 'records a screenshot' do
160
- skip 'stubbing this one is annoying and its not working yet'
160
+ skip 'stubbing this one is annoying'
161
161
  ux = UserExperience.new
162
162
  ux.login
163
163
 
@@ -216,7 +216,7 @@ describe Snapcat::Client do
216
216
 
217
217
  describe '#view' do
218
218
  it 'records a view' do
219
- skip 'stubbing this one is annoying and its not working yet'
219
+ skip 'stubbing this one is annoying'
220
220
  ux = UserExperience.new
221
221
  ux.login
222
222
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neal Kemp