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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +11 -9
  4. data/lib/post_for_me/internal/transport/pooled_net_requester.rb +1 -9
  5. data/lib/post_for_me/internal/type/base_model.rb +1 -8
  6. data/lib/post_for_me/internal/util.rb +1 -1
  7. data/lib/post_for_me/models/bluesky_configuration_dto.rb +24 -0
  8. data/lib/post_for_me/models/create_social_post.rb +25 -373
  9. data/lib/post_for_me/models/facebook_configuration_dto.rb +46 -0
  10. data/lib/post_for_me/models/instagram_configuration_dto.rb +54 -0
  11. data/lib/post_for_me/models/linkedin_configuration_dto.rb +24 -0
  12. data/lib/post_for_me/models/pinterest_configuration_dto.rb +40 -0
  13. data/lib/post_for_me/models/platform_configurations_dto.rb +88 -0
  14. data/lib/post_for_me/models/social_account.rb +1 -1
  15. data/lib/post_for_me/models/social_account_create_auth_url_params.rb +10 -4
  16. data/lib/post_for_me/models/social_account_create_params.rb +105 -0
  17. data/lib/post_for_me/models/social_post.rb +197 -12
  18. data/lib/post_for_me/models/social_post_list_params.rb +1 -4
  19. data/lib/post_for_me/models/threads_configuration_dto.rb +45 -0
  20. data/lib/post_for_me/models/tiktok_configuration.rb +13 -1
  21. data/lib/post_for_me/models/twitter_configuration_dto.rb +24 -0
  22. data/lib/post_for_me/models/youtube_configuration_dto.rb +32 -0
  23. data/lib/post_for_me/models.rb +20 -0
  24. data/lib/post_for_me/resources/social_accounts.rb +42 -1
  25. data/lib/post_for_me/resources/social_posts.rb +2 -2
  26. data/lib/post_for_me/version.rb +1 -1
  27. data/lib/post_for_me.rb +10 -0
  28. data/rbi/post_for_me/errors.rbi +2 -2
  29. data/rbi/post_for_me/models/bluesky_configuration_dto.rbi +45 -0
  30. data/rbi/post_for_me/models/create_social_post.rbi +22 -863
  31. data/rbi/post_for_me/models/facebook_configuration_dto.rbi +101 -0
  32. data/rbi/post_for_me/models/instagram_configuration_dto.rbi +109 -0
  33. data/rbi/post_for_me/models/linkedin_configuration_dto.rbi +45 -0
  34. data/rbi/post_for_me/models/pinterest_configuration_dto.rbi +64 -0
  35. data/rbi/post_for_me/models/platform_configurations_dto.rbi +178 -0
  36. data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +11 -0
  37. data/rbi/post_for_me/models/social_account_create_params.rbi +185 -0
  38. data/rbi/post_for_me/models/social_post.rbi +328 -13
  39. data/rbi/post_for_me/models/threads_configuration_dto.rbi +94 -0
  40. data/rbi/post_for_me/models/tiktok_configuration.rbi +10 -0
  41. data/rbi/post_for_me/models/twitter_configuration_dto.rbi +45 -0
  42. data/rbi/post_for_me/models/youtube_configuration_dto.rbi +56 -0
  43. data/rbi/post_for_me/models.rbi +20 -0
  44. data/rbi/post_for_me/resources/social_accounts.rbi +42 -0
  45. data/rbi/post_for_me/resources/social_posts.rbi +2 -6
  46. data/sig/post_for_me/models/bluesky_configuration_dto.rbs +15 -0
  47. data/sig/post_for_me/models/create_social_post.rbs +14 -278
  48. data/sig/post_for_me/models/facebook_configuration_dto.rbs +42 -0
  49. data/sig/post_for_me/models/instagram_configuration_dto.rbs +47 -0
  50. data/sig/post_for_me/models/linkedin_configuration_dto.rbs +15 -0
  51. data/sig/post_for_me/models/pinterest_configuration_dto.rbs +35 -0
  52. data/sig/post_for_me/models/platform_configurations_dto.rbs +65 -0
  53. data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +7 -0
  54. data/sig/post_for_me/models/social_account_create_params.rbs +97 -0
  55. data/sig/post_for_me/models/social_post.rbs +155 -16
  56. data/sig/post_for_me/models/threads_configuration_dto.rbs +41 -0
  57. data/sig/post_for_me/models/tiktok_configuration.rbs +5 -0
  58. data/sig/post_for_me/models/twitter_configuration_dto.rbs +15 -0
  59. data/sig/post_for_me/models/youtube_configuration_dto.rbs +22 -0
  60. data/sig/post_for_me/models.rbs +20 -0
  61. data/sig/post_for_me/resources/social_accounts.rbs +14 -0
  62. data/sig/post_for_me/resources/social_posts.rbs +2 -2
  63. metadata +32 -2
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PostForMe
4
+ module Models
5
+ class InstagramConfigurationDto < 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 collaborators
13
+ # Instagram usernames to be tagged as a collaborator
14
+ #
15
+ # @return [Array<String>, nil]
16
+ optional :collaborators, PostForMe::Internal::Type::ArrayOf[String], nil?: true
17
+
18
+ # @!attribute media
19
+ # Overrides the `media` from the post
20
+ #
21
+ # @return [Array<String>, nil]
22
+ optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
23
+
24
+ # @!attribute placement
25
+ # Instagram post placement
26
+ #
27
+ # @return [Symbol, PostForMe::Models::InstagramConfigurationDto::Placement, nil]
28
+ optional :placement, enum: -> { PostForMe::InstagramConfigurationDto::Placement }, nil?: true
29
+
30
+ # @!method initialize(caption: nil, collaborators: nil, media: nil, placement: nil)
31
+ # @param caption [Object, nil] Overrides the `caption` from the post
32
+ #
33
+ # @param collaborators [Array<String>, nil] Instagram usernames to be tagged as a collaborator
34
+ #
35
+ # @param media [Array<String>, nil] Overrides the `media` from the post
36
+ #
37
+ # @param placement [Symbol, PostForMe::Models::InstagramConfigurationDto::Placement, nil] Instagram post placement
38
+
39
+ # Instagram post placement
40
+ #
41
+ # @see PostForMe::Models::InstagramConfigurationDto#placement
42
+ module Placement
43
+ extend PostForMe::Internal::Type::Enum
44
+
45
+ REELS = :reels
46
+ STORIES = :stories
47
+ TIMELINE = :timeline
48
+
49
+ # @!method self.values
50
+ # @return [Array<Symbol>]
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PostForMe
4
+ module Models
5
+ class LinkedinConfigurationDto < 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,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PostForMe
4
+ module Models
5
+ class PinterestConfigurationDto < PostForMe::Internal::Type::BaseModel
6
+ # @!attribute board_ids
7
+ # Pinterest board IDs
8
+ #
9
+ # @return [Array<String>, nil]
10
+ optional :board_ids, PostForMe::Internal::Type::ArrayOf[String], nil?: true
11
+
12
+ # @!attribute caption
13
+ # Overrides the `caption` from the post
14
+ #
15
+ # @return [Object, nil]
16
+ optional :caption, PostForMe::Internal::Type::Unknown, nil?: true
17
+
18
+ # @!attribute link
19
+ # Pinterest post link
20
+ #
21
+ # @return [String, nil]
22
+ optional :link, String, nil?: true
23
+
24
+ # @!attribute media
25
+ # Overrides the `media` from the post
26
+ #
27
+ # @return [Array<String>, nil]
28
+ optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
29
+
30
+ # @!method initialize(board_ids: nil, caption: nil, link: nil, media: nil)
31
+ # @param board_ids [Array<String>, nil] Pinterest board IDs
32
+ #
33
+ # @param caption [Object, nil] Overrides the `caption` from the post
34
+ #
35
+ # @param link [String, nil] Pinterest post link
36
+ #
37
+ # @param media [Array<String>, nil] Overrides the `media` from the post
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PostForMe
4
+ module Models
5
+ class PlatformConfigurationsDto < PostForMe::Internal::Type::BaseModel
6
+ # @!attribute bluesky
7
+ # Bluesky configuration
8
+ #
9
+ # @return [PostForMe::Models::BlueskyConfigurationDto, nil]
10
+ optional :bluesky, -> { PostForMe::BlueskyConfigurationDto }, nil?: true
11
+
12
+ # @!attribute facebook
13
+ # Facebook configuration
14
+ #
15
+ # @return [PostForMe::Models::FacebookConfigurationDto, nil]
16
+ optional :facebook, -> { PostForMe::FacebookConfigurationDto }, nil?: true
17
+
18
+ # @!attribute instagram
19
+ # Instagram configuration
20
+ #
21
+ # @return [PostForMe::Models::InstagramConfigurationDto, nil]
22
+ optional :instagram, -> { PostForMe::InstagramConfigurationDto }, nil?: true
23
+
24
+ # @!attribute linkedin
25
+ # LinkedIn configuration
26
+ #
27
+ # @return [PostForMe::Models::LinkedinConfigurationDto, nil]
28
+ optional :linkedin, -> { PostForMe::LinkedinConfigurationDto }, nil?: true
29
+
30
+ # @!attribute pinterest
31
+ # Pinterest configuration
32
+ #
33
+ # @return [PostForMe::Models::PinterestConfigurationDto, nil]
34
+ optional :pinterest, -> { PostForMe::PinterestConfigurationDto }, nil?: true
35
+
36
+ # @!attribute threads
37
+ # Threads configuration
38
+ #
39
+ # @return [PostForMe::Models::ThreadsConfigurationDto, nil]
40
+ optional :threads, -> { PostForMe::ThreadsConfigurationDto }, nil?: true
41
+
42
+ # @!attribute tiktok
43
+ # TikTok configuration
44
+ #
45
+ # @return [PostForMe::Models::TiktokConfiguration, nil]
46
+ optional :tiktok, -> { PostForMe::TiktokConfiguration }, nil?: true
47
+
48
+ # @!attribute tiktok_business
49
+ # TikTok configuration
50
+ #
51
+ # @return [PostForMe::Models::TiktokConfiguration, nil]
52
+ optional :tiktok_business, -> { PostForMe::TiktokConfiguration }, nil?: true
53
+
54
+ # @!attribute x
55
+ # Twitter configuration
56
+ #
57
+ # @return [PostForMe::Models::TwitterConfigurationDto, nil]
58
+ optional :x, -> { PostForMe::TwitterConfigurationDto }, nil?: true
59
+
60
+ # @!attribute youtube
61
+ # YouTube configuration
62
+ #
63
+ # @return [PostForMe::Models::YoutubeConfigurationDto, nil]
64
+ optional :youtube, -> { PostForMe::YoutubeConfigurationDto }, nil?: true
65
+
66
+ # @!method initialize(bluesky: nil, facebook: nil, instagram: nil, linkedin: nil, pinterest: nil, threads: nil, tiktok: nil, tiktok_business: nil, x: nil, youtube: nil)
67
+ # @param bluesky [PostForMe::Models::BlueskyConfigurationDto, nil] Bluesky configuration
68
+ #
69
+ # @param facebook [PostForMe::Models::FacebookConfigurationDto, nil] Facebook configuration
70
+ #
71
+ # @param instagram [PostForMe::Models::InstagramConfigurationDto, nil] Instagram configuration
72
+ #
73
+ # @param linkedin [PostForMe::Models::LinkedinConfigurationDto, nil] LinkedIn configuration
74
+ #
75
+ # @param pinterest [PostForMe::Models::PinterestConfigurationDto, nil] Pinterest configuration
76
+ #
77
+ # @param threads [PostForMe::Models::ThreadsConfigurationDto, nil] Threads configuration
78
+ #
79
+ # @param tiktok [PostForMe::Models::TiktokConfiguration, nil] TikTok configuration
80
+ #
81
+ # @param tiktok_business [PostForMe::Models::TiktokConfiguration, nil] TikTok configuration
82
+ #
83
+ # @param x [PostForMe::Models::TwitterConfigurationDto, nil] Twitter configuration
84
+ #
85
+ # @param youtube [PostForMe::Models::YoutubeConfigurationDto, nil] YouTube configuration
86
+ end
87
+ end
88
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module PostForMe
4
4
  module Models
