post-for-me 0.1.0.pre.alpha.10 → 0.1.0.pre.alpha.11
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 +22 -0
- data/README.md +1 -1
- data/lib/post_for_me/client.rb +4 -0
- data/lib/post_for_me/internal/transport/pooled_net_requester.rb +12 -10
- data/lib/post_for_me/internal/util.rb +7 -2
- data/lib/post_for_me/models/platform_post.rb +843 -0
- data/lib/post_for_me/models/social_account_create_auth_url_params.rb +245 -9
- data/lib/post_for_me/models/social_account_feed_list_params.rb +81 -0
- data/lib/post_for_me/models/social_account_feed_list_response.rb +58 -0
- data/lib/post_for_me/models.rb +4 -0
- data/lib/post_for_me/resources/social_account_feeds.rb +51 -0
- data/lib/post_for_me/resources/social_accounts.rb +8 -1
- data/lib/post_for_me/version.rb +1 -1
- data/lib/post_for_me.rb +5 -0
- data/manifest.yaml +1 -0
- data/rbi/post_for_me/client.rbi +3 -0
- data/rbi/post_for_me/models/platform_post.rbi +1287 -0
- data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +545 -15
- data/rbi/post_for_me/models/social_account_feed_list_params.rbi +157 -0
- data/rbi/post_for_me/models/social_account_feed_list_response.rbi +110 -0
- data/rbi/post_for_me/models.rbi +4 -0
- data/rbi/post_for_me/resources/social_account_feeds.rbi +51 -0
- data/rbi/post_for_me/resources/social_accounts.rbi +13 -0
- data/sig/post_for_me/client.rbs +2 -0
- data/sig/post_for_me/models/platform_post.rbs +660 -0
- data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +193 -10
- data/sig/post_for_me/models/social_account_feed_list_params.rbs +75 -0
- data/sig/post_for_me/models/social_account_feed_list_response.rbs +54 -0
- data/sig/post_for_me/models.rbs +4 -0
- data/sig/post_for_me/resources/social_account_feeds.rbs +18 -0
- data/sig/post_for_me/resources/social_accounts.rbs +2 -0
- metadata +14 -2
|
@@ -19,21 +19,55 @@ module PostForMe
|
|
|
19
19
|
# @return [String, nil]
|
|
20
20
|
optional :external_id, String
|
|
21
21
|
|
|
22
|
+
# @!attribute permissions
|
|
23
|
+
# List of permissions you want to allow. Will default to only post permissions.
|
|
24
|
+
# You must include the "feeds" permission to request an account feed and metrics
|
|
25
|
+
#
|
|
26
|
+
# @return [Array<Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::Permission>, nil]
|
|
27
|
+
optional :permissions,
|
|
28
|
+
-> { PostForMe::Internal::Type::ArrayOf[enum: PostForMe::SocialAccountCreateAuthURLParams::Permission] }
|
|
29
|
+
|
|
22
30
|
# @!attribute platform_data
|
|
23
31
|
# Additional data needed for the provider
|
|
24
32
|
#
|
|
25
33
|
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData, nil]
|
|
26
34
|
optional :platform_data, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData }
|
|
27
35
|
|
|
28
|
-
# @!
|
|
36
|
+
# @!attribute redirect_url_override
|
|
37
|
+
# Override the default redirect URL for the OAuth flow. If provided, this URL will
|
|
38
|
+
# be used instead of our redirect URL. Make sure this URL is included in your
|
|
39
|
+
# app's authorized redirect urls. This override will not work when using our
|
|
40
|
+
# system credientals.
|
|
41
|
+
#
|
|
42
|
+
# @return [String, nil]
|
|
43
|
+
optional :redirect_url_override, String
|
|
44
|
+
|
|
45
|
+
# @!method initialize(platform:, external_id: nil, permissions: nil, platform_data: nil, redirect_url_override: nil, request_options: {})
|
|
46
|
+
# Some parameter documentations has been truncated, see
|
|
47
|
+
# {PostForMe::Models::SocialAccountCreateAuthURLParams} for more details.
|
|
48
|
+
#
|
|
29
49
|
# @param platform [String] The social account provider
|
|
30
50
|
#
|
|
31
51
|
# @param external_id [String] Your unique identifier for the social account
|
|
32
52
|
#
|
|
53
|
+
# @param permissions [Array<Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::Permission>] List of permissions you want to allow. Will default to only post permissions. Yo
|
|
54
|
+
#
|
|
33
55
|
# @param platform_data [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData] Additional data needed for the provider
|
|
34
56
|
#
|
|
57
|
+
# @param redirect_url_override [String] Override the default redirect URL for the OAuth flow. If provided, this URL will
|
|
58
|
+
#
|
|
35
59
|
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
|
|
36
60
|
|
|
61
|
+
module Permission
|
|
62
|
+
extend PostForMe::Internal::Type::Enum
|
|
63
|
+
|
|
64
|
+
POSTS = :posts
|
|
65
|
+
FEEDS = :feeds
|
|
66
|
+
|
|
67
|
+
# @!method self.values
|
|
68
|
+
# @return [Array<Symbol>]
|
|
69
|
+
end
|
|
70
|
+
|
|
37
71
|
class PlatformData < PostForMe::Internal::Type::BaseModel
|
|
38
72
|
# @!attribute bluesky
|
|
39
73
|
# Additional data needed for connecting bluesky accounts
|
|
@@ -41,6 +75,12 @@ module PostForMe
|
|
|
41
75
|
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Bluesky, nil]
|
|
42
76
|
optional :bluesky, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Bluesky }
|
|
43
77
|
|
|
78
|
+
# @!attribute facebook
|
|
79
|
+
# Additional data for connecting facebook accounts
|
|
80
|
+
#
|
|
81
|
+
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Facebook, nil]
|
|
82
|
+
optional :facebook, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Facebook }
|
|
83
|
+
|
|
44
84
|
# @!attribute instagram
|
|
45
85
|
# Additional data for connecting instagram accounts
|
|
46
86
|
#
|
|
@@ -53,14 +93,57 @@ module PostForMe
|
|
|
53
93
|
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin, nil]
|
|
54
94
|
optional :linkedin, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin }
|
|
55
95
|
|
|
56
|
-
# @!
|
|
96
|
+
# @!attribute pinterest
|
|
97
|
+
# Additional data for connecting Pinterest accounts
|
|
98
|
+
#
|
|
99
|
+
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Pinterest, nil]
|
|
100
|
+
optional :pinterest, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Pinterest }
|
|
101
|
+
|
|
102
|
+
# @!attribute threads
|
|
103
|
+
# Additional data for connecting Threads accounts
|
|
104
|
+
#
|
|
105
|
+
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Threads, nil]
|
|
106
|
+
optional :threads, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Threads }
|
|
107
|
+
|
|
108
|
+
# @!attribute tiktok
|
|
109
|
+
# Additional data for connecting TikTok accounts
|
|
110
|
+
#
|
|
111
|
+
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Tiktok, nil]
|
|
112
|
+
optional :tiktok, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Tiktok }
|
|
113
|
+
|
|
114
|
+
# @!attribute tiktok_business
|
|
115
|
+
# Additional data for connecting TikTok Business accounts
|
|
116
|
+
#
|
|
117
|
+
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::TiktokBusiness, nil]
|
|
118
|
+
optional :tiktok_business,
|
|
119
|
+
-> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::TiktokBusiness }
|
|
120
|
+
|
|
121
|
+
# @!attribute youtube
|
|
122
|
+
# Additional data for connecting YouTube accounts
|
|
123
|
+
#
|
|
124
|
+
# @return [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Youtube, nil]
|
|
125
|
+
optional :youtube, -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Youtube }
|
|
126
|
+
|
|
127
|
+
# @!method initialize(bluesky: nil, facebook: nil, instagram: nil, linkedin: nil, pinterest: nil, threads: nil, tiktok: nil, tiktok_business: nil, youtube: nil)
|
|
57
128
|
# Additional data needed for the provider
|
|
58
129
|
#
|
|
59
130
|
# @param bluesky [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Bluesky] Additional data needed for connecting bluesky accounts
|
|
60
131
|
#
|
|
132
|
+
# @param facebook [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Facebook] Additional data for connecting facebook accounts
|
|
133
|
+
#
|
|
61
134
|
# @param instagram [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram] Additional data for connecting instagram accounts
|
|
62
135
|
#
|
|
63
136
|
# @param linkedin [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin] Additional data for connecting linkedin accounts
|
|
137
|
+
#
|
|
138
|
+
# @param pinterest [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Pinterest] Additional data for connecting Pinterest accounts
|
|
139
|
+
#
|
|
140
|
+
# @param threads [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Threads] Additional data for connecting Threads accounts
|
|
141
|
+
#
|
|
142
|
+
# @param tiktok [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Tiktok] Additional data for connecting TikTok accounts
|
|
143
|
+
#
|
|
144
|
+
# @param tiktok_business [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::TiktokBusiness] Additional data for connecting TikTok Business accounts
|
|
145
|
+
#
|
|
146
|
+
# @param youtube [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Youtube] Additional data for connecting YouTube accounts
|
|
64
147
|
|
|
65
148
|
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#bluesky
|
|
66
149
|
class Bluesky < PostForMe::Internal::Type::BaseModel
|
|
@@ -84,6 +167,27 @@ module PostForMe
|
|
|
84
167
|
# @param handle [String] The handle of the account
|
|
85
168
|
end
|
|
86
169
|
|
|
170
|
+
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#facebook
|
|
171
|
+
class Facebook < PostForMe::Internal::Type::BaseModel
|
|
172
|
+
# @!attribute permission_overrides
|
|
173
|
+
# Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
174
|
+
# public_profile, pages_show_list, pages_read_engagement, pages_manage_posts,
|
|
175
|
+
# business_management
|
|
176
|
+
#
|
|
177
|
+
# @return [Array<Array<Object>>, nil]
|
|
178
|
+
optional :permission_overrides,
|
|
179
|
+
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]
|
|
180
|
+
|
|
181
|
+
# @!method initialize(permission_overrides: nil)
|
|
182
|
+
# Some parameter documentations has been truncated, see
|
|
183
|
+
# {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Facebook}
|
|
184
|
+
# for more details.
|
|
185
|
+
#
|
|
186
|
+
# Additional data for connecting facebook accounts
|
|
187
|
+
#
|
|
188
|
+
# @param permission_overrides [Array<Array<Object>>] Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
189
|
+
end
|
|
190
|
+
|
|
87
191
|
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#instagram
|
|
88
192
|
class Instagram < PostForMe::Internal::Type::BaseModel
|
|
89
193
|
# @!attribute connection_type
|
|
@@ -94,7 +198,17 @@ module PostForMe
|
|
|
94
198
|
required :connection_type,
|
|
95
199
|
enum: -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType }
|
|
96
200
|
|
|
97
|
-
# @!
|
|
201
|
+
# @!attribute permission_overrides
|
|
202
|
+
# Override the default permissions/scopes requested during OAuth. Default
|
|
203
|
+
# instagram scopes: instagram_business_basic, instagram_business_content_publish.
|
|
204
|
+
# Default facebook scopes: instagram_basic, instagram_content_publish,
|
|
205
|
+
# pages_show_list, public_profile, business_management
|
|
206
|
+
#
|
|
207
|
+
# @return [Array<Array<Object>>, nil]
|
|
208
|
+
optional :permission_overrides,
|
|
209
|
+
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]
|
|
210
|
+
|
|
211
|
+
# @!method initialize(connection_type:, permission_overrides: nil)
|
|
98
212
|
# Some parameter documentations has been truncated, see
|
|
99
213
|
# {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram}
|
|
100
214
|
# for more details.
|
|
@@ -102,6 +216,8 @@ module PostForMe
|
|
|
102
216
|
# Additional data for connecting instagram accounts
|
|
103
217
|
#
|
|
104
218
|
# @param connection_type [Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Instagram::ConnectionType] The type of connection; instagram for using login with instagram, facebook for u
|
|
219
|
+
#
|
|
220
|
+
# @param permission_overrides [Array<Array<Object>>] Override the default permissions/scopes requested during OAuth. Default instagra
|
|
105
221
|
|
|
106
222
|
# The type of connection; instagram for using login with instagram, facebook for
|
|
107
223
|
# using login with facebook.
|
|
@@ -121,24 +237,38 @@ module PostForMe
|
|
|
121
237
|
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#linkedin
|
|
122
238
|
class Linkedin < PostForMe::Internal::Type::BaseModel
|
|
123
239
|
# @!attribute connection_type
|
|
124
|
-
# The type of connection;
|
|
125
|
-
# organization
|
|
240
|
+
# The type of connection; If using our provided credentials always use
|
|
241
|
+
# "organization". If using your own crednetials then only use "organization" if
|
|
242
|
+
# you are using the Community API
|
|
126
243
|
#
|
|
127
244
|
# @return [Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType]
|
|
128
245
|
required :connection_type,
|
|
129
246
|
enum: -> { PostForMe::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType }
|
|
130
247
|
|
|
131
|
-
# @!
|
|
248
|
+
# @!attribute permission_overrides
|
|
249
|
+
# Override the default permissions/scopes requested during OAuth. Default personal
|
|
250
|
+
# scopes: openid, w_member_social, profile, email. Default organization scopes:
|
|
251
|
+
# r_basicprofile, w_member_social, r_organization_social, w_organization_social,
|
|
252
|
+
# rw_organization_admin
|
|
253
|
+
#
|
|
254
|
+
# @return [Array<Array<Object>>, nil]
|
|
255
|
+
optional :permission_overrides,
|
|
256
|
+
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]
|
|
257
|
+
|
|
258
|
+
# @!method initialize(connection_type:, permission_overrides: nil)
|
|
132
259
|
# Some parameter documentations has been truncated, see
|
|
133
260
|
# {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin}
|
|
134
261
|
# for more details.
|
|
135
262
|
#
|
|
136
263
|
# Additional data for connecting linkedin accounts
|
|
137
264
|
#
|
|
138
|
-
# @param connection_type [Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType] The type of connection;
|
|
265
|
+
# @param connection_type [Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin::ConnectionType] The type of connection; If using our provided credentials always use "organizati
|
|
266
|
+
#
|
|
267
|
+
# @param permission_overrides [Array<Array<Object>>] Override the default permissions/scopes requested during OAuth. Default personal
|
|
139
268
|
|
|
140
|
-
# The type of connection;
|
|
141
|
-
# organization
|
|
269
|
+
# The type of connection; If using our provided credentials always use
|
|
270
|
+
# "organization". If using your own crednetials then only use "organization" if
|
|
271
|
+
# you are using the Community API
|
|
142
272
|
#
|
|
143
273
|
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Linkedin#connection_type
|
|
144
274
|
module ConnectionType
|
|
@@ -151,6 +281,112 @@ module PostForMe
|
|
|
151
281
|
# @return [Array<Symbol>]
|
|
152
282
|
end
|
|
153
283
|
end
|
|
284
|
+
|
|
285
|
+
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#pinterest
|
|
286
|
+
class Pinterest < PostForMe::Internal::Type::BaseModel
|
|
287
|
+
# @!attribute permission_overrides
|
|
288
|
+
# Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
289
|
+
# boards:read, boards:write, pins:read, pins:write, user_accounts:read
|
|
290
|
+
#
|
|
291
|
+
# @return [Array<Array<Object>>, nil]
|
|
292
|
+
optional :permission_overrides,
|
|
293
|
+
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]
|
|
294
|
+
|
|
295
|
+
# @!method initialize(permission_overrides: nil)
|
|
296
|
+
# Some parameter documentations has been truncated, see
|
|
297
|
+
# {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Pinterest}
|
|
298
|
+
# for more details.
|
|
299
|
+
#
|
|
300
|
+
# Additional data for connecting Pinterest accounts
|
|
301
|
+
#
|
|
302
|
+
# @param permission_overrides [Array<Array<Object>>] Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#threads
|
|
306
|
+
class Threads < PostForMe::Internal::Type::BaseModel
|
|
307
|
+
# @!attribute permission_overrides
|
|
308
|
+
# Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
309
|
+
# threads_basic, threads_content_publish
|
|
310
|
+
#
|
|
311
|
+
# @return [Array<Array<Object>>, nil]
|
|
312
|
+
optional :permission_overrides,
|
|
313
|
+
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]
|
|
314
|
+
|
|
315
|
+
# @!method initialize(permission_overrides: nil)
|
|
316
|
+
# Some parameter documentations has been truncated, see
|
|
317
|
+
# {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Threads} for
|
|
318
|
+
# more details.
|
|
319
|
+
#
|
|
320
|
+
# Additional data for connecting Threads accounts
|
|
321
|
+
#
|
|
322
|
+
# @param permission_overrides [Array<Array<Object>>] Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#tiktok
|
|
326
|
+
class Tiktok < PostForMe::Internal::Type::BaseModel
|
|
327
|
+
# @!attribute permission_overrides
|
|
328
|
+
# Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
329
|
+
# user.info.basic, video.list, video.upload, video.publish
|
|
330
|
+
#
|
|
331
|
+
# @return [Array<Array<Object>>, nil]
|
|
332
|
+
optional :permission_overrides,
|
|
333
|
+
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]
|
|
334
|
+
|
|
335
|
+
# @!method initialize(permission_overrides: nil)
|
|
336
|
+
# Some parameter documentations has been truncated, see
|
|
337
|
+
# {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Tiktok} for
|
|
338
|
+
# more details.
|
|
339
|
+
#
|
|
340
|
+
# Additional data for connecting TikTok accounts
|
|
341
|
+
#
|
|
342
|
+
# @param permission_overrides [Array<Array<Object>>] Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#tiktok_business
|
|
346
|
+
class TiktokBusiness < PostForMe::Internal::Type::BaseModel
|
|
347
|
+
# @!attribute permission_overrides
|
|
348
|
+
# Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
349
|
+
# user.info.basic, user.info.username, user.info.stats, user.info.profile,
|
|
350
|
+
# user.account.type, user.insights, video.list, video.insights, comment.list,
|
|
351
|
+
# comment.list.manage, video.publish, video.upload, biz.spark.auth,
|
|
352
|
+
# discovery.search.words
|
|
353
|
+
#
|
|
354
|
+
# @return [Array<Array<Object>>, nil]
|
|
355
|
+
optional :permission_overrides,
|
|
356
|
+
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]
|
|
357
|
+
|
|
358
|
+
# @!method initialize(permission_overrides: nil)
|
|
359
|
+
# Some parameter documentations has been truncated, see
|
|
360
|
+
# {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::TiktokBusiness}
|
|
361
|
+
# for more details.
|
|
362
|
+
#
|
|
363
|
+
# Additional data for connecting TikTok Business accounts
|
|
364
|
+
#
|
|
365
|
+
# @param permission_overrides [Array<Array<Object>>] Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# @see PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData#youtube
|
|
369
|
+
class Youtube < PostForMe::Internal::Type::BaseModel
|
|
370
|
+
# @!attribute permission_overrides
|
|
371
|
+
# Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
372
|
+
# https://www.googleapis.com/auth/youtube.force-ssl,
|
|
373
|
+
# https://www.googleapis.com/auth/youtube.upload,
|
|
374
|
+
# https://www.googleapis.com/auth/youtube.readonly,
|
|
375
|
+
# https://www.googleapis.com/auth/userinfo.profile
|
|
376
|
+
#
|
|
377
|
+
# @return [Array<Array<Object>>, nil]
|
|
378
|
+
optional :permission_overrides,
|
|
379
|
+
PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::ArrayOf[PostForMe::Internal::Type::Unknown]]
|
|
380
|
+
|
|
381
|
+
# @!method initialize(permission_overrides: nil)
|
|
382
|
+
# Some parameter documentations has been truncated, see
|
|
383
|
+
# {PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData::Youtube} for
|
|
384
|
+
# more details.
|
|
385
|
+
#
|
|
386
|
+
# Additional data for connecting YouTube accounts
|
|
387
|
+
#
|
|
388
|
+
# @param permission_overrides [Array<Array<Object>>] Override the default permissions/scopes requested during OAuth. Default scopes:
|
|
389
|
+
end
|
|
154
390
|
end
|
|
155
391
|
end
|
|
156
392
|
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialAccountFeeds#list
|
|
6
|
+
class SocialAccountFeedListParams < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
extend PostForMe::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include PostForMe::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute cursor
|
|
11
|
+
# Cursor identifying next page of results
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :cursor, String
|
|
15
|
+
|
|
16
|
+
# @!attribute expand
|
|
17
|
+
# Expand additional data in the response. Currently supports: "metrics" to include
|
|
18
|
+
# post analytics data.
|
|
19
|
+
#
|
|
20
|
+
# @return [Array<Symbol, PostForMe::Models::SocialAccountFeedListParams::Expand>, nil]
|
|
21
|
+
optional :expand,
|
|
22
|
+
-> { PostForMe::Internal::Type::ArrayOf[enum: PostForMe::SocialAccountFeedListParams::Expand] }
|
|
23
|
+
|
|
24
|
+
# @!attribute external_post_id
|
|
25
|
+
# Filter by Post for Me Social Postexternal ID. Multiple values imply OR logic
|
|
26
|
+
# (e.g., ?external_post_id=xxxxxx&external_post_id=yyyyyy).
|
|
27
|
+
#
|
|
28
|
+
# @return [Array<String>, nil]
|
|
29
|
+
optional :external_post_id, PostForMe::Internal::Type::ArrayOf[String]
|
|
30
|
+
|
|
31
|
+
# @!attribute limit
|
|
32
|
+
# Number of items to return; Note: some platforms will have different max limits,
|
|
33
|
+
# in the case the provided limit is over the platform's limit we will return the
|
|
34
|
+
# max allowed by the platform.
|
|
35
|
+
#
|
|
36
|
+
# @return [Float, nil]
|
|
37
|
+
optional :limit, Float
|
|
38
|
+
|
|
39
|
+
# @!attribute platform_post_id
|
|
40
|
+
# Filter by the platform's id(s). Multiple values imply OR logic (e.g.,
|
|
41
|
+
# ?social_post_id=spr_xxxxxx&social_post_id=spr_yyyyyy).
|
|
42
|
+
#
|
|
43
|
+
# @return [Array<String>, nil]
|
|
44
|
+
optional :platform_post_id, PostForMe::Internal::Type::ArrayOf[String]
|
|
45
|
+
|
|
46
|
+
# @!attribute social_post_id
|
|
47
|
+
# Filter by Post for Me Social Post id(s). Multiple values imply OR logic (e.g.,
|
|
48
|
+
# ?social_post_id=sp_xxxxxx&social_post_id=sp_yyyyyy).
|
|
49
|
+
#
|
|
50
|
+
# @return [Array<String>, nil]
|
|
51
|
+
optional :social_post_id, PostForMe::Internal::Type::ArrayOf[String]
|
|
52
|
+
|
|
53
|
+
# @!method initialize(cursor: nil, expand: nil, external_post_id: nil, limit: nil, platform_post_id: nil, social_post_id: nil, request_options: {})
|
|
54
|
+
# Some parameter documentations has been truncated, see
|
|
55
|
+
# {PostForMe::Models::SocialAccountFeedListParams} for more details.
|
|
56
|
+
#
|
|
57
|
+
# @param cursor [String] Cursor identifying next page of results
|
|
58
|
+
#
|
|
59
|
+
# @param expand [Array<Symbol, PostForMe::Models::SocialAccountFeedListParams::Expand>] Expand additional data in the response. Currently supports: "metrics" to include
|
|
60
|
+
#
|
|
61
|
+
# @param external_post_id [Array<String>] Filter by Post for Me Social Postexternal ID. Multiple values imply OR logic (e.
|
|
62
|
+
#
|
|
63
|
+
# @param limit [Float] Number of items to return; Note: some platforms will have different max limits,
|
|
64
|
+
#
|
|
65
|
+
# @param platform_post_id [Array<String>] Filter by the platform's id(s). Multiple values imply OR logic (e.g., ?social_po
|
|
66
|
+
#
|
|
67
|
+
# @param social_post_id [Array<String>] Filter by Post for Me Social Post id(s). Multiple values imply OR logic (e.g., ?
|
|
68
|
+
#
|
|
69
|
+
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}]
|
|
70
|
+
|
|
71
|
+
module Expand
|
|
72
|
+
extend PostForMe::Internal::Type::Enum
|
|
73
|
+
|
|
74
|
+
METRICS = :metrics
|
|
75
|
+
|
|
76
|
+
# @!method self.values
|
|
77
|
+
# @return [Array<Symbol>]
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Models
|
|
5
|
+
# @see PostForMe::Resources::SocialAccountFeeds#list
|
|
6
|
+
class SocialAccountFeedListResponse < PostForMe::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<PostForMe::Models::PlatformPost>]
|
|
10
|
+
required :data, -> { PostForMe::Internal::Type::ArrayOf[PostForMe::PlatformPost] }
|
|
11
|
+
|
|
12
|
+
# @!attribute meta
|
|
13
|
+
#
|
|
14
|
+
# @return [PostForMe::Models::SocialAccountFeedListResponse::Meta]
|
|
15
|
+
required :meta, -> { PostForMe::Models::SocialAccountFeedListResponse::Meta }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(data:, meta:)
|
|
18
|
+
# @param data [Array<PostForMe::Models::PlatformPost>]
|
|
19
|
+
# @param meta [PostForMe::Models::SocialAccountFeedListResponse::Meta]
|
|
20
|
+
|
|
21
|
+
# @see PostForMe::Models::SocialAccountFeedListResponse#meta
|
|
22
|
+
class Meta < PostForMe::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute cursor
|
|
24
|
+
# Id representing the next page of items
|
|
25
|
+
#
|
|
26
|
+
# @return [String]
|
|
27
|
+
required :cursor, String
|
|
28
|
+
|
|
29
|
+
# @!attribute limit
|
|
30
|
+
# Maximum number of items returned.
|
|
31
|
+
#
|
|
32
|
+
# @return [Float]
|
|
33
|
+
required :limit, Float
|
|
34
|
+
|
|
35
|
+
# @!attribute next_
|
|
36
|
+
# URL to the next page of results, or null if none.
|
|
37
|
+
#
|
|
38
|
+
# @return [String, nil]
|
|
39
|
+
required :next_, String, api_name: :next, nil?: true
|
|
40
|
+
|
|
41
|
+
# @!attribute has_more
|
|
42
|
+
# Indicates if there are more results or not
|
|
43
|
+
#
|
|
44
|
+
# @return [Boolean, nil]
|
|
45
|
+
optional :has_more, PostForMe::Internal::Type::Boolean
|
|
46
|
+
|
|
47
|
+
# @!method initialize(cursor:, limit:, next_:, has_more: nil)
|
|
48
|
+
# @param cursor [String] Id representing the next page of items
|
|
49
|
+
#
|
|
50
|
+
# @param limit [Float] Maximum number of items returned.
|
|
51
|
+
#
|
|
52
|
+
# @param next_ [String, nil] URL to the next page of results, or null if none.
|
|
53
|
+
#
|
|
54
|
+
# @param has_more [Boolean] Indicates if there are more results or not
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
data/lib/post_for_me/models.rb
CHANGED
|
@@ -55,6 +55,8 @@ module PostForMe
|
|
|
55
55
|
|
|
56
56
|
PlatformConfigurationsDto = PostForMe::Models::PlatformConfigurationsDto
|
|
57
57
|
|
|
58
|
+
PlatformPost = PostForMe::Models::PlatformPost
|
|
59
|
+
|
|
58
60
|
SocialAccount = PostForMe::Models::SocialAccount
|
|
59
61
|
|
|
60
62
|
SocialAccountCreateAuthURLParams = PostForMe::Models::SocialAccountCreateAuthURLParams
|
|
@@ -63,6 +65,8 @@ module PostForMe
|
|
|
63
65
|
|
|
64
66
|
SocialAccountDisconnectParams = PostForMe::Models::SocialAccountDisconnectParams
|
|
65
67
|
|
|
68
|
+
SocialAccountFeedListParams = PostForMe::Models::SocialAccountFeedListParams
|
|
69
|
+
|
|
66
70
|
SocialAccountListParams = PostForMe::Models::SocialAccountListParams
|
|
67
71
|
|
|
68
72
|
SocialAccountRetrieveParams = PostForMe::Models::SocialAccountRetrieveParams
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PostForMe
|
|
4
|
+
module Resources
|
|
5
|
+
class SocialAccountFeeds
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {PostForMe::Models::SocialAccountFeedListParams} for more details.
|
|
8
|
+
#
|
|
9
|
+
# Get a paginated result for the social account based on the applied filters
|
|
10
|
+
#
|
|
11
|
+
# @overload list(social_account_id, cursor: nil, expand: nil, external_post_id: nil, limit: nil, platform_post_id: nil, social_post_id: nil, request_options: {})
|
|
12
|
+
#
|
|
13
|
+
# @param social_account_id [String] Social Account ID
|
|
14
|
+
#
|
|
15
|
+
# @param cursor [String] Cursor identifying next page of results
|
|
16
|
+
#
|
|
17
|
+
# @param expand [Array<Symbol, PostForMe::Models::SocialAccountFeedListParams::Expand>] Expand additional data in the response. Currently supports: "metrics" to include
|
|
18
|
+
#
|
|
19
|
+
# @param external_post_id [Array<String>] Filter by Post for Me Social Postexternal ID. Multiple values imply OR logic (e.
|
|
20
|
+
#
|
|
21
|
+
# @param limit [Float] Number of items to return; Note: some platforms will have different max limits,
|
|
22
|
+
#
|
|
23
|
+
# @param platform_post_id [Array<String>] Filter by the platform's id(s). Multiple values imply OR logic (e.g., ?social_po
|
|
24
|
+
#
|
|
25
|
+
# @param social_post_id [Array<String>] Filter by Post for Me Social Post id(s). Multiple values imply OR logic (e.g., ?
|
|
26
|
+
#
|
|
27
|
+
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
28
|
+
#
|
|
29
|
+
# @return [PostForMe::Models::SocialAccountFeedListResponse]
|
|
30
|
+
#
|
|
31
|
+
# @see PostForMe::Models::SocialAccountFeedListParams
|
|
32
|
+
def list(social_account_id, params = {})
|
|
33
|
+
parsed, options = PostForMe::SocialAccountFeedListParams.dump_request(params)
|
|
34
|
+
@client.request(
|
|
35
|
+
method: :get,
|
|
36
|
+
path: ["v1/social-account-feeds/%1$s", social_account_id],
|
|
37
|
+
query: parsed,
|
|
38
|
+
model: PostForMe::Models::SocialAccountFeedListResponse,
|
|
39
|
+
options: options
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# @api private
|
|
44
|
+
#
|
|
45
|
+
# @param client [PostForMe::Client]
|
|
46
|
+
def initialize(client:)
|
|
47
|
+
@client = client
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -123,19 +123,26 @@ module PostForMe
|
|
|
123
123
|
)
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
+
# Some parameter documentations has been truncated, see
|
|
127
|
+
# {PostForMe::Models::SocialAccountCreateAuthURLParams} for more details.
|
|
128
|
+
#
|
|
126
129
|
# Generates a URL that initiates the authentication flow for a user's social media
|
|
127
130
|
# account. When visited, the user is redirected to the selected social platform's
|
|
128
131
|
# login/authorization page. Upon successful authentication, they are redirected
|
|
129
132
|
# back to your application
|
|
130
133
|
#
|
|
131
|
-
# @overload create_auth_url(platform:, external_id: nil, platform_data: nil, request_options: {})
|
|
134
|
+
# @overload create_auth_url(platform:, external_id: nil, permissions: nil, platform_data: nil, redirect_url_override: nil, request_options: {})
|
|
132
135
|
#
|
|
133
136
|
# @param platform [String] The social account provider
|
|
134
137
|
#
|
|
135
138
|
# @param external_id [String] Your unique identifier for the social account
|
|
136
139
|
#
|
|
140
|
+
# @param permissions [Array<Symbol, PostForMe::Models::SocialAccountCreateAuthURLParams::Permission>] List of permissions you want to allow. Will default to only post permissions. Yo
|
|
141
|
+
#
|
|
137
142
|
# @param platform_data [PostForMe::Models::SocialAccountCreateAuthURLParams::PlatformData] Additional data needed for the provider
|
|
138
143
|
#
|
|
144
|
+
# @param redirect_url_override [String] Override the default redirect URL for the OAuth flow. If provided, this URL will
|
|
145
|
+
#
|
|
139
146
|
# @param request_options [PostForMe::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
140
147
|
#
|
|
141
148
|
# @return [PostForMe::Models::SocialAccountCreateAuthURLResponse]
|
data/lib/post_for_me/version.rb
CHANGED
data/lib/post_for_me.rb
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# Standard libraries.
|
|
4
4
|
# rubocop:disable Lint/RedundantRequireStatement
|
|
5
5
|
require "English"
|
|
6
|
+
require "base64"
|
|
6
7
|
require "cgi"
|
|
7
8
|
require "date"
|
|
8
9
|
require "erb"
|
|
@@ -60,12 +61,15 @@ require_relative "post_for_me/models/media_create_upload_url_params"
|
|
|
60
61
|
require_relative "post_for_me/models/media_create_upload_url_response"
|
|
61
62
|
require_relative "post_for_me/models/pinterest_configuration_dto"
|
|
62
63
|
require_relative "post_for_me/models/platform_configurations_dto"
|
|
64
|
+
require_relative "post_for_me/models/platform_post"
|
|
63
65
|
require_relative "post_for_me/models/social_account"
|
|
64
66
|
require_relative "post_for_me/models/social_account_create_auth_url_params"
|
|
65
67
|
require_relative "post_for_me/models/social_account_create_auth_url_response"
|
|
66
68
|
require_relative "post_for_me/models/social_account_create_params"
|
|
67
69
|
require_relative "post_for_me/models/social_account_disconnect_params"
|
|
68
70
|
require_relative "post_for_me/models/social_account_disconnect_response"
|
|
71
|
+
require_relative "post_for_me/models/social_account_feed_list_params"
|
|
72
|
+
require_relative "post_for_me/models/social_account_feed_list_response"
|
|
69
73
|
require_relative "post_for_me/models/social_account_list_params"
|
|
70
74
|
require_relative "post_for_me/models/social_account_list_response"
|
|
71
75
|
require_relative "post_for_me/models/social_account_retrieve_params"
|
|
@@ -88,6 +92,7 @@ require_relative "post_for_me/models/twitter_configuration_dto"
|
|
|
88
92
|
require_relative "post_for_me/models/youtube_configuration_dto"
|
|
89
93
|
require_relative "post_for_me/models"
|
|
90
94
|
require_relative "post_for_me/resources/media"
|
|
95
|
+
require_relative "post_for_me/resources/social_account_feeds"
|
|
91
96
|
require_relative "post_for_me/resources/social_accounts"
|
|
92
97
|
require_relative "post_for_me/resources/social_post_results"
|
|
93
98
|
require_relative "post_for_me/resources/social_posts"
|
data/manifest.yaml
CHANGED
data/rbi/post_for_me/client.rbi
CHANGED
|
@@ -25,6 +25,9 @@ module PostForMe
|
|
|
25
25
|
sig { returns(PostForMe::Resources::SocialAccounts) }
|
|
26
26
|
attr_reader :social_accounts
|
|
27
27
|
|
|
28
|
+
sig { returns(PostForMe::Resources::SocialAccountFeeds) }
|
|
29
|
+
attr_reader :social_account_feeds
|
|
30
|
+
|
|
28
31
|
# @api private
|
|
29
32
|
sig { override.returns(T::Hash[String, String]) }
|
|
30
33
|
private def auth_headers
|