Class: LessonlyApi::Tags

Inherits:
Request show all
Defined in:
lib/lessonly_api/tags.rb

Class Method Summary collapse

Methods inherited from Request

client

Methods inherited from ResourceType::Base

#attributes, dump, fields, from_json, #initialize, load

Constructor Details

This class inherits a constructor from LessonlyApi::ResourceType::Base

Class Method Details

.listResourceType::Tags

Retrieve all tags docs.lessonly.com/#list-tags

Returns:



8
9
10
11
# File 'lib/lessonly_api/tags.rb', line 8

def list
  raw_result = send_get('/tags')
  LessonlyApi::ResourceType::Tags.new(raw_result)
end

.show(id) ⇒ ResourceType::Tag

Retrieve the tag’s information docs.lessonly.com/#show-tag-details

Parameters:

  • id (Integer)

    ID of the tag

Returns:



18
19
20
21
# File 'lib/lessonly_api/tags.rb', line 18

def show(id)
  raw_result = send_get("/tags/#{id}")
  ResourceType::Tag.new(raw_result)
end