5
- # @see PostForMe::Resources::SocialAccounts#retrieve
5
+ # @see PostForMe::Resources::SocialAccounts#create
6
6
  class SocialAccount < PostForMe::Internal::Type::BaseModel
7
7
  # @!attribute id
8
8
  # The unique identifier of the social account
@@ -13,15 +13,23 @@ module PostForMe
13
13
  # @return [String]
14
14
  required :platform, String
15
15
 
16
+ # @!attribute external_id
17
+ # Your unique identifier for the social account
18
+ #
19
+ # @return [String, nil]
20
+ optional :external_id, String
21
+
16
22
  # @!attribute platform_data
17
23
  # Additional data needed for the provider
18
24
  #
19
25
  # @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData, nil]
20
26
  optional :platform_data, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData }
21
27
 
22
- # @!method initialize(platform:, platform_data: nil, request_options: {})
28
+ # @!method initialize(platform:, external_id: nil, platform_data: nil, request_options: {})
23
29
  # @param platform [String] The social account provider
24
30
  #
31
+ # @param external_id [String] Your unique identifier for the social account
32
+ #
25
33
  # @param platform_data [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData] Additional data needed for the provider
26
34
  #
27
35
  # @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
@@ -76,9 +84,7 @@ module PostForMe
76
84
  #
