post-for-me 0.1.0.pre.alpha.3
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 +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +32 -0
- data/README.md +265 -0
- data/SECURITY.md +27 -0
- data/lib/post_for_me/client.rb +86 -0
- data/lib/post_for_me/errors.rb +214 -0
- data/lib/post_for_me/file_part.rb +55 -0
- data/lib/post_for_me/internal/transport/base_client.rb +563 -0
- data/lib/post_for_me/internal/transport/pooled_net_requester.rb +209 -0
- data/lib/post_for_me/internal/type/array_of.rb +168 -0
- data/lib/post_for_me/internal/type/base_model.rb +537 -0
- data/lib/post_for_me/internal/type/base_page.rb +55 -0
- data/lib/post_for_me/internal/type/boolean.rb +77 -0
- data/lib/post_for_me/internal/type/converter.rb +327 -0
- data/lib/post_for_me/internal/type/enum.rb +131 -0
- data/lib/post_for_me/internal/type/file_input.rb +108 -0
- data/lib/post_for_me/internal/type/hash_of.rb +188 -0
- data/lib/post_for_me/internal/type/request_parameters.rb +42 -0
- data/lib/post_for_me/internal/type/union.rb +237 -0
- data/lib/post_for_me/internal/type/unknown.rb +81 -0
- data/lib/post_for_me/internal/util.rb +914 -0
- data/lib/post_for_me/internal.rb +20 -0
- data/lib/post_for_me/models/create_social_post.rb +558 -0
- data/lib/post_for_me/models/media_create_upload_url_params.rb +14 -0
- data/lib/post_for_me/models/media_create_upload_url_response.rb +25 -0
- data/lib/post_for_me/models/social_account.rb +110 -0
- data/lib/post_for_me/models/social_account_create_auth_url_params.rb +109 -0
- data/lib/post_for_me/models/social_account_create_auth_url_response.rb +25 -0
- data/lib/post_for_me/models/social_account_disconnect_params.rb +14 -0
- data/lib/post_for_me/models/social_account_disconnect_response.rb +109 -0
- data/lib/post_for_me/models/social_account_list_params.rb +69 -0
- data/lib/post_for_me/models/social_account_list_response.rb +58 -0
- data/lib/post_for_me/models/social_account_retrieve_params.rb +14 -0
- data/lib/post_for_me/models/social_account_update_params.rb +30 -0
- data/lib/post_for_me/models/social_post.rb +114 -0
- data/lib/post_for_me/models/social_post_create_params.rb +14 -0
- data/lib/post_for_me/models/social_post_delete_params.rb +14 -0
- data/lib/post_for_me/models/social_post_delete_response.rb +17 -0
- data/lib/post_for_me/models/social_post_list_params.rb +87 -0
- data/lib/post_for_me/models/social_post_list_response.rb +58 -0
- data/lib/post_for_me/models/social_post_result.rb +87 -0
- data/lib/post_for_me/models/social_post_result_list_params.rb +51 -0
- data/lib/post_for_me/models/social_post_result_list_response.rb +58 -0
- data/lib/post_for_me/models/social_post_result_retrieve_params.rb +14 -0
- data/lib/post_for_me/models/social_post_retrieve_params.rb +14 -0
- data/lib/post_for_me/models/social_post_update_params.rb +14 -0
- data/lib/post_for_me/models/tiktok_configuration.rb +88 -0
- data/lib/post_for_me/models.rb +77 -0
- data/lib/post_for_me/request_options.rb +77 -0
- data/lib/post_for_me/resources/media.rb +94 -0
- data/lib/post_for_me/resources/social_accounts.rb +143 -0
- data/lib/post_for_me/resources/social_post_results.rb +65 -0
- data/lib/post_for_me/resources/social_posts.rb +164 -0
- data/lib/post_for_me/version.rb +5 -0
- data/lib/post_for_me.rb +82 -0
- data/manifest.yaml +15 -0
- data/rbi/post_for_me/client.rbi +58 -0
- data/rbi/post_for_me/errors.rbi +178 -0
- data/rbi/post_for_me/file_part.rbi +37 -0
- data/rbi/post_for_me/internal/transport/base_client.rbi +294 -0
- data/rbi/post_for_me/internal/transport/pooled_net_requester.rbi +79 -0
- data/rbi/post_for_me/internal/type/array_of.rbi +104 -0
- data/rbi/post_for_me/internal/type/base_model.rbi +304 -0
- data/rbi/post_for_me/internal/type/base_page.rbi +42 -0
- data/rbi/post_for_me/internal/type/boolean.rbi +58 -0
- data/rbi/post_for_me/internal/type/converter.rbi +216 -0
- data/rbi/post_for_me/internal/type/enum.rbi +82 -0
- data/rbi/post_for_me/internal/type/file_input.rbi +59 -0
- data/rbi/post_for_me/internal/type/hash_of.rbi +104 -0
- data/rbi/post_for_me/internal/type/request_parameters.rbi +29 -0
- data/rbi/post_for_me/internal/type/union.rbi +128 -0
- data/rbi/post_for_me/internal/type/unknown.rbi +58 -0
- data/rbi/post_for_me/internal/util.rbi +487 -0
- data/rbi/post_for_me/internal.rbi +18 -0
- data/rbi/post_for_me/models/create_social_post.rbi +1128 -0
- data/rbi/post_for_me/models/media_create_upload_url_params.rbi +30 -0
- data/rbi/post_for_me/models/media_create_upload_url_response.rbi +38 -0
- data/rbi/post_for_me/models/social_account.rbi +139 -0
- data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +260 -0
- data/rbi/post_for_me/models/social_account_create_auth_url_response.rbi +36 -0
- data/rbi/post_for_me/models/social_account_disconnect_params.rbi +30 -0
- data/rbi/post_for_me/models/social_account_disconnect_response.rbi +156 -0
- data/rbi/post_for_me/models/social_account_list_params.rbi +112 -0
- data/rbi/post_for_me/models/social_account_list_response.rbi +107 -0
- data/rbi/post_for_me/models/social_account_retrieve_params.rbi +30 -0
- data/rbi/post_for_me/models/social_account_update_params.rbi +60 -0
- data/rbi/post_for_me/models/social_post.rbi +142 -0
- data/rbi/post_for_me/models/social_post_create_params.rbi +27 -0
- data/rbi/post_for_me/models/social_post_delete_params.rbi +27 -0
- data/rbi/post_for_me/models/social_post_delete_response.rbi +30 -0
- data/rbi/post_for_me/models/social_post_list_params.rbi +207 -0
- data/rbi/post_for_me/models/social_post_list_response.rbi +107 -0
- data/rbi/post_for_me/models/social_post_result.rbi +130 -0
- data/rbi/post_for_me/models/social_post_result_list_params.rbi +86 -0
- data/rbi/post_for_me/models/social_post_result_list_response.rbi +107 -0
- data/rbi/post_for_me/models/social_post_result_retrieve_params.rbi +30 -0
- data/rbi/post_for_me/models/social_post_retrieve_params.rbi +30 -0
- data/rbi/post_for_me/models/social_post_update_params.rbi +27 -0
- data/rbi/post_for_me/models/tiktok_configuration.rbi +109 -0
- data/rbi/post_for_me/models.rbi +42 -0
- data/rbi/post_for_me/request_options.rbi +59 -0
- data/rbi/post_for_me/resources/media.rbi +83 -0
- data/rbi/post_for_me/resources/social_accounts.rbi +112 -0
- data/rbi/post_for_me/resources/social_post_results.rbi +51 -0
- data/rbi/post_for_me/resources/social_posts.rbi +160 -0
- data/rbi/post_for_me/version.rbi +5 -0
- data/sig/post_for_me/client.rbs +32 -0
- data/sig/post_for_me/errors.rbs +110 -0
- data/sig/post_for_me/file_part.rbs +21 -0
- data/sig/post_for_me/internal/transport/base_client.rbs +131 -0
- data/sig/post_for_me/internal/transport/pooled_net_requester.rbs +45 -0
- data/sig/post_for_me/internal/type/array_of.rbs +48 -0
- data/sig/post_for_me/internal/type/base_model.rbs +102 -0
- data/sig/post_for_me/internal/type/base_page.rbs +24 -0
- data/sig/post_for_me/internal/type/boolean.rbs +26 -0
- data/sig/post_for_me/internal/type/converter.rbs +79 -0
- data/sig/post_for_me/internal/type/enum.rbs +32 -0
- data/sig/post_for_me/internal/type/file_input.rbs +25 -0
- data/sig/post_for_me/internal/type/hash_of.rbs +48 -0
- data/sig/post_for_me/internal/type/request_parameters.rbs +19 -0
- data/sig/post_for_me/internal/type/union.rbs +52 -0
- data/sig/post_for_me/internal/type/unknown.rbs +26 -0
- data/sig/post_for_me/internal/util.rbs +185 -0
- data/sig/post_for_me/internal.rbs +9 -0
- data/sig/post_for_me/models/create_social_post.rbs +398 -0
- data/sig/post_for_me/models/media_create_upload_url_params.rbs +15 -0
- data/sig/post_for_me/models/media_create_upload_url_response.rbs +16 -0
- data/sig/post_for_me/models/social_account.rbs +81 -0
- data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +105 -0
- data/sig/post_for_me/models/social_account_create_auth_url_response.rbs +16 -0
- data/sig/post_for_me/models/social_account_disconnect_params.rbs +15 -0
- data/sig/post_for_me/models/social_account_disconnect_response.rbs +80 -0
- data/sig/post_for_me/models/social_account_list_params.rbs +63 -0
- data/sig/post_for_me/models/social_account_list_response.rbs +51 -0
- data/sig/post_for_me/models/social_account_retrieve_params.rbs +15 -0
- data/sig/post_for_me/models/social_account_update_params.rbs +32 -0
- data/sig/post_for_me/models/social_post.rbs +83 -0
- data/sig/post_for_me/models/social_post_create_params.rbs +15 -0
- data/sig/post_for_me/models/social_post_delete_params.rbs +15 -0
- data/sig/post_for_me/models/social_post_delete_response.rbs +13 -0
- data/sig/post_for_me/models/social_post_list_params.rbs +100 -0
- data/sig/post_for_me/models/social_post_list_response.rbs +51 -0
- data/sig/post_for_me/models/social_post_result.rbs +66 -0
- data/sig/post_for_me/models/social_post_result_list_params.rbs +49 -0
- data/sig/post_for_me/models/social_post_result_list_response.rbs +51 -0
- data/sig/post_for_me/models/social_post_result_retrieve_params.rbs +15 -0
- data/sig/post_for_me/models/social_post_retrieve_params.rbs +15 -0
- data/sig/post_for_me/models/social_post_update_params.rbs +15 -0
- data/sig/post_for_me/models/tiktok_configuration.rbs +65 -0
- data/sig/post_for_me/models.rbs +37 -0
- data/sig/post_for_me/request_options.rbs +34 -0
- data/sig/post_for_me/resources/media.rbs +11 -0
- data/sig/post_for_me/resources/social_accounts.rbs +40 -0
- data/sig/post_for_me/resources/social_post_results.rbs +20 -0
- data/sig/post_for_me/resources/social_posts.rbs +51 -0
- data/sig/post_for_me/version.rbs +3 -0
- metadata +215 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPosts#delete
|
|
6
|
+
class SocialPostDeleteResponse < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute success
|
|
8
|
+
# Whether or not the entity was deleted
|
|
9
|
+
#
|
|
10
|
+
# @return [Boolean]
|
|
11
|
+
required :success, PostForMe::Internal::Type::Boolean
|
|
12
|
+
|
|
13
|
+
# @!method initialize(success:)
|
|
14
|
+
# @param success [Boolean] Whether or not the entity was deleted
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPosts#list
|
|
6
|
+
class SocialPostListParams < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
extend PostForMe::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include PostForMe::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute external_id
|
|
11
|
+
# Filter by external ID. Multiple values imply OR logic.
|
|
12
|
+
#
|
|
13
|
+
# @return [Array<String>, nil]
|
|
14
|
+
optional :external_id, PostForMe::Internal::Type::ArrayOf[String]
|
|
15
|
+
|
|
16
|
+
# @!attribute limit
|
|
17
|
+
# Number of items to return
|
|
18
|
+
#
|
|
19
|
+
# @return [Float, nil]
|
|
20
|
+
optional :limit, Float
|
|
21
|
+
|
|
22
|
+
# @!attribute offset
|
|
23
|
+
# Number of items to skip
|
|
24
|
+
#
|
|
25
|
+
# @return [Float, nil]
|
|
26
|
+
optional :offset, Float
|
|
27
|
+
|
|
28
|
+
# @!attribute platform
|
|
29
|
+
# Filter by platforms. Multiple values imply OR logic.
|
|
30
|
+
#
|
|
31
|
+
# @return [Array<Symbol, PostForMe::Models::SocialPostListParams::Platform>, nil]
|
|
32
|
+
optional :platform,
|
|
33
|
+
-> { PostForMe::Internal::Type::ArrayOf[enum: PostForMe::SocialPostListParams::Platform] }
|
|
34
|
+
|
|
35
|
+
# @!attribute status
|
|
36
|
+
# Filter by post status. Multiple values imply OR logic.
|
|
37
|
+
#
|
|
38
|
+
# @return [Array<Symbol, PostForMe::Models::SocialPostListParams::Status>, nil]
|
|
39
|
+
optional :status,
|
|
40
|
+
-> {
|
|
41
|
+
PostForMe::Internal::Type::ArrayOf[enum: PostForMe::SocialPostListParams::Status]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# @!method initialize(external_id: nil, limit: nil, offset: nil, platform: nil, status: nil, request_options: {})
|
|
45
|
+
# @param external_id [Array<String>] Filter by external ID. Multiple values imply OR logic.
|
|
46
|
+
#
|
|
47
|
+
# @param limit [Float] Number of items to return
|
|
48
|
+
#
|
|
49
|
+
# @param offset [Float] Number of items to skip
|
|
50
|
+
#
|
|
51
|
+
# @param platform [Array<Symbol, PostForMe::Models::SocialPostListParams::Platform>] Filter by platforms. Multiple values imply OR logic.
|
|
52
|
+
#
|
|
53
|
+
# @param status [Array<Symbol, PostForMe::Models::SocialPostListParams::Status>] Filter by post status. Multiple values imply OR logic.
|
|
54
|
+
#
|
|
55
|
+
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
|
|
56
|
+
|
|
57
|
+
module Platform
|
|
58
|
+
extend PostForMe::Internal::Type::Enum
|
|
59
|
+
|
|
60
|
+
BLUESKY = :bluesky
|
|
61
|
+
FACEBOOK = :facebook
|
|
62
|
+
INSTAGRAM = :instagram
|
|
63
|
+
LINKEDIN = :linkedin
|
|
64
|
+
PINTEREST = :pinterest
|
|
65
|
+
THREADS = :threads
|
|
66
|
+
TIKTOK = :tiktok
|
|
67
|
+
X = :x
|
|
68
|
+
YOUTUBE = :youtube
|
|
69
|
+
|
|
70
|
+
# @!method self.values
|
|
71
|
+
# @return [Array<Symbol>]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
module Status
|
|
75
|
+
extend PostForMe::Internal::Type::Enum
|
|
76
|
+
|
|
77
|
+
DRAFT = :draft
|
|
78
|
+
SCHEDULED = :scheduled
|
|
79
|
+
PROCESSING = :processing
|
|
80
|
+
PROCESSED = :processed
|
|
81
|
+
|
|
82
|
+
# @!method self.values
|
|
83
|
+
# @return [Array<Symbol>]
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPosts#list
|
|
6
|
+
class SocialPostListResponse < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<PostForMe::Models::SocialPost>]
|
|
10
|
+
required :data, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPost] }
|
|
11
|
+
|
|
12
|
+
# @!attribute meta
|
|
13
|
+
#
|
|
14
|
+
# @return [PostForMe::Models::SocialPostListResponse::Meta]
|
|
15
|
+
required :meta, -> { PostForMe::Models::SocialPostListResponse::Meta }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(data:, meta:)
|
|
18
|
+
# @param data [Array<PostForMe::Models::SocialPost>]
|
|
19
|
+
# @param meta [PostForMe::Models::SocialPostListResponse::Meta]
|
|
20
|
+
|
|
21
|
+
# @see PostForMe::Models::SocialPostListResponse#meta
|
|
22
|
+
class Meta < PostForMe::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute limit
|
|
24
|
+
# Maximum number of items returned.
|
|
25
|
+
#
|
|
26
|
+
# @return [Float]
|
|
27
|
+
required :limit, Float
|
|
28
|
+
|
|
29
|
+
# @!attribute next_
|
|
30
|
+
# URL to the next page of results, or null if none.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
required :next_, String, api_name: :next, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute offset
|
|
36
|
+
# Number of items skipped.
|
|
37
|
+
#
|
|
38
|
+
# @return [Float]
|
|
39
|
+
required :offset, Float
|
|
40
|
+
|
|
41
|
+
# @!attribute total
|
|
42
|
+
# Total number of items available.
|
|
43
|
+
#
|
|
44
|
+
# @return [Float]
|
|
45
|
+
required :total, Float
|
|
46
|
+
|
|
47
|
+
# @!method initialize(limit:, next_:, offset:, total:)
|
|
48
|
+
# @param limit [Float] Maximum number of items returned.
|
|
49
|
+
#
|
|
50
|
+
# @param next_ [String, nil] URL to the next page of results, or null if none.
|
|
51
|
+
#
|
|
52
|
+
# @param offset [Float] Number of items skipped.
|
|
53
|
+
#
|
|
54
|
+
# @param total [Float] Total number of items available.
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPostResults#retrieve
|
|
6
|
+
class SocialPostResult < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The unique identifier of the post result
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute details
|
|
14
|
+
# Detailed logs from the post
|
|
15
|
+
#
|
|
16
|
+
# @return [Object]
|
|
17
|
+
required :details, PostForMe::Internal::Type::Unknown
|
|
18
|
+
|
|
19
|
+
# @!attribute error
|
|
20
|
+
# Error message if the post failed
|
|
21
|
+
#
|
|
22
|
+
# @return [Object]
|
|
23
|
+
required :error, PostForMe::Internal::Type::Unknown
|
|
24
|
+
|
|
25
|
+
# @!attribute platform_data
|
|
26
|
+
# Platform-specific data
|
|
27
|
+
#
|
|
28
|
+
# @return [PostForMe::Models::SocialPostResult::PlatformData]
|
|
29
|
+
required :platform_data, -> { PostForMe::SocialPostResult::PlatformData }
|
|
30
|
+
|
|
31
|
+
# @!attribute post_id
|
|
32
|
+
# The ID of the associated post
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :post_id, String
|
|
36
|
+
|
|
37
|
+
# @!attribute social_account_id
|
|
38
|
+
# The ID of the associated social account
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
required :social_account_id, String
|
|
42
|
+
|
|
43
|
+
# @!attribute success
|
|
44
|
+
# Indicates if the post was successful
|
|
45
|
+
#
|
|
46
|
+
# @return [Boolean]
|
|
47
|
+
required :success, PostForMe::Internal::Type::Boolean
|
|
48
|
+
|
|
49
|
+
# @!method initialize(id:, details:, error:, platform_data:, post_id:, social_account_id:, success:)
|
|
50
|
+
# @param id [String] The unique identifier of the post result
|
|
51
|
+
#
|
|
52
|
+
# @param details [Object] Detailed logs from the post
|
|
53
|
+
#
|
|
54
|
+
# @param error [Object] Error message if the post failed
|
|
55
|
+
#
|
|
56
|
+
# @param platform_data [PostForMe::Models::SocialPostResult::PlatformData] Platform-specific data
|
|
57
|
+
#
|
|
58
|
+
# @param post_id [String] The ID of the associated post
|
|
59
|
+
#
|
|
60
|
+
# @param social_account_id [String] The ID of the associated social account
|
|
61
|
+
#
|
|
62
|
+
# @param success [Boolean] Indicates if the post was successful
|
|
63
|
+
|
|
64
|
+
# @see PostForMe::Models::SocialPostResult#platform_data
|
|
65
|
+
class PlatformData < PostForMe::Internal::Type::BaseModel
|
|
66
|
+
# @!attribute id
|
|
67
|
+
# Platform-specific ID
|
|
68
|
+
#
|
|
69
|
+
# @return [String, nil]
|
|
70
|
+
optional :id, String
|
|
71
|
+
|
|
72
|
+
# @!attribute url
|
|
73
|
+
# URL of the posted content
|
|
74
|
+
#
|
|
75
|
+
# @return [String, nil]
|
|
76
|
+
optional :url, String
|
|
77
|
+
|
|
78
|
+
# @!method initialize(id: nil, url: nil)
|
|
79
|
+
# Platform-specific data
|
|
80
|
+
#
|
|
81
|
+
# @param id [String] Platform-specific ID
|
|
82
|
+
#
|
|
83
|
+
# @param url [String] URL of the posted content
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPostResults#list
|
|
6
|
+
class SocialPostResultListParams < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
extend PostForMe::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include PostForMe::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute limit
|
|
11
|
+
# Number of items to return
|
|
12
|
+
#
|
|
13
|
+
# @return [Float, nil]
|
|
14
|
+
optional :limit, Float
|
|
15
|
+
|
|
16
|
+
# @!attribute offset
|
|
17
|
+
# Number of items to skip
|
|
18
|
+
#
|
|
19
|
+
# @return [Float, nil]
|
|
20
|
+
optional :offset, Float
|
|
21
|
+
|
|
22
|
+
# @!attribute platform
|
|
23
|
+
# Filter by platform(s). Multiple values imply OR logic (e.g.,
|
|
24
|
+
# ?platform=x&platform=facebook).
|
|
25
|
+
#
|
|
26
|
+
# @return [Array<String>, nil]
|
|
27
|
+
optional :platform, PostForMe::Internal::Type::ArrayOf[String]
|
|
28
|
+
|
|
29
|
+
# @!attribute post_id
|
|
30
|
+
# Filter by post IDs. Multiple values imply OR logic (e.g.,
|
|
31
|
+
# ?post_id=123&post_id=456).
|
|
32
|
+
#
|
|
33
|
+
# @return [Array<String>, nil]
|
|
34
|
+
optional :post_id, PostForMe::Internal::Type::ArrayOf[String]
|
|
35
|
+
|
|
36
|
+
# @!method initialize(limit: nil, offset: nil, platform: nil, post_id: nil, request_options: {})
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {PostForMe::Models::SocialPostResultListParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# @param limit [Float] Number of items to return
|
|
41
|
+
#
|
|
42
|
+
# @param offset [Float] Number of items to skip
|
|
43
|
+
#
|
|
44
|
+
# @param platform [Array<String>] Filter by platform(s). Multiple values imply OR logic (e.g., ?platform=x&platfor
|
|
45
|
+
#
|
|
46
|
+
# @param post_id [Array<String>] Filter by post IDs. Multiple values imply OR logic (e.g., ?post_id=123&post_id=4
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPostResults#list
|
|
6
|
+
class SocialPostResultListResponse < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<PostForMe::Models::SocialPostResult>]
|
|
10
|
+
required :data, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::SocialPostResult] }
|
|
11
|
+
|
|
12
|
+
# @!attribute meta
|
|
13
|
+
#
|
|
14
|
+
# @return [PostForMe::Models::SocialPostResultListResponse::Meta]
|
|
15
|
+
required :meta, -> { PostForMe::Models::SocialPostResultListResponse::Meta }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(data:, meta:)
|
|
18
|
+
# @param data [Array<PostForMe::Models::SocialPostResult>]
|
|
19
|
+
# @param meta [PostForMe::Models::SocialPostResultListResponse::Meta]
|
|
20
|
+
|
|
21
|
+
# @see PostForMe::Models::SocialPostResultListResponse#meta
|
|
22
|
+
class Meta < PostForMe::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute limit
|
|
24
|
+
# Maximum number of items returned.
|
|
25
|
+
#
|
|
26
|
+
# @return [Float]
|
|
27
|
+
required :limit, Float
|
|
28
|
+
|
|
29
|
+
# @!attribute next_
|
|
30
|
+
# URL to the next page of results, or null if none.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
required :next_, String, api_name: :next, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute offset
|
|
36
|
+
# Number of items skipped.
|
|
37
|
+
#
|
|
38
|
+
# @return [Float]
|
|
39
|
+
required :offset, Float
|
|
40
|
+
|
|
41
|
+
# @!attribute total
|
|
42
|
+
# Total number of items available.
|
|
43
|
+
#
|
|
44
|
+
# @return [Float]
|
|
45
|
+
required :total, Float
|
|
46
|
+
|
|
47
|
+
# @!method initialize(limit:, next_:, offset:, total:)
|
|
48
|
+
# @param limit [Float] Maximum number of items returned.
|
|
49
|
+
#
|
|
50
|
+
# @param next_ [String, nil] URL to the next page of results, or null if none.
|
|
51
|
+
#
|
|
52
|
+
# @param offset [Float] Number of items skipped.
|
|
53
|
+
#
|
|
54
|
+
# @param total [Float] Total number of items available.
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPostResults#retrieve
|
|
6
|
+
class SocialPostResultRetrieveParams < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
extend PostForMe::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include PostForMe::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPosts#retrieve
|
|
6
|
+
class SocialPostRetrieveParams < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
extend PostForMe::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include PostForMe::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialPosts#update
|
|
6
|
+
class SocialPostUpdateParams < PostForMe::Models::CreateSocialPost
|
|
7
|
+
extend PostForMe::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include PostForMe::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
class TiktokConfiguration < PostForMe::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute allow_comment
|
|
7
|
+
# Allow comments on TikTok
|
|
8
|
+
#
|
|
9
|
+
# @return [Boolean, nil]
|
|
10
|
+
optional :allow_comment, PostForMe::Internal::Type::Boolean, nil?: true
|
|
11
|
+
|
|
12
|
+
# @!attribute allow_duet
|
|
13
|
+
# Allow duets on TikTok
|
|
14
|
+
#
|
|
15
|
+
# @return [Boolean, nil]
|
|
16
|
+
optional :allow_duet, PostForMe::Internal::Type::Boolean, nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute allow_stitch
|
|
19
|
+
# Allow stitch on TikTok
|
|
20
|
+
#
|
|
21
|
+
# @return [Boolean, nil]
|
|
22
|
+
optional :allow_stitch, PostForMe::Internal::Type::Boolean, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute caption
|
|
25
|
+
# Overrides the `caption` from the post
|
|
26
|
+
#
|
|
27
|
+
# @return [Object, nil]
|
|
28
|
+
optional :caption, PostForMe::Internal::Type::Unknown, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute disclose_branded_content
|
|
31
|
+
# Disclose branded content on TikTok
|
|
32
|
+
#
|
|
33
|
+
# @return [Boolean, nil]
|
|
34
|
+
optional :disclose_branded_content, PostForMe::Internal::Type::Boolean, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute disclose_your_brand
|
|
37
|
+
# Disclose your brand on TikTok
|
|
38
|
+
#
|
|
39
|
+
# @return [Boolean, nil]
|
|
40
|
+
optional :disclose_your_brand, PostForMe::Internal::Type::Boolean, nil?: true
|
|
41
|
+
|
|
42
|
+
# @!attribute is_ai_generated
|
|
43
|
+
# Flag content as AI generated on TikTok
|
|
44
|
+
#
|
|
45
|
+
# @return [Boolean, nil]
|
|
46
|
+
optional :is_ai_generated, PostForMe::Internal::Type::Boolean, nil?: true
|
|
47
|
+
|
|
48
|
+
# @!attribute media
|
|
49
|
+
# Overrides the `media` from the post
|
|
50
|
+
#
|
|
51
|
+
# @return [Array<String>, nil]
|
|
52
|
+
optional :media, PostForMe::Internal::Type::ArrayOf[String], nil?: true
|
|
53
|
+
|
|
54
|
+
# @!attribute privacy_status
|
|
55
|
+
# Sets the privacy status for TikTok (private, public)
|
|
56
|
+
#
|
|
57
|
+
# @return [String, nil]
|
|
58
|
+
optional :privacy_status, String, nil?: true
|
|
59
|
+
|
|
60
|
+
# @!attribute title
|
|
61
|
+
# Overrides the `title` from the post
|
|
62
|
+
#
|
|
63
|
+
# @return [String, nil]
|
|
64
|
+
optional :title, String, nil?: true
|
|
65
|
+
|
|
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)
|
|
67
|
+
# @param allow_comment [Boolean, nil] Allow comments on TikTok
|
|
68
|
+
#
|
|
69
|
+
# @param allow_duet [Boolean, nil] Allow duets on TikTok
|
|
70
|
+
#
|
|
71
|
+
# @param allow_stitch [Boolean, nil] Allow stitch on TikTok
|
|
72
|
+
#
|
|
73
|
+
# @param caption [Object, nil] Overrides the `caption` from the post
|
|
74
|
+
#
|
|
75
|
+
# @param disclose_branded_content [Boolean, nil] Disclose branded content on TikTok
|
|
76
|
+
#
|
|
77
|
+
# @param disclose_your_brand [Boolean, nil] Disclose your brand on TikTok
|
|
78
|
+
#
|
|
79
|
+
# @param is_ai_generated [Boolean, nil] Flag content as AI generated on TikTok
|
|
80
|
+
#
|
|
81
|
+
# @param media [Array<String>, nil] Overrides the `media` from the post
|
|
82
|
+
#
|
|
83
|
+
# @param privacy_status [String, nil] Sets the privacy status for TikTok (private, public)
|
|
84
|
+
#
|
|
85
|
+
# @param title [String, nil] Overrides the `title` from the post
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
[PostForMe::Internal::Type::BaseModel, *PostForMe::Internal::Type::BaseModel.subclasses].each do |cls|
|
|
5
|
+
cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, PostForMe::Internal::AnyHash) } }
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
PostForMe::Internal::Util.walk_namespaces(PostForMe::Models).each do |mod|
|
|
9
|
+
case mod
|
|
10
|
+
in PostForMe::Internal::Type::Enum | PostForMe::Internal::Type::Union
|
|
11
|
+
mod.constants.each do |name|
|
|
12
|
+
case mod.const_get(name)
|
|
13
|
+
in true | false
|
|
14
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
|
|
15
|
+
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
|
16
|
+
in Integer
|
|
17
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
|
|
18
|
+
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
|
19
|
+
in Float
|
|
20
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
|
|
21
|
+
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
|
22
|
+
in Symbol
|
|
23
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
|
|
24
|
+
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
|
25
|
+
else
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
else
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
PostForMe::Internal::Util.walk_namespaces(PostForMe::Models)
|
|
33
|
+
.lazy
|
|
34
|
+
.grep(PostForMe::Internal::Type::Union)
|
|
35
|
+
.each do |mod|
|
|
36
|
+
const = :Variants
|
|
37
|
+
next if mod.sorbet_constant_defined?(const)
|
|
38
|
+
|
|
39
|
+
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
CreateSocialPost = PostForMe::Models::CreateSocialPost
|
|
43
|
+
|
|
44
|
+
MediaCreateUploadURLParams = PostForMe::Models::MediaCreateUploadURLParams
|
|
45
|
+
|
|
46
|
+
SocialAccount = PostForMe::Models::SocialAccount
|
|
47
|
+
|
|
48
|
+
SocialAccountCreateAuthURLParams = PostForMe::Models::SocialAccountCreateAuthURLParams
|
|
49
|
+
|
|
50
|
+
SocialAccountDisconnectParams = PostForMe::Models::SocialAccountDisconnectParams
|
|
51
|
+
|
|
52
|
+
SocialAccountListParams = PostForMe::Models::SocialAccountListParams
|
|
53
|
+
|
|
54
|
+
SocialAccountRetrieveParams = PostForMe::Models::SocialAccountRetrieveParams
|
|
55
|
+
|
|
56
|
+
SocialAccountUpdateParams = PostForMe::Models::SocialAccountUpdateParams
|
|
57
|
+
|
|
58
|
+
SocialPost = PostForMe::Models::SocialPost
|
|
59
|
+
|
|
60
|
+
SocialPostCreateParams = PostForMe::Models::SocialPostCreateParams
|
|
61
|
+
|
|
62
|
+
SocialPostDeleteParams = PostForMe::Models::SocialPostDeleteParams
|
|
63
|
+
|
|
64
|
+
SocialPostListParams = PostForMe::Models::SocialPostListParams
|
|
65
|
+
|
|
66
|
+
SocialPostResult = PostForMe::Models::SocialPostResult
|
|
67
|
+
|
|
68
|
+
SocialPostResultListParams = PostForMe::Models::SocialPostResultListParams
|
|
69
|
+
|
|
70
|
+
SocialPostResultRetrieveParams = PostForMe::Models::SocialPostResultRetrieveParams
|
|
71
|
+
|
|
72
|
+
SocialPostRetrieveParams = PostForMe::Models::SocialPostRetrieveParams
|
|
73
|
+
|
|
74
|
+
SocialPostUpdateParams = PostForMe::Models::SocialPostUpdateParams
|
|
75
|
+
|
|
76
|
+
TiktokConfiguration = PostForMe::Models::TiktokConfiguration
|
|
77
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
# Specify HTTP behaviour to use for a specific request. These options supplement
|
|
5
|
+
# or override those provided at the client level.
|
|
6
|
+
#
|
|
7
|
+
# When making a request, you can pass an actual {RequestOptions} instance, or
|
|
8
|
+
# simply pass a Hash with symbol keys matching the attributes on this class.
|
|
9
|
+
class RequestOptions < PostForMe::Internal::Type::BaseModel
|
|
10
|
+
# @api private
|
|
11
|
+
#
|
|
12
|
+
# @param opts [PostForMe::RequestOptions, Hash{Symbol=>Object}]
|
|
13
|
+
#
|
|
14
|
+
# @raise [ArgumentError]
|
|
15
|
+
def self.validate!(opts)
|
|
16
|
+
case opts
|
|
17
|
+
in PostForMe::RequestOptions | Hash
|
|
18
|
+
opts.to_h.each_key do |k|
|
|
19
|
+
unless fields.include?(k)
|
|
20
|
+
raise ArgumentError.new("Request `opts` keys must be one of #{fields.keys}, got #{k.inspect}")
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
else
|
|
24
|
+
raise ArgumentError.new("Request `opts` must be a Hash or RequestOptions, got #{opts.inspect}")
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @!attribute idempotency_key
|
|
29
|
+
# Idempotency key to send with request and all associated retries. Will only be
|
|
30
|
+
# sent for write requests.
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :idempotency_key, String
|
|
34
|
+
|
|
35
|
+
# @!attribute extra_query
|
|
36
|
+
# Extra query params to send with the request. These are `.merge`’d into any
|
|
37
|
+
# `query` given at the client level.
|
|
38
|
+
#
|
|
39
|
+
# @return [Hash{String=>Array<String>, String, nil}, nil]
|
|
40
|
+
optional :extra_query, PostForMe::Internal::Type::HashOf[PostForMe::Internal::Type::ArrayOf[String]]
|
|
41
|
+
|
|
42
|
+
# @!attribute extra_headers
|
|
43
|
+
# Extra headers to send with the request. These are `.merged`’d into any
|
|
44
|
+
# `extra_headers` given at the client level.
|
|
45
|
+
#
|
|
46
|
+
# @return [Hash{String=>String, nil}, nil]
|
|
47
|
+
optional :extra_headers, PostForMe::Internal::Type::HashOf[String, nil?: true]
|
|
48
|
+
|
|
49
|
+
# @!attribute extra_body
|
|
50
|
+
# Extra data to send with the request. These are deep merged into any data
|
|
51
|
+
# generated as part of the normal request.
|
|
52
|
+
#
|
|
53
|
+
# @return [Object, nil]
|
|
54
|
+
optional :extra_body, PostForMe::Internal::Type::HashOf[PostForMe::Internal::Type::Unknown]
|
|
55
|
+
|
|
56
|
+
# @!attribute max_retries
|
|
57
|
+
# Maximum number of retries to attempt after a failed initial request.
|
|
58
|
+
#
|
|
59
|
+
# @return [Integer, nil]
|
|
60
|
+
optional :max_retries, Integer
|
|
61
|
+
|
|
62
|
+
# @!attribute timeout
|
|
63
|
+
# Request timeout in seconds.
|
|
64
|
+
#
|
|
65
|
+
# @return [Float, nil]
|
|
66
|
+
optional :timeout, Float
|
|
67
|
+
|
|
68
|
+
# @!method initialize(values = {})
|
|
69
|
+
# Returns a new instance of RequestOptions.
|
|
70
|
+
#
|
|
71
|
+
# @param values [Hash{Symbol=>Object}]
|
|
72
|
+
|
|
73
|
+
define_sorbet_constant!(:OrHash) do
|
|
74
|
+
T.type_alias { T.any(PostForMe::RequestOptions, PostForMe::Internal::AnyHash) }
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|