login_radius 11.4.0 → 11.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0f37dbd647854caec292ac3a27dae1cc46f379843a34f56c923bd92db81e294
4
- data.tar.gz: cd9f01b10e3f61b63ff6dc8938856a35622f73399b5509b0986f3b4d76d93a5c
3
+ metadata.gz: 66071d9d5c213e74d3f309fabf3898c63a4b0c293463844768bc4cfa36cc4f07
4
+ data.tar.gz: 64f7cdcb18af5b3fc5e86f7f495cc12f3ffac0de09ddb8968c466195ef37a692
5
5
  SHA512:
6
- metadata.gz: 40f3b4f32ab8fd4e634060e35f3de1c3e3da90f27d6db2fd3f6a51a38f75ca02100f784ca8ecfd41e38fb5e6e9dad749b8038017ab91eacf322d418bc20bb06e
7
- data.tar.gz: 295da43200cbcbb3d5167386ec9bb67871ce2ba85af8daa49fd8d5cb915c0248bca2d762951c9e0fb90ad2c5b5686cc753ab0c16701909758eadbf5f76502c63
6
+ metadata.gz: d02b4380871be4b414e26e126f55316b8da36c1ea41b7ba8f97006486f7aaa3e8f0fbe802f3cbd0e06367aedc30803baddf0b0bd7e0f37b638d69bcc4917c202
7
+ data.tar.gz: 8267490c4f872ee9f87a08683975ed4e572959790f9cb971c6e9c2db086c4755c06a7ad2bf75fbabf2fb655a13e5bbe975b1beaf6ac9182bc1cc9bb4eec2db20
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Install the SDK by adding LoginRadius to your application's `Gemfile`.
4
4
 
5
5
  ```shell
6
- gem 'login_radius', '~> 11.4.0'
6
+ gem 'login_radius', '~> 11.5.0'
7
7
  ```
8
8
 