77
85
  # @return [Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType]
78
86
  required :connection_type,
79
- enum: -> {
80
- PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType
81
- }
87
+ enum: -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType }
82
88
 
83
89
  # @!method initialize(connection_type:)
84
90
  # Some parameter documentations has been truncated, see
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PostForMe
4
+ module Models
5
+ # @see PostForMe::Resources::SocialAccounts#create
6
+ class SocialAccountCreateParams < PostForMe::Internal::Type::BaseModel
7
+ extend PostForMe::Internal::Type::RequestParameters::Converter
8
+ include PostForMe::Internal::Type::RequestParameters
9
+
10
+ # @!attribute access_token
11
+ # The access token of the social account
12
+ #
13
+ # @return [String]
14
+ required :access_token, String
15
+
16
+ # @!attribute access_token_expires_at
17
+ # The access token expiration date of the social account
18
+ #
19
+ # @return [Time]
20
+ required :access_token_expires_at, Time
21
+
22
+ # @!attribute platform
23
+ # The platform of the social account
24
+ #
25
+ # @return [Symbol, PostForMe::Models::SocialAccountCreateParams::Platform]
26
+ required :platform, enum: -> { PostForMe::SocialAccountCreateParams::Platform }
27
+
28
+ # @!attribute user_id
29
+ # The user id of the social account
30
+ #
31
+ # @return [String]
32
+ required :user_id, String
33
+
34
+ # @!attribute external_id
35
+ # The external id of the social account
36
+ #
37
+ # @return [String, nil]
38
+ optional :external_id, String, nil?: true
39
+
40
+ # @!attribute metadata
41
+ # The metadata of the social account
42
+ #
43
+ # @return [Object, nil]
44
+ optional :metadata, PostForMe::Internal::Type::Unknown
45
+
46
+ # @!attribute refresh_token
47
+ # The refresh token of the social account
48
+ #
49
+ # @return [String, nil]
50
+ optional :refresh_token, String, nil?: true
51
+
52
+ # @!attribute refresh_token_expires_at
53
+ # The refresh token expiration date of the social account
54
+ #
55
+ # @return [Time, nil]
56
+ optional :refresh_token_expires_at, Time, nil?: true
57
+
58
+ # @!attribute username
59
+ # The platform's username of the social account
60
+ #
61
+ # @return [String, nil]
62
+ optional :username, String, nil?: true
63
+
64
+ # @!method initialize(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: {})
65
+ # @param access_token [String] The access token of the social account
66
+ #
67
+ # @param access_token_expires_at [Time] The access token expiration date of the social account
68
+ #
69
+ # @param platform [Symbol, PostForMe::Models::SocialAccountCreateParams::Platform] The platform of the social account
70
+ #
71
+ # @param user_id [String] The user id of the social account
72
+ #
73
+ # @param external_id [String, nil] The external id of the social account
74
+ #
75
+ # @param metadata [Object] The metadata of the social account
76
+ #
77
+ # @param refresh_token [String, nil] The refresh token of the social account
78
+ #
79
+ # @param refresh_token_expires_at [Time, nil] The refresh token expiration date of the social account
80
+ #
81
+ # @param username [String, nil] The platform's username of the social account
82
+ #
83
+ # @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
84
+
85
+ # The platform of the social account
86
+ module Platform
87
+ extend PostForMe::Internal::Type::Enum
88
+
89
+ FACEBOOK = :facebook
90
+ INSTAGRAM = :instagram
91
+ X = :x
92
+ TIKTOK = :tiktok
93
+ YOUTUBE = :youtube
94
+ PINTEREST = :pinterest
95
+ LINKEDIN = :linkedin
96
+ BLUESKY = :bluesky
97
+ THREADS = :threads
98
+ TIKTOK_BUSINESS = :tiktok_business
99
+
100
+ # @!method self.values
101
+ # @return [Array<Symbol>]
102
+ end
103
+ end
104
+ end
105
+ end
@@ -13,9 +13,9 @@ module PostForMe
13
13
  # @!attribute account_configurations
