Skip to content

Latest commit

 

History

History
358 lines (221 loc) · 6.56 KB

DOCUMENTATION.md

File metadata and controls

358 lines (221 loc) · 6.56 KB

Table of Contents

limoon

limoon.utils

limoon.model

Entry Objects

@dataclass
class Entry()

Entry data class.

Arguments:

  • id int - Unique entry identity.
  • author_nickname str - Author who created entry.
  • content str - Entry content (with HTML tags).
  • favorite_count int - Entry favorite count.
  • created str - Datetime of create entry.
  • edited str|bool - Datetime of edit entry.
  • url str - Entry HTTP link.

Topic Objects

@dataclass
class Topic()

Topic data class.

Arguments:

  • id int - Unique topic identity.
  • title str - Topic title.
  • path str - Unique topic path.
  • entrys class - Entrys written for topic.
  • page_count int|None - Topic total page count.
  • url str - Topic HTTP link.

Rank Objects

@dataclass
class Rank()

Rank data class.

Arguments:

  • name str - Custom rank name.
  • karma int - Rank karma number.

Badge Objects

@dataclass
class Badge()

Badge data class.

Arguments:

name (str): description (str): icon_url (str):

Author Objects

@dataclass
class Author()

Author data class.

Arguments:

  • nickname str - Unique author nickname.
  • biography str|None - Author biography (with HTML tags).
  • total_entry int - Author total entry count.
  • follower_count int - Author total follower count.
  • following_count int - Author total following count.
  • avatar_url str - Author avatar HTTP link.
  • rank class - Author rank.
  • badges class - Author badges.
  • url str - Author HTTP link.

limoon.constant

limoon.core

get_topic

def get_topic(topic_keywords: TopicKeywords,
              max_entry: int = None,
              page: int = 1) -> model.Topic

This function get Ekşi Sözlük topic.

Arguments:

  • topic_keywords str - Keywords (or path) of topic to be get.
  • max_entry int=None - Maximum number of entrys get from per page.
  • page int=1 - Specific topic page.

Returns:

  • model.Topic class - Topic data class.

get_entry

def get_entry(entry_id: EntryID) -> model.Entry

This function get Ekşi Sözlük entry.

Arguments:

  • entry_id int - Unique entry identity.

Returns:

  • model.Entry class - Entry data class.

get_author

def get_author(nickname: Nickname) -> model.Author

This function get Ekşi Sözlük author.

Arguments:

  • nickname str - Unique author nickname.

Returns:

  • model.Author class - Author data class.

get_author_rank

def get_author_rank(nickname: Nickname) -> model.Rank

This function get Ekşi Sözlük author rank.

Arguments:

  • nickname str - Unique author nickname.

Returns:

  • model.Rank class - Rank data class.

get_author_badges

def get_author_badges(nickname: Nickname) -> Iterator[model.Badge]

This function get Ekşi Sözlük author badges.

Arguments:

  • nickname str - Unique author nickname.

Returns:

  • Iterator[model.Badge] - Badge data classes.

get_author_topic

def get_author_topic(nickname: Nickname, max_entry: int = None) -> model.Topic

This function get Ekşi Sözlük author topic.

Arguments:

  • nickname str - Unique author nickname.
  • max_entry int=None - Maximum number of entrys get from per page.

Returns:

  • model.Topic class - Topic data class.

get_author_last_entrys

def get_author_last_entrys(nickname: Nickname,
                           page: int = 1) -> Iterator[model.Entry]

get_agenda

def get_agenda(max_topic: int = None,
               max_entry: int = None) -> Iterator[model.Topic]

This function get Ekşi Sözlük agenda (gündem) page.

Arguments:

  • max_topic int=None - Maximum number of topics get from agenda.
  • max_entry int=None - Maximum number of entrys get from topic.

Returns:

  • Iterator[model.Topic] - Topic data classes.

get_debe

def get_debe(max_entry: int = None) -> Iterator[model.Entry]

This function get Ekşi Sözlük debe page.

Arguments:

  • max_entry int=None - Maximum number of entrys get per page.

Returns:

  • Iterator[model.Topic] - Entry data classes.

limoon.exception

TopicNotFound Objects

class TopicNotFound(Exception)

The topic record is not available.

EntryNotFound Objects

class EntryNotFound(Exception)

The entry record is not available.

AuthorNotFound Objects

class AuthorNotFound(Exception)

The author record is not available.

PageNotFound Objects

class PageNotFound(Exception)

The page record is not available.