post-for-me 0.1.0.pre.alpha.4 → 0.1.0.pre.alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/README.md +11 -9
- data/lib/post_for_me/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/post_for_me/internal/type/base_model.rb +1 -8
- data/lib/post_for_me/internal/util.rb +1 -1
- data/lib/post_for_me/models/bluesky_configuration_dto.rb +24 -0
- data/lib/post_for_me/models/create_social_post.rb +25 -373
- data/lib/post_for_me/models/facebook_configuration_dto.rb +46 -0
- data/lib/post_for_me/models/instagram_configuration_dto.rb +54 -0
- data/lib/post_for_me/models/linkedin_configuration_dto.rb +24 -0
- data/lib/post_for_me/models/pinterest_configuration_dto.rb +40 -0
- data/lib/post_for_me/models/platform_configurations_dto.rb +88 -0
- data/lib/post_for_me/models/social_account.rb +1 -1
- data/lib/post_for_me/models/social_account_create_auth_url_params.rb +10 -4
- data/lib/post_for_me/models/social_account_create_params.rb +105 -0
- data/lib/post_for_me/models/social_post.rb +197 -12
- data/lib/post_for_me/models/social_post_list_params.rb +1 -4
- data/lib/post_for_me/models/threads_configuration_dto.rb +45 -0
- data/lib/post_for_me/models/tiktok_configuration.rb +13 -1
- data/lib/post_for_me/models/twitter_configuration_dto.rb +24 -0
- data/lib/post_for_me/models/youtube_configuration_dto.rb +32 -0
- data/lib/post_for_me/models.rb +20 -0
- data/lib/post_for_me/resources/social_accounts.rb +42 -1
- data/lib/post_for_me/resources/social_posts.rb +2 -2
- data/lib/post_for_me/version.rb +1 -1
- data/lib/post_for_me.rb +10 -0
- data/rbi/post_for_me/errors.rbi +2 -2
- data/rbi/post_for_me/models/bluesky_configuration_dto.rbi +45 -0
- data/rbi/post_for_me/models/create_social_post.rbi +22 -863
- data/rbi/post_for_me/models/facebook_configuration_dto.rbi +101 -0
- data/rbi/post_for_me/models/instagram_configuration_dto.rbi +109 -0
- data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +45 -0
- data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +64 -0
- data/rbi/post_for_me/models/platform_configurations_dto.rbi +178 -0
- data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +11 -0
- data/rbi/post_for_me/models/social_account_create_params.rbi +185 -0
- data/rbi/post_for_me/models/social_post.rbi +328 -13
- data/rbi/post_for_me/models/threads_configuration_dto.rbi +94 -0
- data/rbi/post_for_me/models/tiktok_configuration.rbi +10 -0
- data/rbi/post_for_me/models/twitter_configuration_dto.rbi +45 -0
- data/rbi/post_for_me/models/youtube_configuration_dto.rbi +56 -0
- data/rbi/post_for_me/models.rbi +20 -0
- data/rbi/post_for_me/resources/social_accounts.rbi +42 -0
- data/rbi/post_for_me/resources/social_posts.rbi +2 -6
- data/sig/post_for_me/models/bluesky_configuration_dto.rbs +15 -0
- data/sig/post_for_me/models/create_social_post.rbs +14 -278
- data/sig/post_for_me/models/facebook_configuration_dto.rbs +42 -0
- data/sig/post_for_me/models/instagram_configuration_dto.rbs +47 -0
- data/sig/post_for_me/models/linkedin_configuration_dto.rbs +15 -0
- data/sig/post_for_me/models/pinterest_configuration_dto.rbs +35 -0
- data/sig/post_for_me/models/platform_configurations_dto.rbs +65 -0
- data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +7 -0
- data/sig/post_for_me/models/social_account_create_params.rbs +97 -0
- data/sig/post_for_me/models/social_post.rbs +155 -16
- data/sig/post_for_me/models/threads_configuration_dto.rbs +41 -0
- data/sig/post_for_me/models/tiktok_configuration.rbs +5 -0
- data/sig/post_for_me/models/twitter_configuration_dto.rbs +15 -0
- data/sig/post_for_me/models/youtube_configuration_dto.rbs +22 -0
- data/sig/post_for_me/models.rbs +20 -0
- data/sig/post_for_me/resources/social_accounts.rbs +14 -0
- data/sig/post_for_me/resources/social_posts.rbs +2 -2
- metadata +32 -2
|
@@ -45,6 +45,13 @@ module PostForMe
|
|
|
45
45
|
# @return [Boolean, nil]
|
|
46
46
|
optional :is_ai_generated, PostForMe::Internal::Type::Boolean, nil?: true
|
|
47
47
|
|
|
48
|
+
# @!attribute is_draft
|
|
49
|
+
# Will create a draft upload to TikTok, posting will need to be completed from
|
|
50
|
+
# within the app
|
|
51
|
+
#
|
|
52
|
+
# @return [Boolean, nil]
|
|
53
|
+
optional :is_draft, PostForMe::Internal::Type::Boolean, nil?: true
|
|
54
|
+
|
|
48
55
|
# @!attribute media
|
|
49
56
|
# Overrides the `media` from the post
|
|
50
57
|
#
|
|
@@ -63,7 +70,10 @@ module PostForMe
|
|
|
63
70
|
# @return [String, nil]
|
|
64
71
|
optional :title, String, nil?: true
|
|
65
72
|
|
|
66
|
-
# @!method initialize(allow_comment: nil, allow_duet: nil, allow_stitch: nil, caption: nil, disclose_branded_content: nil, disclose_your_brand: nil, is_ai_generated: nil, media: nil, privacy_status: nil, title: nil)
|
|
73
|
+
# @!method initialize(allow_comment: nil, allow_duet: nil, allow_stitch: nil, caption: nil, disclose_branded_content: nil, disclose_your_brand: nil, is_ai_generated: nil, is_draft: nil, media: nil, privacy_status: nil, title: nil)
|
|
74
|
+
# Some parameter documentations has been truncated, see
|
|
75
|
+
# {PostForMe::Models::TiktokConfiguration} for more details.
|
|
76
|
+
#
|
|
67
77
|
# @param allow_comment [Boolean, nil] Allow comments on TikTok
|
|
68
78
|
#
|
|
69
79
|
# @param allow_duet [Boolean, nil] Allow duets on TikTok
|
|
@@ -78,6 +88,8 @@ module PostForMe
|
|
|
78
88
|
#
|
|
79
89
|
# @param is_ai_generated [Boolean, nil] Flag content as AI generated on TikTok
|
|
80
90
|
#
|
|
91
|
+
# @param is_draft [Boolean, nil] Will create a draft upload to TikTok, posting will need to be completed from wit
|
|
92
|
+
#
|
|
81
93
|
# @param media [Array<String>, nil] Overrides the `media` from the post
|
|
82
94
|
#
|
|
83
95
|
# @param privacy_status [String, nil] Sets the privacy status for TikTok (private, public)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
class TwitterConfigurationDto < PostForMe::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute caption
|
|
7
|
+
# Overrides the `caption` from the post
|
|
8
|
+
#
|
|
9
|
+
# @return [Object, nil]
|
|
10
|
+
optional :caption, PostForMe::Internal::Type::Unknown, nil?: true
|
|
11
|
+
|
|
12
|
+
# @!attribute media
|
|
13
|
+
# Overrides the `media` from the post
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<String>, nil]
|
|
16
|
+
optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
|
|
17
|
+
|
|
18
|
+
# @!method initialize(caption: nil, media: nil)
|
|
19
|
+
# @param caption [Object, nil] Overrides the `caption` from the post
|
|
20
|
+
#
|
|
21
|
+
# @param media [Array<String>, nil] Overrides the `media` from the post
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
class YoutubeConfigurationDto < PostForMe::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute caption
|
|
7
|
+
# Overrides the `caption` from the post
|
|
8
|
+
#
|
|
9
|
+
# @return [Object, nil]
|
|
10
|
+
optional :caption, PostForMe::Internal::Type::Unknown, nil?: true
|
|
11
|
+
|
|
12
|
+
# @!attribute media
|
|
13
|
+
# Overrides the `media` from the post
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<String>, nil]
|
|
16
|
+
optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute title
|
|
19
|
+
# Overrides the `title` from the post
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :title, String, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!method initialize(caption: nil, media: nil, title: nil)
|
|
25
|
+
# @param caption [Object, nil] Overrides the `caption` from the post
|
|
26
|
+
#
|
|
27
|
+
# @param media [Array<String>, nil] Overrides the `media` from the post
|
|
28
|
+
#
|
|
29
|
+
# @param title [String, nil] Overrides the `title` from the post
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
data/lib/post_for_me/models.rb
CHANGED
|
@@ -39,14 +39,28 @@ module PostForMe
|
|
|
39
39
|
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
BlueskyConfigurationDto = PostForMe::Models::BlueskyConfigurationDto
|
|
43
|
+
|
|
42
44
|
CreateSocialPost = PostForMe::Models::CreateSocialPost
|
|
43
45
|
|
|
46
|
+
FacebookConfigurationDto = PostForMe::Models::FacebookConfigurationDto
|
|
47
|
+
|
|
48
|
+
InstagramConfigurationDto = PostForMe::Models::InstagramConfigurationDto
|
|
49
|
+
|
|
50
|
+
LinkedinConfigurationDto = PostForMe::Models::LinkedinConfigurationDto
|
|
51
|
+
|
|
44
52
|
MediaCreateUploadURLParams = PostForMe::Models::MediaCreateUploadURLParams
|
|
45
53
|
|
|
54
|
+
PinterestConfigurationDto = PostForMe::Models::PinterestConfigurationDto
|
|
55
|
+
|
|
56
|
+
PlatformConfigurationsDto = PostForMe::Models::PlatformConfigurationsDto
|
|
57
|
+
|
|
46
58
|
SocialAccount = PostForMe::Models::SocialAccount
|
|
47
59
|
|
|
48
60
|
SocialAccountCreateAuthURLParams = PostForMe::Models::SocialAccountCreateAuthURLParams
|
|
49
61
|
|
|
62
|
+
SocialAccountCreateParams = PostForMe::Models::SocialAccountCreateParams
|
|
63
|
+
|
|
50
64
|
SocialAccountDisconnectParams = PostForMe::Models::SocialAccountDisconnectParams
|
|
51
65
|
|
|
52
66
|
SocialAccountListParams = PostForMe::Models::SocialAccountListParams
|
|
@@ -73,5 +87,11 @@ module PostForMe
|
|
|
73
87
|
|
|
74
88
|
SocialPostUpdateParams = PostForMe::Models::SocialPostUpdateParams
|
|
75
89
|
|
|
90
|
+
ThreadsConfigurationDto = PostForMe::Models::ThreadsConfigurationDto
|
|
91
|
+
|
|
76
92
|
TiktokConfiguration = PostForMe::Models::TiktokConfiguration
|
|
93
|
+
|
|
94
|
+
TwitterConfigurationDto = PostForMe::Models::TwitterConfigurationDto
|
|
95
|
+
|
|
96
|
+
YoutubeConfigurationDto = PostForMe::Models::YoutubeConfigurationDto
|
|
77
97
|
end
|
|
@@ -3,6 +3,45 @@
|
|
|
3
3
|
module PostForMe
|
|
4
4
|
module Resources
|
|
5
5
|
class SocialAccounts
|
|
6
|
+
# If a social account with the same platform and user_id already exists, it will
|
|
7
|
+
# be updated. If not, a new social account will be created.
|
|
8
|
+
#
|
|
9
|
+
# @overload create(access_token:, access_token_expires_at:, platform:, user_id:, external_id: nil, metadata: nil, refresh_token: nil, refresh_token_expires_at: nil, username: nil, request_options: {})
|
|
10
|
+
#
|
|
11
|
+
# @param access_token [String] The access token of the social account
|
|
12
|
+
#
|
|
13
|
+
# @param access_token_expires_at [Time] The access token expiration date of the social account
|
|
14
|
+
#
|
|
15
|
+
# @param platform [Symbol, PostForMe::Models::SocialAccountCreateParams::Platform] The platform of the social account
|
|
16
|
+
#
|
|
17
|
+
# @param user_id [String] The user id of the social account
|
|
18
|
+
#
|
|
19
|
+
# @param external_id [String, nil] The external id of the social account
|
|
20
|
+
#
|
|
21
|
+
# @param metadata [Object] The metadata of the social account
|
|
22
|
+
#
|
|
23
|
+
# @param refresh_token [String, nil] The refresh token of the social account
|
|
24
|
+
#
|
|
25
|
+
# @param refresh_token_expires_at [Time, nil] The refresh token expiration date of the social account
|
|
26
|
+
#
|
|
27
|
+
# @param username [String, nil] The platform's username of the social account
|
|
28
|
+
#
|
|
29
|
+
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
30
|
+
#
|
|
31
|
+
# @return [PostForMe::Models::SocialAccount]
|
|
32
|
+
#
|
|
33
|
+
# @see PostForMe::Models::SocialAccountCreateParams
|
|
34
|
+
def create(params)
|
|
35
|
+
parsed, options = PostForMe::SocialAccountCreateParams.dump_request(params)
|
|
36
|
+
@client.request(
|
|
37
|
+
method: :post,
|
|
38
|
+
path: "v1/social-accounts",
|
|
39
|
+
body: parsed,
|
|
40
|
+
model: PostForMe::SocialAccount,
|
|
41
|
+
options: options
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
6
45
|
# Get social account by ID
|
|
7
46
|
#
|
|
8
47
|
# @overload retrieve(id, request_options: {})
|
|
@@ -89,10 +128,12 @@ module PostForMe
|
|
|
89
128
|
# login/authorization page. Upon successful authentication, they are redirected
|
|
90
129
|
# back to your application
|
|
91
130
|
#
|
|
92
|
-
# @overload create_auth_url(platform:, platform_data: nil, request_options: {})
|
|
131
|
+
# @overload create_auth_url(platform:, external_id: nil, platform_data: nil, request_options: {})
|
|
93
132
|
#
|
|
94
133
|
# @param platform [String] The social account provider
|
|
95
134
|
#
|
|
135
|
+
# @param external_id [String] Your unique identifier for the social account
|
|
136
|
+
#
|
|
96
137
|
# @param platform_data [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData] Additional data needed for the provider
|
|
97
138
|
#
|
|
98
139
|
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -22,7 +22,7 @@ module PostForMe
|
|
|
22
22
|
#
|
|
23
23
|
# @param media [Array<PostForMe::Models::CreateSocialPost::Media>, nil] Array of media URLs associated with the post
|
|
24
24
|
#
|
|
25
|
-
# @param platform_configurations [PostForMe::Models::
|
|
25
|
+
# @param platform_configurations [PostForMe::Models::PlatformConfigurationsDto, nil] Platform-specific configurations for the post
|
|
26
26
|
#
|
|
27
27
|
# @param scheduled_at [Time, nil] Scheduled date and time for the post, setting to null or undefined will post ins
|
|
28
28
|
#
|
|
@@ -83,7 +83,7 @@ module PostForMe
|
|
|
83
83
|
#
|
|
84
84
|
# @param media [Array<PostForMe::Models::CreateSocialPost::Media>, nil] Array of media URLs associated with the post
|
|
85
85
|
#
|
|
86
|
-
# @param platform_configurations [PostForMe::Models::
|
|
86
|
+
# @param platform_configurations [PostForMe::Models::PlatformConfigurationsDto, nil] Platform-specific configurations for the post
|
|
87
87
|
#
|
|
88
88
|
# @param scheduled_at [Time, nil] Scheduled date and time for the post, setting to null or undefined will post ins
|
|
89
89
|
#
|
data/lib/post_for_me/version.rb
CHANGED
data/lib/post_for_me.rb
CHANGED
|
@@ -51,11 +51,18 @@ require_relative "post_for_me/internal/transport/base_client"
|
|
|
51
51
|
require_relative "post_for_me/internal/transport/pooled_net_requester"
|
|
52
52
|
require_relative "post_for_me/client"
|
|
53
53
|
require_relative "post_for_me/models/create_social_post"
|
|
54
|
+
require_relative "post_for_me/models/bluesky_configuration_dto"
|
|
55
|
+
require_relative "post_for_me/models/facebook_configuration_dto"
|
|
56
|
+
require_relative "post_for_me/models/instagram_configuration_dto"
|
|
57
|
+
require_relative "post_for_me/models/linkedin_configuration_dto"
|
|
54
58
|
require_relative "post_for_me/models/media_create_upload_url_params"
|
|
55
59
|
require_relative "post_for_me/models/media_create_upload_url_response"
|
|
60
|
+
require_relative "post_for_me/models/pinterest_configuration_dto"
|
|
61
|
+
require_relative "post_for_me/models/platform_configurations_dto"
|
|
56
62
|
require_relative "post_for_me/models/social_account"
|
|
57
63
|
require_relative "post_for_me/models/social_account_create_auth_url_params"
|
|
58
64
|
require_relative "post_for_me/models/social_account_create_auth_url_response"
|
|
65
|
+
require_relative "post_for_me/models/social_account_create_params"
|
|
59
66
|
require_relative "post_for_me/models/social_account_disconnect_params"
|
|
60
67
|
require_relative "post_for_me/models/social_account_disconnect_response"
|
|
61
68
|
require_relative "post_for_me/models/social_account_list_params"
|
|
@@ -74,7 +81,10 @@ require_relative "post_for_me/models/social_post_result_list_response"
|
|
|
74
81
|
require_relative "post_for_me/models/social_post_result_retrieve_params"
|
|
75
82
|
require_relative "post_for_me/models/social_post_retrieve_params"
|
|
76
83
|
require_relative "post_for_me/models/social_post_update_params"
|
|
84
|
+
require_relative "post_for_me/models/threads_configuration_dto"
|
|
77
85
|
require_relative "post_for_me/models/tiktok_configuration"
|
|
86
|
+
require_relative "post_for_me/models/twitter_configuration_dto"
|
|
87
|
+
require_relative "post_for_me/models/youtube_configuration_dto"
|
|
78
88
|
require_relative "post_for_me/models"
|
|
79
89
|
require_relative "post_for_me/resources/media"
|
|
80
90
|
require_relative "post_for_me/resources/social_accounts"
|
data/rbi/post_for_me/errors.rbi
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
class BlueskyConfigurationDto < PostForMe::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
PostForMe::BlueskyConfigurationDto,
|
|
10
|
+
PostForMe::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Overrides the `caption` from the post
|
|
15
|
+
sig { returns(T.nilable(T.anything)) }
|
|
16
|
+
attr_accessor :caption
|
|
17
|
+
|
|
18
|
+
# Overrides the `media` from the post
|
|
19
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
20
|
+
attr_accessor :media
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
caption: T.nilable(T.anything),
|
|
25
|
+
media: T.nilable(T::Array[String])
|
|
26
|
+
).returns(T.attached_class)
|
|
27
|
+
end
|
|
28
|
+
def self.new(
|
|
29
|
+
# Overrides the `caption` from the post
|
|
30
|
+
caption: nil,
|
|
31
|
+
# Overrides the `media` from the post
|
|
32
|
+
media: nil
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
override.returns(
|
|
38
|
+
{ caption: T.nilable(T.anything), media: T.nilable(T::Array[String]) }
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
def to_hash
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|