14
14
  # Account-specific configurations for the post
15
15
  #
16
- # @return [Array<Object>, nil]
16
+ # @return [Array<PostForMe::Models::SocialPost::AccountConfiguration>, nil]
17
17
  required :account_configurations,
18
- PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown],
18
+ -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPost::AccountConfiguration] },
19
19
  nil?: true
20
20
 
21
21
  # @!attribute caption
@@ -39,14 +39,14 @@ module PostForMe
39
39
  # @!attribute media
40
40
  # Array of media URLs associated with the post
41
41
  #
42
- # @return [Object, nil]
43
- required :media, PostForMe::Internal::Type::Unknown, nil?: true
42
+ # @return [Array<PostForMe::Models::SocialPost::Media>, nil]
43
+ required :media, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPost::Media] }, nil?: true
44
44
 
45
45
  # @!attribute platform_configurations
46
46
  # Platform-specific configurations for the post
47
47
  #
48
- # @return [Object, nil]
49
- required :platform_configurations, PostForMe::Internal::Type::Unknown, nil?: true
48
+ # @return [PostForMe::Models::PlatformConfigurationsDto, nil]
49
+ required :platform_configurations, -> { PostForMe::PlatformConfigurationsDto }, nil?: true
50
50
 
51
51
  # @!attribute scheduled_at
