spark_api 1.4.25 → 1.4.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWRmNWJhNzE4N2I3MTU1Y2M5MjFlYWFmMGVkMjlhNjg1MTY2NTgyOA==
4
+ NDczOTVmZGM0NzQ5MzIzOTIyOGEyMWM5ODViOTdiMmI3NDc0MjA5YQ==
5
5
  data.tar.gz: !binary |-
6
- MWViOWU1YjgzODg2NjgzZWQyOWI2MTcxZThkY2YxNWVhYmY1NTc5MA==
6
+ NmZmZjMwNGIzZjZmNzcwOGRlZWFlOWE2NTA1YzBlODAyODc1ZWQ1Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2VlNjczMDNmMjQ2NGUwYmY0ZGNmMjFhOTRiZDg4OTJmYzAzYTgyZmE3ZTcz
10
- Mzc4NzZjYTI2MzBmMjAwOGI2MTIzZmI1MTU4MzVjOGRhMTYyY2NhYTc2YjEy
11
- NWUzZTNlYzRhMmFlZDhiM2M3NmFhNGVmZTM5ODdiMzcxMGE3NWY=
9
+ MmU0ZjdlM2Y4Nzg3ZmU4MTQ3YjRiYTMxMDMzNzYxMzBhMjYwYWJjNjZhNmRi
10
+ NjM3ZTBlNWZkMTJkYmM2ZDJkM2RmYjI3NjE3MDE0ZWZmNDYxYzAwMDI3NTE0
11
+ MWZkYjliYTE1Yjg5NmZmMmQ0ZTkzYjRiZDRjZDc0ZDUzODI5MmU=
12
12
  data.tar.gz: !binary |-
13
- MWQxOWQ0ODM3MTcyMjJkZTBlNTI1MmYyZWVjYzdhNzE2MzQzODNiOGEyZjVk
14
- ZGZlNzUwNzg4Y2EyN2EyNTAyM2VmOTNiZjVmZjg0MjRjNDk1Y2YwYTAxZWVm
15
- MzgwOTljMDVhZWI0MTE2YmNiMzIzYzBkYzJlNzFlZDRiYmYwY2Q=
13
+ ZGFhOWE0YjBlMGYyOTA3MTU2MDBlZTljZWM5NjUwYWMxNWVhMzVlYTM0ZGQ5
14
+ YmE1M2U1NjZhODc1ZDY1NmRjMmFlMmMzOGZlZGIwNzdmZWU3NzdlZWI4NjBh
15
+ YTJmYTgyMmZkZWFmMGY5YjE3Yjc2NWIxODJjOWM2YWQwMjFjMmI=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.25
1
+ 1.4.26
@@ -25,6 +25,14 @@ module SparkApi
25
25
  Message.collect(connection.get("#{self.class.path}/#{self.Id}/replies", arguments))
26
26
  end
27
27
 
28
+ def self.unread(args={})
29
+ collect(connection.get("#{path}/unread", args))
30
+ end
31
+
32
+ def self.unread_count
33
+ unread _pagination: 'count'
34
+ end
35
+
28
36
  end
29
37
  end
30
38
  end
@@ -0,0 +1,12 @@
1
+ {
2
+ "D": {
3
+ "Success": true,
4
+ "Results": [],
5
+ "Pagination": {
6
+ "TotalRows": 78,
7
+ "PageSize": 25,
8
+ "TotalPages": 4,
9
+ "CurrentPage": 1
10
+ }
11
+ }
12
+ }
@@ -62,4 +62,20 @@ describe Message do
62
62
 
63
63
  end
64
64
 
65
+ context "/messages/unread", :support do
66
+
67
+ on_get_it "gets unread messages" do
68
+ stub_api_get("/messages/unread", 'messages/get.json', {})
69
+ messages = Message.unread
70
+ messages.size.should == 2
71
+ messages.first.should be_a Message
72
+ end
73
+
74
+ on_get_it "gets unread messages count" do
75
+ stub_api_get("/messages/unread", 'messages/count.json', _pagination: 'count')
76
+ Message.unread_count.should == 78
77
+ end
78
+
79
+ end
80
+
65
81
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spark_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.25
4
+ version: 1.4.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Hornseth
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-26 00:00:00.000000000 Z
12
+ date: 2018-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -469,6 +469,7 @@ files:
469
469
  - spec/fixtures/listings/with_videos.json
470
470
  - spec/fixtures/listings/with_vtour.json
471
471
  - spec/fixtures/logo_fbs.png
472
+ - spec/fixtures/messages/count.json
472
473
  - spec/fixtures/messages/get.json
473
474
  - spec/fixtures/messages/new.json
474
475
  - spec/fixtures/messages/new_empty.json
@@ -689,6 +690,7 @@ test_files:
689
690
  - spec/fixtures/saved_searches/with_inactive_newsfeed.json
690
691
  - spec/fixtures/sharedlinks/success.json
691
692
  - spec/fixtures/messages/post.json
693
+ - spec/fixtures/messages/count.json
692
694
  - spec/fixtures/messages/new_with_recipients.json
693
695
  - spec/fixtures/messages/new.json
694
696
  - spec/fixtures/messages/new_empty.json