Class: Forem::Tag

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/forem/resources/tag.rb

Overview

Represents a Forem tag used to categorize articles.

Tags are keywords attached to articles that help readers discover related content. Only listing is supported through the public API; tags are created implicitly when articles are published with new tag names.

Tags are ordered by popularity. Default: 10 per page.

Available operations (via mixins):

- +List+ — GET /api/tags

Examples:

List tags ordered by popularity

tags = client.tags.list(per_page: 50)
tags.data.each { |t| puts "#{t.name} (#{t.points} points)" }

Iterate over every tag using auto-pagination

client.tags.list.auto_paging_each { |t| puts t.name }

See Also:

Constant Summary collapse

OBJECT_NAME =
"tag"
RESOURCE_PATH =
"/api/tags"

Instance Attribute Summary

Attributes inherited from ForemObject

#requestor

Method Summary

Methods included from APIOperations::List

list

Methods inherited from APIResource

#refresh, resource_path, #resource_url

Methods inherited from ForemObject

#==, #[], #[]=, construct_from, cursor_list, #initialize, #inspect, #method_missing, paginated_list, #respond_to_missing?, #to_hash

Methods included from APIOperations::Request

included, #request

Constructor Details

This class inherits a constructor from Forem::ForemObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Forem::ForemObject