52
52
  # Scheduled date and time for the post
@@ -57,8 +57,8 @@ module PostForMe
57
57
  # @!attribute social_accounts
58
58
  # Array of social account IDs for posting
59
59
  #
60
- # @return [Array<String>]
61
- required :social_accounts, PostForMe::Internal::Type::ArrayOf[String]
60
+ # @return [Array<PostForMe::Models::SocialAccount>]
61
+ required :social_accounts, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialAccount] }
62
62
 
63
63
  # @!attribute status
64
64
  # Current status of the post: draft, processed, scheduled, or processing
@@ -75,7 +75,7 @@ module PostForMe
75
75
  # @!method initialize(id:, account_configurations:, caption:, created_at:, external_id:, media:, platform_configurations:, scheduled_at:, social_accounts:, status:, updated_at:)
76
76
  # @param id [String] Unique identifier of the post
77
77
  #
78
- # @param account_configurations [Array<Object>, nil] Account-specific configurations for the post
78
+ # @param account_configurations [Array<PostForMe::Models::SocialPost::AccountConfiguration>, nil] Account-specific configurations for the post
79
79
  #
80
80
  # @param caption [String] Caption text for the post
81
81
  #
@@ -83,18 +83,203 @@ module PostForMe
83
83
  #
84
84
  # @param external_id [String, nil] Provided unique identifier of the post
