Module: Tiktok::Open::Sdk
- Defined in:
- lib/tiktok/open/sdk.rb,
lib/tiktok/open/sdk/config.rb,
lib/tiktok/open/sdk/version.rb,
lib/tiktok/open/sdk/http_client.rb,
lib/tiktok/open/sdk/open_api/user.rb,
lib/tiktok/open/sdk/open_api/auth/user.rb,
lib/tiktok/open/sdk/helpers/auth_helper.rb,
lib/tiktok/open/sdk/open_api/auth/client.rb,
lib/tiktok/open/sdk/open_api/post/publish.rb,
lib/tiktok/open/sdk/helpers/response_helper.rb,
lib/tiktok/open/sdk/helpers/string_utils_helper.rb,
lib/tiktok/open/sdk/helpers/validators/token_validator.rb,
lib/tiktok/open/sdk/helpers/validators/post_info_validator.rb,
lib/tiktok/open/sdk/helpers/validators/source_info_validator.rb,
lib/tiktok/open/sdk/helpers/validators/post_publish_validator.rb
Overview
Main SDK module providing configuration and error handling
Defined Under Namespace
Modules: Helpers, HttpClient, OpenApi Classes: Config, Error, RequestValidationError
Constant Summary collapse
- VERSION =
'0.5.0'
Class Attribute Summary collapse
-
.config ⇒ Config?
SDK configuration object.
Class Method Summary collapse
-
.client_auth ⇒ OpenApi::Auth::Client
Convenience accessor for client authentication functionality.
-
.configure {|config| ... } ⇒ Config
Configures the TikTok Open SDK.
-
.post ⇒ OpenApi::Post::Publish
Convenience accessor for post publish functionality.
-
.user ⇒ OpenApi::User
Convenience accessor for user functionality.
-
.user_auth ⇒ OpenApi::Auth::User
Convenience accessor for user authentication functionality.
Class Attribute Details
.config ⇒ Config?
SDK configuration object
56 57 58 |
# File 'lib/tiktok/open/sdk.rb', line 56 def config @config end |
Class Method Details
.client_auth ⇒ OpenApi::Auth::Client
Convenience accessor for client authentication functionality
102 103 104 |
# File 'lib/tiktok/open/sdk.rb', line 102 def client_auth OpenApi::Auth::Client end |
.configure {|config| ... } ⇒ Config
Configures the TikTok Open SDK.
This method yields the configuration object, allowing you to set client credentials and other options.
76 77 78 79 80 81 82 83 84 |
# File 'lib/tiktok/open/sdk.rb', line 76 def configure self.config ||= Config.new yield(config) load_omniauth! if config.load_omniauth config end |
.post ⇒ OpenApi::Post::Publish
Convenience accessor for post publish functionality
112 113 114 |
# File 'lib/tiktok/open/sdk.rb', line 112 def post OpenApi::Post::Publish end |
.user ⇒ OpenApi::User
Convenience accessor for user functionality
122 123 124 |
# File 'lib/tiktok/open/sdk.rb', line 122 def user OpenApi::User end |
.user_auth ⇒ OpenApi::Auth::User
Convenience accessor for user authentication functionality
92 93 94 |
# File 'lib/tiktok/open/sdk.rb', line 92 def user_auth OpenApi::Auth::User end |