Class: Strutta::Moderation

Inherits:
APIObject show all
Defined in:
lib/strutta-api/moderation.rb

Overview

Entries belong to a Strutta::Games object Instance methods found in Strutta::APIObject

Instance Attribute Summary

Attributes inherited from APIObject

#game

Instance Method Summary collapse

Methods inherited from APIObject

#create, #method_disabled

Constructor Details

#initialize(id = nil, game) ⇒ Strutta::Points

Initializes the Strutta::Entries object

Parameters:

  • id (Integer, nil) (defaults to: nil)

    Entry id

  • game (Strutta::Games)

    Master Strutta::Games object

[View source]

10
11
12
13
14
# File 'lib/strutta-api/moderation.rb', line 10

def initialize(id = nil, game)
  @id = id
  @game = game
  @root_path = 'moderation'
end

Instance Method Details

#get(params = {}) ⇒ Hash

GET request for Moderation (no ID required)

Returns:

  • (Hash)

    Parsed body of the API response

[View source]

19
20
21
22
# File 'lib/strutta-api/moderation.rb', line 19

def get(params = {})
  @game.verify_no_id(@id)
  @game.get(params, @root_path)
end