85
85
  #
86
- # @param media [Object, nil] Array of media URLs associated with the post
86
+ # @param media [Array<PostForMe::Models::SocialPost::Media>, nil] Array of media URLs associated with the post
87
87
  #
88
- # @param platform_configurations [Object, nil] Platform-specific configurations for the post
88
+ # @param platform_configurations [PostForMe::Models::PlatformConfigurationsDto, nil] Platform-specific configurations for the post
89
89
  #
90
90
  # @param scheduled_at [String, nil] Scheduled date and time for the post
91
91
  #
92
- # @param social_accounts [Array<String>] Array of social account IDs for posting
92
+ # @param social_accounts [Array<PostForMe::Models::SocialAccount>] Array of social account IDs for posting
93
93
  #
94
94
  # @param status [Symbol, PostForMe::Models::SocialPost::Status] Current status of the post: draft, processed, scheduled, or processing
95
95
  #
96
96
  # @param updated_at [String] Timestamp when the post was last updated
97
97
 
98
+ class AccountConfiguration < PostForMe::Internal::Type::BaseModel
99
+ # @!attribute configuration
100
+ # Configuration for the social account
101
+ #
102
+ # @return [PostForMe::Models::SocialPost::AccountConfiguration::Configuration]
103
+ required :configuration, -> { PostForMe::SocialPost::AccountConfiguration::Configuration }
104
+
105
+ # @!attribute social_account_id
106
+ # ID of the social account, you want to apply the configuration to
107
+ #
108
+ # @return [String]
109
+ required :social_account_id, String
110
+
111
+ # @!method initialize(configuration:, social_account_id:)
112
+ # @param configuration [PostForMe::Models::SocialPost::AccountConfiguration::Configuration] Configuration for the social account
113
+ #
114
+ # @param social_account_id [String] ID of the social account, you want to apply the configuration to
115
+
116
+ # @see PostForMe::Models::SocialPost::AccountConfiguration#configuration
117
+ class Configuration < PostForMe::Internal::Type::BaseModel
118
+ # @!attribute allow_comment
119
+ # Allow comments on TikTok
120
+ #
121
+ # @return [Boolean, nil]
122
+ optional :allow_comment, PostForMe::Internal::Type::Boolean, nil?: true
123
+
124
+ # @!attribute allow_duet
125
+ # Allow duets on TikTok
126
+ #
127
+ # @return [Boolean, nil]
128
+ optional :allow_duet, PostForMe::Internal::Type::Boolean, nil?: true
129
+
130
+ # @!attribute allow_stitch
131
+ # Allow stitch on TikTok
132
+ #
133
+ # @return [Boolean, nil]
134
+ optional :allow_stitch, PostForMe::Internal::Type::Boolean, nil?: true
135
+
136
+ # @!attribute board_ids
137
+ # Pinterest board IDs
138
+ #
139
+ # @return [Array<String>, nil]
140
+ optional :board_ids, PostForMe::Internal::Type::ArrayOf[String], nil?: true
141
+
142
+ # @!attribute caption
143
+ # Overrides the `caption` from the post
144
+ #
145
+ # @return [Object, nil]
146
+ optional :caption, PostForMe::Internal::Type::Unknown, nil?: true
147
+
148
+ # @!attribute disclose_branded_content
149
+ # Disclose branded content on TikTok
150
+ #
151
+ # @return [Boolean, nil]
152
+ optional :disclose_branded_content, PostForMe::Internal::Type::Boolean, nil?: true
153
+
154
+ # @!attribute disclose_your_brand
155
+ # Disclose your brand on TikTok
156
+ #
157
+ # @return [Boolean, nil]
158
+ optional :disclose_your_brand, PostForMe::Internal::Type::Boolean, nil?: true
159
+
160
+ # @!attribute is_ai_generated
161
+ # Flag content as AI generated on TikTok
162
+ #
163
+ # @return [Boolean, nil]
164
+ optional :is_ai_generated, PostForMe::Internal::Type::Boolean, nil?: true
165
+
166
+ # @!attribute is_draft
167
+ # Will create a draft upload to TikTok, posting will need to be completed from
168
+ # within the app
169
+ #
170
+ # @return [Boolean, nil]
171
+ optional :is_draft, PostForMe::Internal::Type::Boolean, nil?: true
172
+
173
+ # @!attribute link
174
+ # Pinterest post link
175
+ #
176
+ # @return [String, nil]
177
+ optional :link, String, nil?: true
178
+
179
+ # @!attribute media
180
+ # Overrides the `media` from the post
181
+ #
182
+ # @return [Array<String>, nil]
183
+ optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
184
+
185
+ # @!attribute placement
186
+ # Post placement for Facebook/Instagram/Threads
187
+ #
188
+ # @return [Symbol, PostForMe::Models::SocialPost::AccountConfiguration::Configuration::Placement, nil]
189
+ optional :placement,
190
+ enum: -> { PostForMe::SocialPost::AccountConfiguration::Configuration::Placement },
191
+ nil?: true
192
+
193
+ # @!attribute privacy_status
194
+ # Sets the privacy status for TikTok (private, public)
195
+ #
196
+ # @return [String, nil]
197
+ optional :privacy_status, String, nil?: true
198
+
199
+ # @!attribute title
200
+ # Overrides the `title` from the post
201
+ #
202
+ # @return [String, nil]
203
+ optional :title, String, nil?: true
204
+
205
+ # @!method initialize(allow_comment: nil, allow_duet: nil, allow_stitch: nil, board_ids: nil, caption: nil, disclose_branded_content: nil, disclose_your_brand: nil, is_ai_generated: nil, is_draft: nil, link: nil, media: nil, placement: nil, privacy_status: nil, title: nil)
206
+ # Some parameter documentations has been truncated, see
207
+ # {PostForMe::Models::SocialPost::AccountConfiguration::Configuration} for more
208
+ # details.
209
+ #
210
+ # Configuration for the social account
211
+ #
212
+ # @param allow_comment [Boolean, nil] Allow comments on TikTok
213
+ #
214
+ # @param allow_duet [Boolean, nil] Allow duets on TikTok
215
+ #
216
+ # @param allow_stitch [Boolean, nil] Allow stitch on TikTok
217
+ #
218
+ # @param board_ids [Array<String>, nil] Pinterest board IDs
219
+ #
220
+ # @param caption [Object, nil] Overrides the `caption` from the post
221
+ #
222
+ # @param disclose_branded_content [Boolean, nil] Disclose branded content on TikTok
223
+ #
224
+ # @param disclose_your_brand [Boolean, nil] Disclose your brand on TikTok
225
+ #
226
+ # @param is_ai_generated [Boolean, nil] Flag content as AI generated on TikTok
227
+ #
228
+ # @param is_draft [Boolean, nil] Will create a draft upload to TikTok, posting will need to be completed from wit
229
+ #
230
+ # @param link [String, nil] Pinterest post link
231
+ #
232
+ # @param media [Array<String>, nil] Overrides the `media` from the post
233
+ #
234
+ # @param placement [Symbol, PostForMe::Models::SocialPost::AccountConfiguration::Configuration::Placement, nil] Post placement for Facebook/Instagram/Threads
235
+ #
236
+ # @param privacy_status [String, nil] Sets the privacy status for TikTok (private, public)
237
+ #
238
+ # @param title [String, nil] Overrides the `title` from the post
239
+
240
+ # Post placement for Facebook/Instagram/Threads
241
+ #
242
+ # @see PostForMe::Models::SocialPost::AccountConfiguration::Configuration#placement
243
+ module Placement
244
+ extend PostForMe::Internal::Type::Enum
245
+
246
+ REELS = :reels
247
+ TIMELINE = :timeline
248
+ STORIES = :stories
249
+
250
+ # @!method self.values
251
+ # @return [Array<Symbol>]
252
+ end
253
+ end
254
+ end
255
+
256
+ class Media < PostForMe::Internal::Type::BaseModel
257
+ # @!attribute url
258
+ # Public URL of the media
259
+ #
260
+ # @return [String]
261
+ required :url, String
262
+
263
+ # @!attribute thumbnail_timestamp_ms
264
+ # Timestamp in milliseconds of frame to use as thumbnail for the media
265
+ #
266
+ # @return [Object, nil]
267
+ optional :thumbnail_timestamp_ms, PostForMe::Internal::Type::Unknown, nil?: true
268
+
269
+ # @!attribute thumbnail_url
270
+ # Public URL of the thumbnail for the media
271
+ #
272
+ # @return [Object, nil]
273
+ optional :thumbnail_url, PostForMe::Internal::Type::Unknown, nil?: true
274
+
275
+ # @!method initialize(url:, thumbnail_timestamp_ms: nil, thumbnail_url: nil)
276
+ # @param url [String] Public URL of the media
277
+ #
278
+ # @param thumbnail_timestamp_ms [Object, nil] Timestamp in milliseconds of frame to use as thumbnail for the media
279
+ #
280
+ # @param thumbnail_url [Object, nil] Public URL of the thumbnail for the media
281
+ end
282
+
98
283
  # Current status of the post: draft, processed, scheduled, or processing
