class TikToker::Configuration

Defined in:

tiktoker/configuration.cr

Constant Summary

TIKTOK_HOST = "www.tiktok.com"
TIKTOK_PORTAL = "https://www.tiktok.com"

Instance Method Summary

Instance Method Detail

def connect_timeout : Int32 #

Timeout waiting for TikTok server connection to open in seconds.


[View source]
def connect_timeout=(connect_timeout : Int32) #

Timeout waiting for TikTok server connection to open in seconds.


[View source]
def did : String #

TikTok device id. Keep in mind that this token is supposed to be long-lived and consistent between requests.

TikToker::Util.generate_did # => 3745502480601580487

[View source]
def did=(did : String) #

TikTok device id. Keep in mind that this token is supposed to be long-lived and consistent between requests.

TikToker::Util.generate_did # => 3745502480601580487

[View source]
def fast_update : Bool #

Stop when encountering the first already-downloaded video. This flag is recommended when you use TikToker to update your personal archive.


[View source]
def fast_update=(fast_update : Bool) #

Stop when encountering the first already-downloaded video. This flag is recommended when you use TikToker to update your personal archive.


[View source]
def internal_user_agent : String #

User agent used by TikToker when there is no need to disguise itself, e.g. in requests with an external signature server.


[View source]
def internal_user_agent=(internal_user_agent : String) #

User agent used by TikToker when there is no need to disguise itself, e.g. in requests with an external signature server.


[View source]
def proxy_host : String? #

Proxy host.

config.proxy_host = "localhost"

[View source]
def proxy_host=(proxy_host : String?) #

Proxy host.

config.proxy_host = "localhost"

[View source]
def proxy_pass : String? #

Proxy password.

config.proxy_user = "password"

[View source]
def proxy_pass=(proxy_pass : String?) #

Proxy password.

config.proxy_user = "password"

[View source]
def proxy_port : Int32? #

Proxy port.

config.proxy_port = 8080

[View source]
def proxy_port=(proxy_port : Int32?) #

Proxy port.

config.proxy_port = 8080

[View source]
def proxy_user : String? #

Proxy username.

config.proxy_user = "username"

[View source]
def proxy_user=(proxy_user : String?) #

Proxy username.

config.proxy_user = "username"

[View source]
def quiet : Bool #

Do not produce any output. This makes TikToker suitable as a cron job.


[View source]
def quiet=(bool : Bool) #

Changes the log severity to Log::Severity::Error if set to true.

config.quiet = true

[View source]
def read_timeout : Int32 #

Timeout when waiting for TikTok server to return data.


[View source]
def read_timeout=(read_timeout : Int32) #

Timeout when waiting for TikTok server to return data.


[View source]
def retry_attempts : Int32 #

Maximum number of retry attempts until a request is aborted. When using TikTok as a library, you might want to set it to zero.


[View source]
def retry_attempts=(retry_attempts : Int32) #

Maximum number of retry attempts until a request is aborted. When using TikTok as a library, you might want to set it to zero.


[View source]
def session_id : String? #

Used to authenticate with TikTok API. Useful to browse and download private profiles.


[View source]
def session_id=(session_id : String?) #

Used to authenticate with TikTok API. Useful to browse and download private profiles.


[View source]
def signature_server_timeout : Int32 #

Seconds to wait before timing out a connection request with an external signature server.


[View source]
def signature_server_timeout=(signature_server_timeout : Int32) #

Seconds to wait before timing out a connection request with an external signature server.


[View source]
def signature_server_url : String #

External signature server used to sign TikTok API requests. By default, the signature server is expected to be listening locally port 3000.


[View source]
def signature_server_url=(signature_server_url : String) #

External signature server used to sign TikTok API requests. By default, the signature server is expected to be listening locally port 3000.


[View source]
def tiktok_host : String #

TikTok API host.


[View source]
def tiktok_host=(tiktok_host : String) #

TikTok API host.


[View source]
def tiktok_portal : String #

TikTok portal URL.


[View source]
def tiktok_portal=(tiktok_portal : String) #

TikTok portal URL.


[View source]
def verbose : Bool #

Print debug information for each operation.


[View source]
def verbose=(verbose : Bool) #

Print debug information for each operation.


[View source]
def with(&) : Nil #

Configuration for TikToker.

config = TikToker::Configuration.new
config.with do |config|
  config.signature_server_url = "https://signature.server"
end

[View source]
def write_timeout : Int32 #

Timeout when waiting for TikTok server to receive data.


[View source]
def write_timeout=(write_timeout : Int32) #

Timeout when waiting for TikTok server to receive data.


[View source]