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
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.4.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
31 32 33 |
# File 'lib/tiktok/open/sdk.rb', line 31 def config @config end |
Class Method Details
.client_auth ⇒ OpenApi::Auth::Client
Convenience accessor for client authentication functionality
77 78 79 |
# File 'lib/tiktok/open/sdk.rb', line 77 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.
51 52 53 54 55 56 57 58 59 |
# File 'lib/tiktok/open/sdk.rb', line 51 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
87 88 89 |
# File 'lib/tiktok/open/sdk.rb', line 87 def post OpenApi::Post::Publish end |
.user ⇒ OpenApi::User
Convenience accessor for user functionality
97 98 99 |
# File 'lib/tiktok/open/sdk.rb', line 97 def user OpenApi::User end |
.user_auth ⇒ OpenApi::Auth::User
Convenience accessor for user authentication functionality
67 68 69 |
# File 'lib/tiktok/open/sdk.rb', line 67 def user_auth OpenApi::Auth::User end |