livefyre 1.3.0 → 1.3.2
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 +8 -8
- data/CHANGELOG +4 -0
- data/lib/livefyre/api/personalized_stream.rb +6 -3
- data/lib/livefyre/core/network.rb +5 -2
- data/lib/livefyre/core/site.rb +4 -2
- data/lib/livefyre/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTMyOTJlNDUxZTNiZjI0MWJhNjVkNTZlODFkYmRiZjc5NmIxN2EyYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjdiM2JmM2VkZDk1NDNiOGM3MjBhMTMwNGNjZTMxNjM0NzdiYmE3Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2U1OGQzOTc1MmQyOTg2Nzc5YmYwMWNmZjQ3MzlmODY2NDE0OGMyOGQzNzg5
|
10
|
+
OTA4ZDA4YTU5NWRhMjk5OWZiNGU0ZDEyNzBhMjM5NjI0ZjQ4MDZlY2ZjYTQ4
|
11
|
+
NWI3MGViMjcxMzgzOTUyZTBhMDUxODg5NWI0N2YwZDQzYWQ0MDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWY5Y2ZjNjI2YTRjMGZhN2M3ZTk4NTVkZTdlMzM4YmE3ZmQwOGRmZGI5Yzc4
|
14
|
+
NjQ5MmQ4MmFkMGY5Y2U5NjEzNTkwODEzNmJlMWVhNDBkNDFlMDlmYjFjOWIw
|
15
|
+
MmRiMzBhZjRhOWNlM2U4NjllOTYzYTE0Y2RmYjcyOGY1OWYwOTU=
|
data/CHANGELOG
CHANGED
@@ -5,6 +5,7 @@ require 'addressable/uri'
|
|
5
5
|
|
6
6
|
require 'livefyre/entity/topic'
|
7
7
|
require 'livefyre/entity/subscription'
|
8
|
+
require 'livefyre/api/domain'
|
8
9
|
|
9
10
|
module Livefyre
|
10
11
|
class PersonalizedStream
|
@@ -203,7 +204,7 @@ module Livefyre
|
|
203
204
|
|
204
205
|
# Stream API
|
205
206
|
def self.get_timeline_stream(core, resource, limit=50, t_until=nil, t_since=nil)
|
206
|
-
url =
|
207
|
+
url = self.stream_base_url(core) + TIMELINE_PATH
|
207
208
|
url += "?resource=#{resource}&limit=#{limit}"
|
208
209
|
|
209
210
|
if t_until != nil
|
@@ -220,10 +221,12 @@ module Livefyre
|
|
220
221
|
private
|
221
222
|
|
222
223
|
def self.base_url(core)
|
223
|
-
"
|
224
|
+
"#{Domain::quill(core)}/api/v4"
|
224
225
|
end
|
225
226
|
|
226
|
-
|
227
|
+
def self.stream_base_url(core)
|
228
|
+
"#{Domain::bootstrap(core)}/api/v4"
|
229
|
+
end
|
227
230
|
|
228
231
|
def self.topic_path(core, topic_id)
|
229
232
|
"/#{Topic.generate_urn(core, topic_id)}/"
|
@@ -3,6 +3,7 @@ require 'jwt'
|
|
3
3
|
require 'rest-client'
|
4
4
|
|
5
5
|
require 'livefyre/core/site'
|
6
|
+
require 'livefyre/api/domain'
|
6
7
|
|
7
8
|
module Livefyre
|
8
9
|
class Network
|
@@ -12,18 +13,20 @@ module Livefyre
|
|
12
13
|
def initialize(name, key)
|
13
14
|
@name = name
|
14
15
|
@key = key
|
16
|
+
@ssl = true
|
15
17
|
@network_name = name.split('.')[0]
|
16
18
|
end
|
17
19
|
|
18
20
|
attr_reader :name
|
19
21
|
attr_reader :key
|
22
|
+
attr_accessor :ssl
|
20
23
|
attr_reader :network_name
|
21
24
|
|
22
25
|
def set_user_sync_url(url_template)
|
23
26
|
raise ArgumentError, 'url_template should contain {id}' if !url_template.include?('{id}')
|
24
27
|
|
25
28
|
response = RestClient.post(
|
26
|
-
"
|
29
|
+
"#{Domain::quill(self)}/",
|
27
30
|
{ actor_token: build_livefyre_token, pull_profile_url: url_template }
|
28
31
|
)
|
29
32
|
response.code == 204
|
@@ -31,7 +34,7 @@ module Livefyre
|
|
31
34
|
|
32
35
|
def sync_user(user_id)
|
33
36
|
response = RestClient.post(
|
34
|
-
"
|
37
|
+
"#{Domain::quill(self)}/api/v3_0/user/#{user_id}/refresh",
|
35
38
|
{ lftoken: build_livefyre_token }
|
36
39
|
)
|
37
40
|
response.code == 200
|
data/lib/livefyre/core/site.rb
CHANGED
@@ -5,6 +5,8 @@ require 'jwt'
|
|
5
5
|
require 'rest-client'
|
6
6
|
require 'addressable/uri'
|
7
7
|
|
8
|
+
require 'livefyre/api/domain'
|
9
|
+
|
8
10
|
module Livefyre
|
9
11
|
class Site
|
10
12
|
TYPE = %w(reviews sidenotes ratings counting liveblog livechat livecomments)
|
@@ -46,7 +48,7 @@ module Livefyre
|
|
46
48
|
|
47
49
|
|
48
50
|
def create_collection(title, article_id, url, options={})
|
49
|
-
uri = "
|
51
|
+
uri = "#{Domain::quill(self)}/api/v3.0/site/#{@id}/collection/create/?sync=1"
|
50
52
|
data = {
|
51
53
|
articleId: article_id,
|
52
54
|
collectionMeta: build_collection_meta_token(title, article_id, url, options),
|
@@ -65,7 +67,7 @@ module Livefyre
|
|
65
67
|
|
66
68
|
def get_collection_content(article_id)
|
67
69
|
response = RestClient.get(
|
68
|
-
"
|
70
|
+
"#{Domain::bootstrap(self)}/bs3/#{@network.name}/#{@id}/#{Base64.encode64(article_id.to_s).chomp}/init",
|
69
71
|
:accepts => :json
|
70
72
|
)
|
71
73
|
response.code == 200 ? JSON.parse(response) : nil
|
data/lib/livefyre/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livefyre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Livefyre
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|