99
284
  #
100
285
  # @see PostForMe::Models::SocialPost#status
@@ -36,10 +36,7 @@ module PostForMe
36
36
  # Filter by post status. Multiple values imply OR logic.
37
37
  #
38
38
  # @return [Array<Symbol, PostForMe::Models::SocialPostListParams::Status>, nil]
39
- optional :status,
40
- -> {
41
- PostForMe::Internal::Type::ArrayOf[enum: PostForMe::SocialPostListParams::Status]
42
- }
39
+ optional :status, -> { PostForMe::Internal::Type::ArrayOf[enum: PostForMe::SocialPostListParams::Status] }
43
40
 
44
41
  # @!method initialize(external_id: nil, limit: nil, offset: nil, platform: nil, status: nil, request_options: {})
45
42
  # @param external_id [Array<String>] Filter by external ID. Multiple values imply OR logic.
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PostForMe
4
+ module Models
5
+ class ThreadsConfigurationDto < 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 placement
19
+ # Threads post placement
20
+ #
21
+ # @return [Symbol, PostForMe::Models::ThreadsConfigurationDto::Placement, nil]
22
+ optional :placement, enum: -> { PostForMe::ThreadsConfigurationDto::Placement }, nil?: true
23
+
24
+ # @!method initialize(caption: nil, media: nil, placement: 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 placement [Symbol, PostForMe::Models::ThreadsConfigurationDto::Placement, nil] Threads post placement
30
+
31
+ # Threads post placement
32
+ #
33
+ # @see PostForMe::Models::ThreadsConfigurationDto#placement
34
+ module Placement
35
+ extend PostForMe::Internal::Type::Enum
36
+
37
+ REELS = :reels
38
+ TIMELINE = :timeline
39
+
40
+ # @!method self.values
41
+ # @return [Array<Symbol>]
42
+ end
43
+ end
44
+ end
45
+ end