Class: MisarBlog::Models::ArticleReactions

Inherits:
Base
  • Object
show all
Defined in:
lib/misarblog/models.rb

Overview

Reaction counts for an article (GET /reactions).

Instance Attribute Summary

Attributes inherited from Base

#raw

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize, #to_h

Constructor Details

This class inherits a constructor from MisarBlog::Models::Base

Instance Method Details

#article_idObject



102
# File 'lib/misarblog/models.rb', line 102

def article_id;     @raw["article_id"];              end

#countsObject



103
# File 'lib/misarblog/models.rb', line 103

def counts;         @raw["counts"] || {};            end

#totalObject



104
# File 'lib/misarblog/models.rb', line 104

def total;          @raw["total"];                   end

#user_reactionsObject



105
# File 'lib/misarblog/models.rb', line 105

def user_reactions; @raw["user_reactions"] || [];    end