9
9
  Then, run `$ bundle`. A copy of the SDK can also be found on our [Github](https://github.com/LoginRadius/ruby-on-rails-gem/tree/master).
@@ -36,7 +36,6 @@ require 'login_radius'
36
36
  ::ConfigurationApi = LoginRadius::ConfigurationApi.new
37
37
  ::ConsentManagementApi = LoginRadius::ConsentManagementApi.new
38
38
  ::CustomObjectApi = LoginRadius::CustomObjectApi.new
39
- ::CustomRegistrationDataApi = LoginRadius::CustomRegistrationDataApi.new
40
39
  ::MultiFactorAuthenticationApi = LoginRadius::MultiFactorAuthenticationApi.new
41
40
  ::ReAuthenticationApi = LoginRadius::ReAuthenticationApi.new
42
41
  ::WebHookApi = LoginRadius::WebHookApi.new
@@ -292,10 +292,11 @@ module LoginRadius
292
292
  # @param sms_template - SMS Template name
293
293
  # @param verification_url - Email verification url
294
294
  # @param welcome_email_template - Name of the welcome email template
295
+ # @param email_template - Name of the email template
295
296
  #
296
297
  # @return Response containing Definition of Complete Validation, UserProfile data and Access Token
297
298
  # 17.1.2
298
- def user_registration_by_phone(auth_user_registration_model, sott, fields = '', options = '', sms_template = '', verification_url = '', welcome_email_template = '')
299
+ def user_registration_by_phone(auth_user_registration_model, sott, fields = '', options = '', sms_template = '', verification_url = '', welcome_email_template = '', email_template = '')
299
300
  if auth_user_registration_model.blank?
300
301
  raise LoginRadius::Error.new, getValidationMessage('auth_user_registration_model')
301
302
  end
@@ -321,6 +322,9 @@ module LoginRadius
321
322
  unless isNullOrWhiteSpace(welcome_email_template)
322
323
  query_parameters['welcomeEmailTemplate'] = welcome_email_template
323
324
  end
325
+ unless isNullOrWhiteSpace(email_template)
326
+ query_parameters['emailTemplate'] = email_template
327
+ end
324
328
 
325
329
  resource_path = 'identity/v2/auth/register'
326
330
  post_request(resource_path, query_parameters, auth_user_registration_model)
@@ -210,25 +210,6 @@ module LoginRadius
210
210
  get_request(resource_path, query_parameters, {})
211
211
  end
212
212
 
213
- # The API is used to get LoginRadius access token by sending Vkontakte's access token. It will be valid for the specific duration of time specified in the response.
214
- #
215
- # @param vk_access_token - Vkontakte Access Token
216
- #
217
- # @return Response containing Definition of Complete Token data
218
- # 20.15
219
- def get_access_token_by_vkontakte_access_token(vk_access_token)
220
- if isNullOrWhiteSpace(vk_access_token)
221
- raise LoginRadius::Error.new, getValidationMessage('vk_access_token')
222
- end
223
-
224
- query_parameters = {}
225
- query_parameters['key'] = @api_key
226
- query_parameters['vk_access_token'] = vk_access_token
227
-
228
- resource_path = 'api/v2/access_token/vkontakte'
229
- get_request(resource_path, query_parameters, {})
230
- end
231
-
232
213
  # The API is used to get LoginRadius access token by sending Google's AuthCode. It will be valid for the specific duration of time specified in the response.
233
214
  #
234
215
  # @param google_authcode - Google AuthCode
@@ -170,615 +170,5 @@ module LoginRadius
170
170
  resource_path = 'api/v2/access_token/activesession'
171
171
  get_request(resource_path, query_parameters, {})
172
172
  end
173
-
174
- # <b>Supported Providers:</b> Facebook, Google, Live, Vkontakte.<br><br> This API returns the photo albums associated with the passed in access tokens Social Profile.
175
- #
176
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
177
- #
178
- # @return Response Containing List of Album Data
179
- # 22.2.1
180
- def get_albums(access_token)
181
- if isNullOrWhiteSpace(access_token)
182
- raise LoginRadius::Error.new, getValidationMessage('access_token')
183
- end
184
-
185
- query_parameters = {}
186
- query_parameters['access_token'] = access_token
187
-
188
- resource_path = 'api/v2/album'
189
- get_request(resource_path, query_parameters, {})
190
- end
191
-
192
- # <b>Supported Providers:</b> Facebook, Google, Live, Vkontakte.<br><br> This API returns the photo albums associated with the passed in access tokens Social Profile.
193
- #
194
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
195
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
196
- #
197
- # @return Response Model containing Albums with next cursor
198
- # 22.2.2
199
- def get_albums_with_cursor(access_token, next_cursor)
200
- if isNullOrWhiteSpace(access_token)
201
- raise LoginRadius::Error.new, getValidationMessage('access_token')
202
- end
203
- if isNullOrWhiteSpace(next_cursor)
204
- raise LoginRadius::Error.new, getValidationMessage('next_cursor')
205
- end
206
-
207
- query_parameters = {}
208
- query_parameters['access_token'] = access_token
209
- query_parameters['nextCursor'] = next_cursor
210
-
211
- resource_path = 'api/v2/album'
212
- get_request(resource_path, query_parameters, {})
213
- end
214
-
215
- # The Audio API is used to get audio files data from the user's social account.<br><br><b>Supported Providers:</b> Live, Vkontakte
216
- #
217
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
218
- #
219
- # @return Response Containing List of Audio Data
220
- # 24.2.1
221
- def get_audios(access_token)
222
- if isNullOrWhiteSpace(access_token)
223
- raise LoginRadius::Error.new, getValidationMessage('access_token')
224
- end
225
-
226
- query_parameters = {}
227
- query_parameters['access_token'] = access_token
228
-
229
- resource_path = 'api/v2/audio'
230
- get_request(resource_path, query_parameters, {})
231
- end
232
-
233
- # The Audio API is used to get audio files data from the user's social account.<br><br><b>Supported Providers:</b> Live, Vkontakte
234
- #
235
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
236
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
237
- #
238
- # @return Response Model containing Audio with next cursor
239
- # 24.2.2
240
- def get_audios_with_cursor(access_token, next_cursor)
241
- if isNullOrWhiteSpace(access_token)
242
- raise LoginRadius::Error.new, getValidationMessage('access_token')
243
- end
244
- if isNullOrWhiteSpace(next_cursor)
245
- raise LoginRadius::Error.new, getValidationMessage('next_cursor')
246
- end
247
-
248
- query_parameters = {}
249
- query_parameters['access_token'] = access_token
250
- query_parameters['nextCursor'] = next_cursor
251
-
252
- resource_path = 'api/v2/audio'
253
- get_request(resource_path, query_parameters, {})
254
- end
255
-
256
- # The Check In API is used to get check Ins data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, Foursquare, Vkontakte
257
- #
258
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
259
- #
260
- # @return Response Containing List of CheckIn Data
261
- # 25.2.1
262
- def get_check_ins(access_token)
263
- if isNullOrWhiteSpace(access_token)
264
- raise LoginRadius::Error.new, getValidationMessage('access_token')
265
- end
266
-
267
- query_parameters = {}
268
- query_parameters['access_token'] = access_token
269
-
270
- resource_path = 'api/v2/checkin'
271
- get_request(resource_path, query_parameters, {})
272
- end
273
-
274
- # The Check In API is used to get check Ins data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, Foursquare, Vkontakte
275
- #
276
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
277
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
278
- #
279
- # @return Response Model containing Checkins with next cursor
280
- # 25.2.2
281
- def get_check_ins_with_cursor(access_token, next_cursor)
282
- if isNullOrWhiteSpace(access_token)
283
- raise LoginRadius::Error.new, getValidationMessage('access_token')
284
- end
285
- if isNullOrWhiteSpace(next_cursor)
286
- raise LoginRadius::Error.new, getValidationMessage('next_cursor')
287
- end
288
-
289
- query_parameters = {}
290
- query_parameters['access_token'] = access_token
291
- query_parameters['nextCursor'] = next_cursor
292
-
293
- resource_path = 'api/v2/checkin'
294
- get_request(resource_path, query_parameters, {})
295
- end
296
-
297
- # The Contact API is used to get contacts/friends/connections data from the user's social account.This is one of the APIs that makes up the LoginRadius Friend Invite System. The data will normalized into LoginRadius' standard data format. This API requires setting permissions in your LoginRadius Dashboard. <br><br><b>Note:</b> Facebook restricts access to the list of friends that is returned. When using the Contacts API with Facebook you will only receive friends that have accepted some permissions with your app. <br><br><b>Supported Providers:</b> Facebook, Foursquare, Google, LinkedIn, Live, Twitter, Vkontakte, Yahoo
298
- #
299
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
300
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
301
- #
302
- # @return Response containing Definition of Contact Data with Cursor
303
- # 27.1
304
- def get_contacts(access_token, next_cursor = '')
305
- if isNullOrWhiteSpace(access_token)
306
- raise LoginRadius::Error.new, getValidationMessage('access_token')
307
- end
308
-
309
- query_parameters = {}
310
- query_parameters['access_token'] = access_token
311
- unless isNullOrWhiteSpace(next_cursor)
312
- query_parameters['nextCursor'] = next_cursor
313
- end
314
-
315
- resource_path = 'api/v2/contact'
316
- get_request(resource_path, query_parameters, {})
317
- end
318
-
319
- # The Event API is used to get the event data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, Live
320
- #
321
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
322
- #
323
- # @return Response Containing List of Events Data
324
- # 28.2.1
325
- def get_events(access_token)
326
- if isNullOrWhiteSpace(access_token)
327
- raise LoginRadius::Error.new, getValidationMessage('access_token')
328
- end
329
-
330
- query_parameters = {}
331
- query_parameters['access_token'] = access_token
332
-
333
- resource_path = 'api/v2/event'
334
- get_request(resource_path, query_parameters, {})
335
- end
336
-
337
- # The Event API is used to get the event data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, Live
338
- #
339
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
340
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
341
- #
342
- # @return Response Model containing Events with next cursor
343
- # 28.2.2
344
- def get_events_with_cursor(access_token, next_cursor)
345
- if isNullOrWhiteSpace(access_token)
346
- raise LoginRadius::Error.new, getValidationMessage('access_token')
347
- end
348
- if isNullOrWhiteSpace(next_cursor)
349
- raise LoginRadius::Error.new, getValidationMessage('next_cursor')
350
- end
351
-
352
- query_parameters = {}
353
- query_parameters['access_token'] = access_token
354
- query_parameters['nextCursor'] = next_cursor
355
-
356
- resource_path = 'api/v2/event'
357
- get_request(resource_path, query_parameters, {})
358
- end
359
-
360
- # Get the following user list from the user's social account.<br><br><b>Supported Providers:</b> Twitter
361
- #
362
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
363
- #
364
- # @return Response Containing List of Contacts Data
365
- # 29.2.1
366
- def get_followings(access_token)
367
- if isNullOrWhiteSpace(access_token)
368
- raise LoginRadius::Error.new, getValidationMessage('access_token')
369
- end
370
-
371
- query_parameters = {}
372
- query_parameters['access_token'] = access_token
373
-
374
- resource_path = 'api/v2/following'
375
- get_request(resource_path, query_parameters, {})
376
- end
377
-
378
- # Get the following user list from the user's social account.<br><br><b>Supported Providers:</b> Twitter
379
- #
380
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
381
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
382
- #
383
- # @return Response containing Definition of Contact Data with Cursor
384
- # 29.2.2
385
- def get_followings_with_cursor(access_token, next_cursor)
386
- if isNullOrWhiteSpace(access_token)
387
- raise LoginRadius::Error.new, getValidationMessage('access_token')
388
- end
389
- if isNullOrWhiteSpace(next_cursor)
390
- raise LoginRadius::Error.new, getValidationMessage('next_cursor')
391
- end
392
-
393
- query_parameters = {}
394
- query_parameters['access_token'] = access_token
395
- query_parameters['nextCursor'] = next_cursor
396
-
397
- resource_path = 'api/v2/following'
398
- get_request(resource_path, query_parameters, {})
399
- end
400
-
401
- # The Group API is used to get group data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, Vkontakte
402
- #
403
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
404
- #
405
- # @return Response Containing List of Groups Data
406
- # 30.2.1
407
- def get_groups(access_token)
408
- if isNullOrWhiteSpace(access_token)
409
- raise LoginRadius::Error.new, getValidationMessage('access_token')
410
- end
411
-
412
- query_parameters = {}
413
- query_parameters['access_token'] = access_token
414
-
415
- resource_path = 'api/v2/group'
416
- get_request(resource_path, query_parameters, {})
417
- end
418
-
419
- # The Group API is used to get group data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, Vkontakte
420
- #
421
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
422
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
423
- #
424
- # @return Response Model containing Groups with next cursor
425
- # 30.2.2
426
- def get_groups_with_cursor(access_token, next_cursor)
427
- if isNullOrWhiteSpace(access_token)
428
- raise LoginRadius::Error.new, getValidationMessage('access_token')
429
- end
430
- if isNullOrWhiteSpace(next_cursor)
431
- raise LoginRadius::Error.new, getValidationMessage('next_cursor')
432
- end
433
-
434
- query_parameters = {}
435
- query_parameters['access_token'] = access_token
436
- query_parameters['nextCursor'] = next_cursor
437
-
438
- resource_path = 'api/v2/group'
439
- get_request(resource_path, query_parameters, {})
440
- end
441
-
442
- # The Like API is used to get likes data from the user's social account.<br><br><b>Supported Providers:</b> Facebook
443
- #
444
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
445
- #
446
- # @return Response Containing List of Likes Data
447
- # 31.2.1
448
- def get_likes(access_token)
449
- if isNullOrWhiteSpace(access_token)
450
- raise LoginRadius::Error.new, getValidationMessage('access_token')
451
- end
452
-
453
- query_parameters = {}
454
- query_parameters['access_token'] = access_token
455
-
456
- resource_path = 'api/v2/like'
457
- get_request(resource_path, query_parameters, {})
458
- end
459
-
460
- # The Like API is used to get likes data from the user's social account.<br><br><b>Supported Providers:</b> Facebook
461
- #
462
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
463
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
464
- #
465
- # @return Response Model containing Likes with next cursor
466
- # 31.2.2
467
- def get_likes_with_cursor(access_token, next_cursor)
468
- if isNullOrWhiteSpace(access_token)
469
- raise LoginRadius::Error.new, getValidationMessage('access_token')
470
- end
471
- if isNullOrWhiteSpace(next_cursor)
472
- raise LoginRadius::Error.new, getValidationMessage('next_cursor')
473
- end
474
-
475
- query_parameters = {}
476
- query_parameters['access_token'] = access_token
477
- query_parameters['nextCursor'] = next_cursor
478
-
479
- resource_path = 'api/v2/like'
480
- get_request(resource_path, query_parameters, {})
481
- end
482
-
483
- # The Mention API is used to get mentions data from the user's social account.<br><br><b>Supported Providers:</b> Twitter
484
- #
485
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
486
- #
487
- # @return Response Containing List of Status Data
488
- # 32.1
489
- def get_mentions(access_token)
490
- if isNullOrWhiteSpace(access_token)
491
- raise LoginRadius::Error.new, getValidationMessage('access_token')
492
- end
493
-
494
- query_parameters = {}
495
- query_parameters['access_token'] = access_token
496
-
497
- resource_path = 'api/v2/mention'
498
- get_request(resource_path, query_parameters, {})
499
- end
500
-
501
- # Post Message API is used to post messages to the user's contacts.<br><br><b>Supported Providers:</b> Twitter, LinkedIn <br><br>The Message API is used to post messages to the user?s contacts. This is one of the APIs that makes up the LoginRadius Friend Invite System. After using the Contact API, you can send messages to the retrieved contacts. This API requires setting permissions in your LoginRadius Dashboard.<br><br>GET & POST Message API work the same way except the API method is different
502
- #
503
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
504
- # @param message - Body of your message
505
- # @param subject - Subject of your message
506
- # @param to - Recipient's social provider's id
507
- #
508
- # @return Response containing Definition for Complete Validation data
509
- # 33.1
510
- def post_message(access_token, message, subject, to)
511
- if isNullOrWhiteSpace(access_token)
512
- raise LoginRadius::Error.new, getValidationMessage('access_token')
513
- end
514
- if isNullOrWhiteSpace(message)
515
- raise LoginRadius::Error.new, getValidationMessage('message')
516
- end
517
- if isNullOrWhiteSpace(subject)
518
- raise LoginRadius::Error.new, getValidationMessage('subject')
519
- end
520
- if isNullOrWhiteSpace(to)
521
- raise LoginRadius::Error.new, getValidationMessage('to')
522
- end
523
-
524
- query_parameters = {}
525
- query_parameters['access_token'] = access_token
526
- query_parameters['message'] = message
527
- query_parameters['subject'] = subject
528
- query_parameters['to'] = to
529
-
530
- resource_path = 'api/v2/message'
531
- post_request(resource_path, query_parameters, {})
532
- end
533
-
534
- # The Page API is used to get the page data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, LinkedIn
535
- #
536
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
537
- # @param page_name - Name of the page you want to retrieve info from
538
- #
539
- # @return Response containing Definition of Complete page data
540
- # 34.1
541
- def get_page(access_token, page_name)
542
- if isNullOrWhiteSpace(access_token)
543
- raise LoginRadius::Error.new, getValidationMessage('access_token')
544
- end
545
- if isNullOrWhiteSpace(page_name)
546
- raise LoginRadius::Error.new, getValidationMessage('page_name')
547
- end
548
-
549
- query_parameters = {}
550
- query_parameters['access_token'] = access_token
551
- query_parameters['pageName'] = page_name
552
-
553
- resource_path = 'api/v2/page'
554
- get_request(resource_path, query_parameters, {})
555
- end
556
-
557
- # The Photo API is used to get photo data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, Foursquare, Google, Live, Vkontakte
558
- #
559
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
560
- # @param album_id - The id of the album you want to retrieve info from
561
- #
562
- # @return Response Containing List of Photos Data
563
- # 35.1
564
- def get_photos(access_token, album_id)
565
- if isNullOrWhiteSpace(access_token)
566
- raise LoginRadius::Error.new, getValidationMessage('access_token')
567
- end
568
- if isNullOrWhiteSpace(album_id)
569
- raise LoginRadius::Error.new, getValidationMessage('album_id')
570
- end
571
-
572
- query_parameters = {}
573
- query_parameters['access_token'] = access_token
574
- query_parameters['albumId'] = album_id
575
-
576
- resource_path = 'api/v2/photo'
577
- get_request(resource_path, query_parameters, {})
578
- end
579
-
580
- # The Post API is used to get post message data from the user's social account.<br><br><b>Supported Providers:</b> Facebook
581
- #
582
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
583
- #
584
- # @return Response Containing List of Posts Data
585
- # 36.1
586
- def get_posts(access_token)
587
- if isNullOrWhiteSpace(access_token)
588
- raise LoginRadius::Error.new, getValidationMessage('access_token')
589
- end
590
-
591
- query_parameters = {}
592
- query_parameters['access_token'] = access_token
593
-
594
- resource_path = 'api/v2/post'
595
- get_request(resource_path, query_parameters, {})
596
- end
597
-
598
- # The Status API is used to update the status on the user's wall.<br><br><b>Supported Providers:</b> Facebook, Twitter, LinkedIn
599
- #
600
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
601
- # @param caption - Message displayed below the description(Requires URL, Under 70 Characters).
602
- # @param description - Description of the displayed URL and Image(Requires URL)
603
- # @param imageurl - Image to be displayed in the share(Requires URL).
604
- # @param status - Main body of the Status update.
605
- # @param title - Title of Linked URL
606
- # @param url - URL to be included when clicking on the share.
607
- # @param shorturl - short url
608
- #
609
- # @return Response conatining Definition of Validation and Short URL data
610
- # 37.2
611
- def status_posting(access_token, caption, description, imageurl, status, title, url, shorturl = '0')
612
- if isNullOrWhiteSpace(access_token)
613
- raise LoginRadius::Error.new, getValidationMessage('access_token')
614
- end
615
- if isNullOrWhiteSpace(caption)
616
- raise LoginRadius::Error.new, getValidationMessage('caption')
617
- end
618
- if isNullOrWhiteSpace(description)
619
- raise LoginRadius::Error.new, getValidationMessage('description')
620
- end
621
- if isNullOrWhiteSpace(imageurl)
622
- raise LoginRadius::Error.new, getValidationMessage('imageurl')
623
- end
624
- if isNullOrWhiteSpace(status)
625
- raise LoginRadius::Error.new, getValidationMessage('status')
626
- end
627
- if isNullOrWhiteSpace(title)
628
- raise LoginRadius::Error.new, getValidationMessage('title')
629
- end
630
- if isNullOrWhiteSpace(url)
631
- raise LoginRadius::Error.new, getValidationMessage('url')
632
- end
633
-
634
- query_parameters = {}
635
- query_parameters['access_token'] = access_token
636
- query_parameters['caption'] = caption
637
- query_parameters['description'] = description
638
- query_parameters['imageurl'] = imageurl
639
- query_parameters['status'] = status
640
- query_parameters['title'] = title
641
- query_parameters['url'] = url
642
- unless isNullOrWhiteSpace(shorturl)
643
- query_parameters['shorturl'] = shorturl
644
- end
645
-
646
- resource_path = 'api/v2/status'
647
- post_request(resource_path, query_parameters, {})
648
- end
649
-
650
- # The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.<br><br> The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.<br><br> POST Input Parameter Format: application/x-www-form-urlencoded
651
- #
652
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
653
- # @param status_model - Model Class containing Definition of payload for Status API
654
- #
655
- # @return Response containing Definition for Complete status data
656
- # 37.6
657
- def trackable_status_posting(access_token, status_model)
658
- if isNullOrWhiteSpace(access_token)
659
- raise LoginRadius::Error.new, getValidationMessage('access_token')
660
- end
661
- if status_model.blank?
662
- raise LoginRadius::Error.new, getValidationMessage('status_model')
663
- end
664
-
665
- query_parameters = {}
666
- query_parameters['access_token'] = access_token
667
-
668
- resource_path = 'api/v2/status/trackable'
669
- post_request(resource_path, query_parameters, status_model)
670
- end
671
-
672
- # The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.<br><br> The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.
673
- #
674
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
675
- # @param caption - Message displayed below the description(Requires URL, Under 70 Characters).
676
- # @param description - Description of the displayed URL and Image(Requires URL)
677
- # @param imageurl - Image to be displayed in the share(Requires URL).
678
- # @param status - Main body of the Status update.
679
- # @param title - Title of Linked URL
680
- # @param url - URL to be included when clicking on the share.
681
- #
682
- # @return Response containing Definition for Complete status data
683
- # 37.7
684
- def get_trackable_status_stats(access_token, caption, description, imageurl, status, title, url)
685
- if isNullOrWhiteSpace(access_token)
686
- raise LoginRadius::Error.new, getValidationMessage('access_token')
687
- end
688
- if isNullOrWhiteSpace(caption)
689
- raise LoginRadius::Error.new, getValidationMessage('caption')
690
- end
691
- if isNullOrWhiteSpace(description)
692
- raise LoginRadius::Error.new, getValidationMessage('description')
693
- end
694
- if isNullOrWhiteSpace(imageurl)
695
- raise LoginRadius::Error.new, getValidationMessage('imageurl')
696
- end
697
- if isNullOrWhiteSpace(status)
698
- raise LoginRadius::Error.new, getValidationMessage('status')
699
- end
700
- if isNullOrWhiteSpace(title)
701
- raise LoginRadius::Error.new, getValidationMessage('title')
702
- end
703
- if isNullOrWhiteSpace(url)
704
- raise LoginRadius::Error.new, getValidationMessage('url')
705
- end
706
-
707
- query_parameters = {}
708
- query_parameters['access_token'] = access_token
709
- query_parameters['caption'] = caption
710
- query_parameters['description'] = description
711
- query_parameters['imageurl'] = imageurl
712
- query_parameters['status'] = status
713
- query_parameters['title'] = title
714
- query_parameters['url'] = url
715
-
716
- resource_path = 'api/v2/status/trackable/js'
717
- get_request(resource_path, query_parameters, {})
718
- end
719
-
720
- # The Trackable status API works very similar to the Status API but it returns a Post id that you can use to track the stats(shares, likes, comments) for a specific share/post/status update. This API requires setting permissions in your LoginRadius Dashboard.<br><br> This API is used to retrieve a tracked post based on the passed in post ID value. This API requires setting permissions in your LoginRadius Dashboard.<br><br> <b>Note:</b> To utilize this API you need to find the ID for the post you want to track, which might require using Trackable Status Posting API first.
721
- #
722
- # @param post_id - Post ID value
723
- #
724
- # @return Response containing Definition of Complete Status Update data
725
- # 37.8
726
- def trackable_status_fetching(post_id)
727
- if isNullOrWhiteSpace(post_id)
728
- raise LoginRadius::Error.new, getValidationMessage('post_id')
729
- end
730
-
731
- query_parameters = {}
732
- query_parameters['postId'] = post_id
733
- query_parameters['secret'] = @api_secret
734
-
735
- resource_path = 'api/v2/status/trackable'
736
- get_request(resource_path, query_parameters, {})
737
- end
738
-
739
- # The User Profile API is used to get the latest updated social profile data from the user's social account after authentication. The social profile will be retrieved via oAuth and OpenID protocols. The data is normalized into LoginRadius' standard data format. This API should be called using the access token retrieved from the refresh access token API.
740
- #
741
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
742
- # @param fields - The fields parameter filters the API response so that the response only includes a specific set of fields
743
- #
744
- # @return Response containing Definition for Complete UserProfile data
745
- # 38.2
746
- def get_refreshed_social_user_profile(access_token, fields = '')
747
- if isNullOrWhiteSpace(access_token)
748
- raise LoginRadius::Error.new, getValidationMessage('access_token')
749
- end
750
-
751
- query_parameters = {}
752
- query_parameters['access_token'] = access_token
753
- unless isNullOrWhiteSpace(fields)
754
- query_parameters['fields'] = fields
755
- end
756
-
757
- resource_path = 'api/v2/userprofile/refresh'
758
- get_request(resource_path, query_parameters, {})
759
- end
760
-
761
- # The Video API is used to get video files data from the user's social account.<br><br><b>Supported Providers:</b> Facebook, Google, Live, Vkontakte
762
- #
763
- # @param access_token - Uniquely generated identifier key by LoginRadius that is activated after successful authentication.
764
- # @param next_cursor - Cursor value if not all contacts can be retrieved once.
765
- #
766
- # @return Response containing Definition of Video Data with Cursor
767
- # 39.2
768
- def get_videos(access_token, next_cursor)
769
- if isNullOrWhiteSpace(access_token)
770
- raise LoginRadius::Error.new, getValidationMessage('access_token')
771
- end
772
- if isNullOrWhiteSpace(next_cursor)
773
- raise LoginRadius::Error.new, getValidationMessage('next_cursor')
774
- end
775
-
776
- query_parameters = {}
777
- query_parameters['access_token'] = access_token
778
- query_parameters['nextCursor'] = next_cursor
779
-
780
- resource_path = 'api/v2/video'
781
- get_request(resource_path, query_parameters, {})
782
- end
783
173
  end
784
174
  end
@@ -1,3 +1,3 @@
1
1
  module LoginRadius
2
- VERSION = "11.4.0"
2
+ VERSION = "11.5.0"
3
3
  end
data/lib/login_radius.rb CHANGED
@@ -7,7 +7,6 @@ require_relative "login_radius/api/account/sott_api"
7
7
  require_relative "login_radius/api/advanced/configuration_api"
8
8
  require_relative "login_radius/api/advanced/consent_management_api"
9
9
  require_relative "login_radius/api/advanced/custom_object_api"
10
- require_relative "login_radius/api/advanced/custom_registration_data_api"
11
10
  require_relative "login_radius/api/advanced/multi_factor_authentication_api"
12
11
  require_relative "login_radius/api/advanced/re_authentication_api"
13
12
  require_relative "login_radius/api/advanced/web_hook_api"
data/login_radius.gemspec CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_development_dependency "bundler", "~> 2.2.26"
24
- spec.add_development_dependency "rake", "~> 13.0.3"
23
+ spec.add_development_dependency "bundler", "~> 2.3.26"
24
+ spec.add_development_dependency "rake", "~> 13.0.6"
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: login_radius
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.4.0
4
+ version: 11.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LoginRadius
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-03 00:00:00.000000000 Z
11
+ date: 2023-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.26
19
+ version: 2.3.26
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.26
26
+ version: 2.3.26
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 13.0.3
33
+ version: 13.0.6
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 13.0.3
40
+ version: 13.0.6
41
41
  description:
42
42
  email:
43
43
  - developers@loginradius.com
@@ -55,7 +55,6 @@ files:
55
55
  - lib/login_radius/api/advanced/configuration_api.rb
56
56
  - lib/login_radius/api/advanced/consent_management_api.rb
57
57
  - lib/login_radius/api/advanced/custom_object_api.rb
58
- - lib/login_radius/api/advanced/custom_registration_data_api.rb
59
58
  - lib/login_radius/api/advanced/multi_factor_authentication_api.rb
60
59
  - lib/login_radius/api/advanced/re_authentication_api.rb
61
60
  - lib/login_radius/api/advanced/web_hook_api.rb
@@ -1,195 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Created by LoginRadius Development Team
4
- # Copyright 2019 LoginRadius Inc. All rights reserved.
5
- require_relative '../../request_client'
6
-
7
- module LoginRadius
8
- # CustomRegistrationDataApi module
9
- class CustomRegistrationDataApi
10
- include RequestClient
11
-
12
- attr_accessor :site_name, :api_key, :api_secret
13
-
14
- # Initializes a LoginRadius Account object with an apikey and secret
15
- # Takes in a hash containing site_name(required), api_key(required), api_secret(required)
16
- def initialize
17
- @site_name = ENV['SITE_NAME']
18
- @api_key = ENV['API_KEY']
19
- @api_secret = ENV['API_SECRET']
20
- raise LoginRadius::Error.new, "'site_name' is a required option for Account class initialization." \
21
- unless @site_name != '' && @site_name != nil
22
- raise LoginRadius::Error.new, "'api_key' is a required option for Account class initialization." \
23
- unless @api_key != '' && @api_key != nil
24
- raise LoginRadius::Error.new, "'api_secret is a required option for Account class initialization." \
25
- unless @api_secret != '' && @api_secret != nil
26
- end
27
-
28
- # This API is used to retrieve dropdown data.
29
- #
30
- # @param type - Type of the Datasource
31
- # @param limit - Retrieve number of records at a time(max limit is 50)
32
- # @param parent_id - Id of parent dropdown member(if any).
33
- # @param skip - Skip number of records from start
34
- #
35
- # @return Complete user Registration data
36
- # 7.1
37
- def auth_get_registration_data(type, limit = '', parent_id = '', skip = '')
38
- if isNullOrWhiteSpace(type)
39
- raise LoginRadius::Error.new, getValidationMessage('type')
40
- end
41
-
42
- query_parameters = {}
43
- query_parameters['apiKey'] = @api_key
44
- unless limit == false
45
- query_parameters['limit'] = limit
46
- end
47
- unless isNullOrWhiteSpace(parent_id)
48
- query_parameters['parentId'] = parent_id
49
- end
50
- unless skip == false
51
- query_parameters['skip'] = skip
52
- end
53
-
54
- resource_path = 'identity/v2/auth/registrationdata/' + type
55
- get_request(resource_path, query_parameters, {})
56
- end
57
-
58
- # This API allows you to validate code for a particular dropdown member.
59
- #
60
- # @param code - Secret Code
61
- # @param record_id - Selected dropdown item’s record id
62
- #
63
- # @return Response containing Definition of Complete Validation data
64
- # 7.2
65
- def validate_registration_data_code(code, record_id)
66
- if isNullOrWhiteSpace(code)
67
- raise LoginRadius::Error.new, getValidationMessage('code')
68
- end
69
- if isNullOrWhiteSpace(record_id)
70
- raise LoginRadius::Error.new, getValidationMessage('record_id')
71
- end
72
-
73
- query_parameters = {}
74
- query_parameters['apiKey'] = @api_key
75
-
76
- body_parameters = {}
77
- body_parameters['code'] = code
78
- body_parameters['recordId'] = record_id
79
-
80
- resource_path = 'identity/v2/auth/registrationdata/validatecode'
81
- post_request(resource_path, query_parameters, body_parameters)
82
- end
83
-
84
- # This API is used to retrieve dropdown data.
85
- #
86
- # @param type - Type of the Datasource
87
- # @param limit - Retrive number of records at a time(max limit is 50
88
- # @param parent_id - Id of parent dropdown member(if any).
89
- # @param skip - Skip number of records from start
90
- #
91
- # @return Complete user Registration data Fields
92
- # 16.1
93
- def get_registration_data(type, limit = '', parent_id = '', skip = '')
94
- if isNullOrWhiteSpace(type)
95
- raise LoginRadius::Error.new, getValidationMessage('type')
96
- end
97
-
98
- query_parameters = {}
99
- query_parameters['apiKey'] = @api_key
100
- query_parameters['apiSecret'] = @api_secret
101
- unless limit == false
102
- query_parameters['limit'] = limit
103
- end
104
- unless isNullOrWhiteSpace(parent_id)
105
- query_parameters['parentId'] = parent_id
106
- end
107
- unless skip == false
108
- query_parameters['skip'] = skip
109
- end
110
-
111
- resource_path = 'identity/v2/manage/registrationdata/' + type
112
- get_request(resource_path, query_parameters, {})
113
- end
114
-
115
- # This API allows you to fill data into a dropdown list which you have created for user Registration. For more details on how to use this API please see our Custom Registration Data Overview
116
- #
117
- # @param registration_data_create_model_list - Model Class containing Definition of List of Registration Data
118
- #
119
- # @return Response containing Definition of Complete Validation data
120
- # 16.2
121
- def add_registration_data(registration_data_create_model_list)
122
- if registration_data_create_model_list.blank?
123
- raise LoginRadius::Error.new, getValidationMessage('registration_data_create_model_list')
124
- end
125
-
126
- query_parameters = {}
127
- query_parameters['apiKey'] = @api_key
128
- query_parameters['apiSecret'] = @api_secret
129
-
130
- resource_path = 'identity/v2/manage/registrationdata'
131
- post_request(resource_path, query_parameters, registration_data_create_model_list)
132
- end
133
-
134
- # This API allows you to update a dropdown item
135
- #
136
- # @param registration_data_update_model - Model Class containing Definition of payload for Registration Data update API
137
- # @param record_id - Registration data RecordId
138
- #
139
- # @return Complete user Registration data Field
140
- # 16.3
141
- def update_registration_data(registration_data_update_model, record_id)
142
- if registration_data_update_model.blank?
143
- raise LoginRadius::Error.new, getValidationMessage('registration_data_update_model')
144
- end
145
- if isNullOrWhiteSpace(record_id)
146
- raise LoginRadius::Error.new, getValidationMessage('record_id')
147
- end
148
-
149
- query_parameters = {}
150
- query_parameters['apiKey'] = @api_key
151
- query_parameters['apiSecret'] = @api_secret
152
-
153
- resource_path = 'identity/v2/manage/registrationdata/' + record_id
154
- put_request(resource_path, query_parameters, registration_data_update_model)
155
- end
156
-
157
- # This API allows you to delete an item from a dropdown list.
158
- #
159
- # @param record_id - Registration data RecordId
160
- #
161
- # @return Response containing Definition of Delete Request
162
- # 16.4
163
- def delete_registration_data(record_id)
164
- if isNullOrWhiteSpace(record_id)
165
- raise LoginRadius::Error.new, getValidationMessage('record_id')
166
- end
167
-
168
- query_parameters = {}
169
- query_parameters['apiKey'] = @api_key
170
- query_parameters['apiSecret'] = @api_secret
171
-
172
- resource_path = 'identity/v2/manage/registrationdata/' + record_id
173
- delete_request(resource_path, query_parameters, {})
174
- end
175
-
176
- # This API allows you to delete all records contained in a datasource.
177
- #
178
- # @param type - Type of the Datasource
179
- #
180
- # @return Response containing Definition of Delete Request
181
- # 16.5
182
- def delete_all_records_by_data_source(type)
183
- if isNullOrWhiteSpace(type)
184
- raise LoginRadius::Error.new, getValidationMessage('type')
185
- end
186
-
187
- query_parameters = {}
188
- query_parameters['apiKey'] = @api_key
189
- query_parameters['apiSecret'] = @api_secret
190
-
191
- resource_path = 'identity/v2/manage/registrationdata/type/' + type
192
- delete_request(resource_path, query_parameters, {})
193
- end
194
- end
195
- end