EksiSozluk

EksiSozluk

Manage all Eksi Sozluk abilities.

Constructor

new EksiSozluk(options)

Create an Eksi Sozluk instance.

Source:
Parameters:
Name Type Description
options object

Eksi Sozluk instance settings

Name Type Description
httpClient object

Axios settings as HTTP client, all Axios settings are useable

Name Type Attributes Default Description
timeout number <optional>
3000

Timeout of requests in miliseconds

baseURL string <optional>
https://eksisozluk.com

Base URL of Eksi Sozluk, you can use proxy here

Extends

Methods

(async) agenda(options) → {Promise.<TitleCollection>}

Fetch agenda.

Overrides:
Source:
Parameters:
Name Type Description
options object

Parameters that user can specify.

Name Type Attributes Default Description
page number <optional>
1

Page number.

Returns:
Type:
Promise.<TitleCollection>

A promise for the agenda titles.

createToken(email, password, options) → {SessionToken}

Create Eksi Sozluk session token with your credentials.

Source:
Parameters:
Name Type Description
email string

Your email address.

password string

Your password.

options object

Parameters that user can specify.

Name Type Attributes Default Description
extendTime boolean <optional>
false

If true, token will expire at 2 weeks later.

Throws:

User not authorized, password or email is wrong.

Type
AuthError
Returns:
Type:
SessionToken

Eksi Sozluk session token.

(async) debeEntries() → {Promise.Array.<Entry>}

Fetch yesterday's top entries.

Overrides:
Source:
Returns:
Type:
Promise.Array.<Entry>

A promise for the yesterday's top entries.

(async) entries(title, options) → {Promise.<EntryCollection>}

Fetch entries.

Overrides:
Source:
Parameters:
Name Type Description
title string

Title itself.

options object

Parameters that user can specify.

Name Type Attributes Default Description
page number <optional>
1

Page number.

type CollectionType <optional>

Sorting or filtering type.

author string <optional>

Username, if type is 'author' set this parameter.

search string <optional>

Search text, if type is 'find' set this parameter.

Returns:
Type:
Promise.<EntryCollection>

A promise for the entries.

(async) entryById(entryId) → {Promise.<Entry>}

Fetch entry by id.

Overrides:
Source:
Parameters:
Name Type Description
entryId number

Entry Id.

Returns:
Type:
Promise.<Entry>

A promise for the entry.

isAuthenticated(cookiesopt) → {Promise.<boolean>}

Check is user authenticated or not.

Source:
Parameters:
Name Type Attributes Default Description
cookies string <optional>
this.cookies

Cookies string.

Returns:
Type:
Promise.<boolean>

If user authenticated returns true, otherwise false.

isRecaptchaRequired() → {Promise.<boolean>}

Is verify ReCaptcha required to login?

Source:
Returns:
Type:
Promise.<boolean>

If ReCaptcha required returns true, otherwise false.

(async) login(email, password) → {EksiMember}

Login Eksi Sozluk with your credentials.

Source:
Parameters:
Name Type Description
email string

Your email address.

password string

Your password.

Throws:

User not authorized, password or email is wrong.

Type
AuthError
Returns:
Type:
EksiMember

Eksi Sozluk session.

(async) loginWithToken(token) → {EksiMember}

Login Eksi Sozluk with session cookie.

Source:
Parameters:
Name Type Description
token string

Session token of member.

Throws:

User not authorized.

Type
AuthError
Returns:
Type:
EksiMember

Eksi Sozluk session.

(async) questionsInAgenda(options) → {Promise.<TitleCollection>}

Fetch questions in agenda.

Overrides:
Source:
Parameters:
Name Type Description
options object

Parameters that user can specify.

Name Type Attributes Default Description
page number <optional>
1

Page number.

Returns:
Type:
Promise.<TitleCollection>

A promise for the agenda titles in agenda.

(async) questionsInToday(options) → {Promise.<TitleCollection>}

Fetch questions in today.

Overrides:
Source:
Parameters:
Name Type Description
options object

Parameters that user can specify.

Name Type Attributes Default Description
page number <optional>
1

Page number.

Returns:
Type:
Promise.<TitleCollection>

A promise for the agenda titles in today.

Search things.

Overrides:
Source:
Parameters:
Name Type Description
text string

Search text.

Returns:
Type:
Promise.<SearchResults>

A promise for the search results.

(async) tags() → {Promise.Array.<Tag>}

Fetch tags.

Overrides:
Source:
Returns:
Type:
Promise.Array.<Tag>

A promise for the tags.

(async) titlesByTag(tagName, options) → {Promise.<TitleCollection>}

Fetch titles by tag.

Overrides:
Source:
Parameters:
Name Type Description
tagName TagName

Tag name.

options object

Parameters that user can specify.

Name Type Attributes Default Description
page number <optional>
1

Page number.

Returns:
Type:
Promise.<TitleCollection>

A promise for the titles of given tag.

(async) todayInHistory(year, options) → {Promise.<TitleCollection>}

Fetch today in history.

Overrides:
Source:
Parameters:
Name Type Description
year string

Which year.

options object

Parameters that user can specify.

Name Type Attributes Default Description
page number <optional>
1

Page number.

Returns:
Type:
Promise.<TitleCollection>

A promise for the titles of today in history.

(async) untaggedTitles(options) → {Promise.<TitleCollection>}

Fetch untagged titles.

Overrides:
Source:
Parameters:
Name Type Description
options object

Parameters that user can specify.

Name Type Attributes Default Description
page number <optional>
1

Page number.

Returns:
Type:
Promise.<TitleCollection>

A promise for untagged titles.

(async) user(username) → {Promise.<User>}

Fetch user.

Overrides:
Source:
Parameters:
Name Type Description
username string

Username.

Returns:
Type:
Promise.<User>

A promise for the user.