Class: Rallio::Review
Overview
Represents a review object as it comes from Rallio.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Unique id for account.
-
#account_name ⇒ String
Account name.
-
#can_reply ⇒ true, false
True if review can be replied to.
-
#comments ⇒ Array<Hash>
For facebook this is an array of responses to review.
-
#id ⇒ Integer
Unique id for review.
-
#liked ⇒ true, false
True if review has been liked.
-
#location_image_url ⇒ String
Url for image of location.
-
#location_name ⇒ String
Location review is for.
-
#message ⇒ String
Review text left by reviewer.
-
#network ⇒ String
Social network review was posted to.
-
#posted_at ⇒ DateTime
DateTime review was made.
-
#rating ⇒ Integer
Overall review rating.
-
#review_reply ⇒ String
Reply for non-facebook reviews.
-
#review_reply_at ⇒ DateTime
DateTime of reply for non-facebook reviews.
-
#url ⇒ String
Url to review.
-
#user_image ⇒ String
Link to image of reviewer.
-
#user_name ⇒ String
Social network username of reviewer.
Class Method Summary collapse
-
.all(query_params: {}, access_token:) ⇒ Array<Rallio::Review>
Retreives reviews.
Instance Method Summary collapse
-
#reply(message:, access_token:) ⇒ Hash
Replies to review.
Methods inherited from Base
Instance Attribute Details
#account_id ⇒ Integer
Returns unique id for account.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#account_name ⇒ String
Returns account name.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#can_reply ⇒ true, false
Returns true if review can be replied to.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#comments ⇒ Array<Hash>
Returns for facebook this is an array of responses to review.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#id ⇒ Integer
Returns unique id for review.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#liked ⇒ true, false
Returns true if review has been liked.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#location_image_url ⇒ String
Returns url for image of location.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#location_name ⇒ String
Returns location review is for.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#message ⇒ String
Returns review text left by reviewer.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#network ⇒ String
Returns social network review was posted to.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#posted_at ⇒ DateTime
Returns DateTime review was made.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#rating ⇒ Integer
Returns overall review rating.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#review_reply ⇒ String
Returns reply for non-facebook reviews.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#review_reply_at ⇒ DateTime
Returns DateTime of reply for non-facebook reviews.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#url ⇒ String
Returns url to review.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#user_image ⇒ String
Returns link to image of reviewer.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
#user_name ⇒ String
Returns social network username of reviewer.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/rallio/review.rb', line 38 class Review < Base attribute :id, Integer attribute :account_id, Integer attribute :account_name, String attribute :network, String attribute :posted_at, DateTime attribute :user_name, String attribute :user_image, String attribute :rating, Float attribute :message, String attribute :comments, Array[Hash] attribute :liked, Axiom::Types::Boolean attribute :url, String attribute :can_reply, Axiom::Types::Boolean attribute :location_name, String attribute :location_image_url, String attribute :review_reply, String attribute :review_reply_at, DateTime # Retreives reviews. All query_params are optional. If no query_params are # passed in all reviews accessible to user are returned. # # @param query_params [Hash] params to filter results # @option query_params [String] :page results page # @option query_params [String] :account_id filter results to one or more # accounts, should be seperated by commas # @option query_params [String] :franchisor_id filter results to a single # franchisor # @option query_params [String] :network filter results to one network, # possible choices are facebook, google_places, yelp # @option query_params [String] :start_date iso8601 date to start on # @option query_params [String] :end_date iso8601 date to end on # @option query_params [String] :rating filter by rating # @param access_token [String] user access token to use for authorization # @return [Array<Rallio::Review>] def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end # Replies to review. # # @param message [String] text used for reply # @param access_token [String] user access token to use for authorization # @return [Hash] reply hash that was created def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end end |
Class Method Details
.all(query_params: {}, access_token:) ⇒ Array<Rallio::Review>
Retreives reviews. All query_params are optional. If no query_params are passed in all reviews accessible to user are returned.
73 74 75 76 77 |
# File 'lib/rallio/review.rb', line 73 def self.all(query_params: {}, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } response = self.get("/reviews", query: query_params, headers: headers) response.parsed_response['reviews'].map { |r| new(r) } end |
Instance Method Details
#reply(message:, access_token:) ⇒ Hash
Replies to review.
84 85 86 87 |
# File 'lib/rallio/review.rb', line 84 def reply(message:, access_token:) headers = { 'Authorization' => "Bearer #{access_token}" } self.class.post("/reviews/#{id}/reply", headers: headers, body: { message: }) end |