Class: Redd::Models::ModAction

Inherits:
Model
  • Object
show all
Defined in:
lib/redd/models/mod_action.rb

Overview

Represents a moderator action, part of a moderation log.

See Also:

Instance Attribute Summary collapse

Attributes inherited from Model

#client

Method Summary

Methods inherited from Model

#initialize

Constructor Details

This class inherits a constructor from Redd::Models::Model

Instance Attribute Details

#actionString (readonly)

Returns the action type.

Returns:

  • (String)

    the action type


56
# File 'lib/redd/models/mod_action.rb', line 56

property :action

#created_atTime (readonly)

Returns the time when the action was done.

Returns:

  • (Time)

    the time when the action was done


36
# File 'lib/redd/models/mod_action.rb', line 36

property :created_at, from: :created_utc, with: ->(t) { Time.at(t) }

#descriptionString (readonly)

Returns the action description.

Returns:

  • (String)

    the action description


12
# File 'lib/redd/models/mod_action.rb', line 12

property :description

#detailsString (readonly)

Returns the action details.

Returns:

  • (String)

    the action details


52
# File 'lib/redd/models/mod_action.rb', line 52

property :details

#mod_id36String (readonly)

Returns the id of the moderator that performed this action.

Returns:

  • (String)

    the id of the moderator that performed this action


32
# File 'lib/redd/models/mod_action.rb', line 32

property :mod_id36

#subredditSubreddit (readonly)

Returns the subreddit the action was performed on.

Returns:

  • (Subreddit)

    the subreddit the action was performed on


40
# File 'lib/redd/models/mod_action.rb', line 40

property :subreddit, with: ->(n) { Subreddit.new(client, display_name: n) }

#subreddit_id36String (readonly)

Returns the subreddit's id.

Returns:

  • (String)

    the subreddit's id


48
# File 'lib/redd/models/mod_action.rb', line 48

property :subreddit_id36, from: :sr_id36

#subreddit_name_prefixedString (readonly)

Returns the subreddit name, prefixed with a “r/”.

Returns:

  • (String)

    the subreddit name, prefixed with a “r/”


44
# File 'lib/redd/models/mod_action.rb', line 44

property :subreddit_name_prefixed

#target_authorUser (readonly)

Returns the target user.

Returns:

  • (User)

    the target user


28
# File 'lib/redd/models/mod_action.rb', line 28

property :target_author, with: ->(n) { User.new(client, name: n) }

#target_bodyString (readonly)

Returns the body of the item that was targeted.

Returns:

  • (String)

    the body of the item that was targeted


20
# File 'lib/redd/models/mod_action.rb', line 20

property :target_body

Returns the *relative* permalink to the item.

Returns:

  • (String)

    the *relative* permalink to the item


24
# File 'lib/redd/models/mod_action.rb', line 24

property :target_permalink

#target_titleString (readonly)

Returns the title of the item that was targeted.

Returns:

  • (String)

    the title of the item that was targeted


16
# File 'lib/redd/models/mod_action.rb', line 16

property :target_title