rallio 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rallio/access_token.rb +2 -2
- data/lib/rallio/franchisor.rb +18 -1
- data/lib/rallio/user.rb +4 -1
- data/lib/rallio/version.rb +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: 173b2cc079841141428af0d262190965338cf565
|
4
|
+
data.tar.gz: eb80eed426664e0e41b7959fdf6052e31d80ca0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d0e892a1f8692f05565e994680e5e3024054ac1ef50422bce25243c5e322f6627d0d7b06229728c12c5560a5a6f71b29fd8ff5b70ce9fee8c2a3ad55b3fa5f4
|
7
|
+
data.tar.gz: 2ddced76f1d321a8863449803cda3ce4ee351b2562915d09c99d79f995fa94c141c1a78d625e6981e690f36fed91108854a80322e9adfc8ea692805d038b0a6c
|
data/lib/rallio/access_token.rb
CHANGED
@@ -17,8 +17,8 @@ module Rallio
|
|
17
17
|
|
18
18
|
# Creates new access token for user_id.
|
19
19
|
#
|
20
|
-
# NOTE: These
|
21
|
-
#
|
20
|
+
# NOTE: These tokens do not expire so it is suggested (recommended) that the
|
21
|
+
# token be cached and reused whenever possible.
|
22
22
|
#
|
23
23
|
# @param user_id [Integer]
|
24
24
|
# @return [Rallio::AccessToken]
|
data/lib/rallio/franchisor.rb
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
module Rallio
|
2
|
-
|
2
|
+
# Represents an franchisor object as it comes from Rallio.
|
3
|
+
#
|
4
|
+
# @!attribute [rw] id
|
5
|
+
# @return [Integer] unique id for franchisor
|
6
|
+
# @!attribute [rw] name
|
7
|
+
# @return [String] account name
|
8
|
+
class Franchisor < Base
|
9
|
+
attribute :id, Integer
|
10
|
+
attribute :name, String
|
11
|
+
|
3
12
|
# Retreives all franchisors for a given application.
|
4
13
|
#
|
5
14
|
# @return [Array<Rallio::Franchisor>]
|
@@ -16,6 +25,14 @@ module Rallio
|
|
16
25
|
Rallio::Account.for(franchisor_id: id)
|
17
26
|
end
|
18
27
|
|
28
|
+
# Retreives reviews for the franchisor.
|
29
|
+
#
|
30
|
+
# @param access_token [String] user access token for API access to account
|
31
|
+
# @return [Array<Rallio::Review>]
|
32
|
+
def reviews(access_token:)
|
33
|
+
Review.all(type: type, id: id, access_token: access_token)
|
34
|
+
end
|
35
|
+
|
19
36
|
private
|
20
37
|
|
21
38
|
def type
|
data/lib/rallio/user.rb
CHANGED
@@ -25,7 +25,7 @@ module Rallio
|
|
25
25
|
# @return [Array<Rallio::User>] array of users accessible to application
|
26
26
|
def self.accessible_users
|
27
27
|
response = self.get('/accessible_users', headers: app_credentials)
|
28
|
-
response.parsed_response['users'].map { |u|
|
28
|
+
response.parsed_response['users'].map { |u| new u }
|
29
29
|
end
|
30
30
|
|
31
31
|
# Create a user on the Rallio platform.
|
@@ -51,6 +51,9 @@ module Rallio
|
|
51
51
|
# Creates or returns the API access token for user.
|
52
52
|
# @see Rallio::AccessToken
|
53
53
|
#
|
54
|
+
# NOTE: These tokens do not expire so it is suggested (recommended) that the
|
55
|
+
# token be cached and reused whenever possible.
|
56
|
+
#
|
54
57
|
# @return [Rallio::AccessToken]
|
55
58
|
def access_token
|
56
59
|
@access_token ||= AccessToken.create(user_id: id)
|
data/lib/rallio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rallio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JD Guzman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|