Class: Desk::Api::Articles

Inherits:
Object
  • Object
show all
Includes:
Creatable, Deletable, Listable, Searchable
Defined in:
lib/desk/api/articles.rb

Constant Summary collapse

VALID_SEARCH_PARAMS =
[:text, :topic_ids]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Deletable

#delete

Methods included from Searchable

#search

Methods included from Creatable

#create, #update

Methods included from Listable

#all, #show

Constructor Details

#initialize(connection) ⇒ Articles

Returns a new instance of Articles.



21
22
23
24
25
# File 'lib/desk/api/articles.rb', line 21

def initialize(connection)
  @connection = connection
  @endpoint = "articles"
  @return_class = Desk::Article
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



19
20
21
# File 'lib/desk/api/articles.rb', line 19

def connection
  @connection
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



19
20
21
# File 'lib/desk/api/articles.rb', line 19

def endpoint
  @endpoint
end

#return_classObject (readonly)

Returns the value of attribute return_class.



19
20
21
# File 'lib/desk/api/articles.rb', line 19

def return_class
  @return_class
end