post-for-me 0.1.0.pre.alpha.9 → 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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -0
  3. data/README.md +1 -1
  4. data/lib/post_for_me/client.rb +4 -0
  5. data/lib/post_for_me/internal/transport/base_client.rb +7 -1
  6. data/lib/post_for_me/internal/transport/pooled_net_requester.rb +38 -26
  7. data/lib/post_for_me/internal/util.rb +12 -7
  8. data/lib/post_for_me/models/platform_post.rb +843 -0
  9. data/lib/post_for_me/models/social_account.rb +9 -1
  10. data/lib/post_for_me/models/social_account_create_auth_url_params.rb +245 -9
  11. data/lib/post_for_me/models/social_account_disconnect_response.rb +9 -1
  12. data/lib/post_for_me/models/social_account_feed_list_params.rb +81 -0
  13. data/lib/post_for_me/models/social_account_feed_list_response.rb +58 -0
  14. data/lib/post_for_me/models.rb +4 -0
  15. data/lib/post_for_me/resources/social_account_feeds.rb +51 -0
  16. data/lib/post_for_me/resources/social_accounts.rb +8 -1
  17. data/lib/post_for_me/version.rb +1 -1
  18. data/lib/post_for_me.rb +6 -0
  19. data/manifest.yaml +2 -0
  20. data/rbi/post_for_me/client.rbi +3 -0
  21. data/rbi/post_for_me/internal/transport/base_client.rbi +5 -0
  22. data/rbi/post_for_me/internal/transport/pooled_net_requester.rbi +6 -2
  23. data/rbi/post_for_me/internal/type/base_model.rbi +8 -4
  24. data/rbi/post_for_me/models/platform_post.rbi +1287 -0
  25. data/rbi/post_for_me/models/social_account.rbi +8 -0
  26. data/rbi/post_for_me/models/social_account_create_auth_url_params.rbi +545 -15
  27. data/rbi/post_for_me/models/social_account_disconnect_response.rbi +8 -0
  28. data/rbi/post_for_me/models/social_account_feed_list_params.rbi +157 -0
  29. data/rbi/post_for_me/models/social_account_feed_list_response.rbi +110 -0
  30. data/rbi/post_for_me/models.rbi +4 -0
  31. data/rbi/post_for_me/resources/social_account_feeds.rbi +51 -0
  32. data/rbi/post_for_me/resources/social_accounts.rbi +13 -0
  33. data/sig/post_for_me/client.rbs +2 -0
  34. data/sig/post_for_me/internal/transport/base_client.rbs +2 -0
  35. data/sig/post_for_me/internal/transport/pooled_net_requester.rbs +4 -1
  36. data/sig/post_for_me/models/platform_post.rbs +660 -0
  37. data/sig/post_for_me/models/social_account.rbs +5 -0
  38. data/sig/post_for_me/models/social_account_create_auth_url_params.rbs +193 -10
  39. data/sig/post_for_me/models/social_account_disconnect_response.rbs +5 -0
  40. data/sig/post_for_me/models/social_account_feed_list_params.rbs +75 -0
  41. data/sig/post_for_me/models/social_account_feed_list_response.rbs +54 -0
  42. data/sig/post_for_me/models.rbs +4 -0
  43. data/sig/post_for_me/resources/social_account_feeds.rbs +18 -0
  44. data/sig/post_for_me/resources/social_accounts.rbs +2 -0
  45. metadata +14 -2
@@ -40,6 +40,12 @@ module PostForMe
40
40
  # @return [String]
41
41
  required :platform, String
42
42
 
43
+ # @!attribute profile_photo_url
44
+ # The platform's profile photo of the social account
45
+ #
46
+ # @return [String, nil]
47
+ required :profile_photo_url, String, nil?: true
48
+
43
49
  # @!attribute refresh_token
44
50
  # The refresh token of the social account
45
51
  #
@@ -70,7 +76,7 @@ module PostForMe
70
76
  # @return [String, nil]
71
77
  required :username, String, nil?: true
72
78
 
73
- # @!method initialize(id:, access_token:, access_token_expires_at:, external_id:, metadata:, platform:, refresh_token:, refresh_token_expires_at:, status:, user_id:, username:)
79
+ # @!method initialize(id:, access_token:, access_token_expires_at:, external_id:, metadata:, platform:, profile_photo_url:, refresh_token:, refresh_token_expires_at:, status:, user_id:, username:)
74
80
  # @param id [String] The unique identifier of the social account
75
81
  #
76
82
  # @param access_token [String] The access token of the social account
@@ -83,6 +89,8 @@ module PostForMe
83
89
  #
84
90
  # @param platform [String] The platform of the social account
85
91
  #
92
+ # @param profile_photo_url [String, nil] The platform's profile photo of the social account
93
+ #
86
94
  # @param refresh_token [String, nil] The refresh token of the social account
87
95
  #
88
96
  # @param refresh_token_expires_at [Time, nil] The refresh token expiration date of the social account
@@ -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
- # @!method initialize(platform:, external_id: nil, platform_data: nil, request_options: {})
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
- # @!method initialize(bluesky: nil, instagram: nil, linkedin: nil)
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
- # @!method initialize(connection_type:)
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; personal for posting on behalf of the user only,
125
- # organization for posting on behalf of both an organization and the user
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
- # @!method initialize(connection_type:)
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; personal for posting on behalf of the user only, organiz
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; personal for posting on behalf of the user only,
141
- # organization for posting on behalf of both an organization and the user
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
@@ -40,6 +40,12 @@ module PostForMe
40
40
  # @return [String]
41
41
  required :platform, String
42
42
 
43
+ # @!attribute profile_photo_url
44
+ # The platform's profile photo of the social account
45
+ #
46
+ # @return [String, nil]
47
+ required :profile_photo_url, String, nil?: true
48
+
43
49
  # @!attribute refresh_token
44
50
  # The refresh token of the social account
45
51
  #
@@ -70,7 +76,7 @@ module PostForMe
70
76
  # @return [String, nil]
71
77
  required :username, String, nil?: true
72
78
 
73
- # @!method initialize(id:, access_token:, access_token_expires_at:, external_id:, metadata:, platform:, refresh_token:, refresh_token_expires_at:, status:, user_id:, username:)
79
+ # @!method initialize(id:, access_token:, access_token_expires_at:, external_id:, metadata:, platform:, profile_photo_url:, refresh_token:, refresh_token_expires_at:, status:, user_id:, username:)
74
80
  # @param id [String] The unique identifier of the social account
75
81
  #
76
82
  # @param access_token [String] The access token of the social account
@@ -83,6 +89,8 @@ module PostForMe
83
89
  #
84
90
  # @param platform [String] The platform of the social account
85
91
  #
92
+ # @param profile_photo_url [String, nil] The platform's profile photo of the social account
93
+ #
86
94
  # @param refresh_token [String, nil] The refresh token of the social account
87
95
  #
88
96
  # @param refresh_token_expires_at [Time, nil] The refresh token expiration date of the social account
@@ -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
@@ -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]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostForMe
4
- VERSION = "0.1.0.pre.alpha.9"
4
+ VERSION = "0.1.0.pre.alpha.11"
5
5
  end