-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiary.apib
5569 lines (4645 loc) · 191 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
HOST: http://staging.api.mtfan.mediotiempo.com
# MTSocial API Staging services ready
API de MT Fan
# Group Errors
## **Every service** used with an inexistent token will return an error 403 as follows
+ Invalid token 403 (application/json)
{
"userError": {
"extraData": null,
"message": "Token 2h9qj263t8rmbrvvcb0ts9ngpop3rlax is not valid,",
"validationErrors": null
}
}
## **Login-Bad credentials** Used when email or password is invalid at login
+ Response 403 (application/json)
{
"userError": {
"extraData": null,
"message": "Bad credentials",
"validationErrors": null
}
}
## **Register a user - Problems with data** Validations errors is an array of fields with its error and its explanation. For example, repeated email
+ Response 422 (application/json)
{
"userError": {
"extraData": null,
"message": "Problemas de datos",
"validationErrors": [
{
"field": "email",
"message": "Property [email] of class [class gex.mediotiempo.fan.security.Person] with value [[email protected]] must be unique",
"object": "gex.mediotiempo.fan.security.Person",
"rejectedValue": "[email protected]"
},
{
"field": "password",
"message": "Property [password] of class [class gex.mediotiempo.fan.security.Person] with value [5567] is less than the minimum size of [6]",
"object": "gex.mediotiempo.fan.security.Person",
"rejectedValue": "5567"
}
]
}
}
## **Bad requests** Errors 400 are generated when some parameter in request is invalid.
All share same structure as follows, where message specifies the type of error and extraData gives additional info if present.
+ Response 400 (application/json)
{
"userError": {
"extraData": {
"followedId": "3231342",
"followedType": "PARTICIPANT",
"followerId": "2",
"followerType": "PERSON"
},
"message": "No es posible realizar el follow.",
"validationErrors": null
}
}
+ Response 400 (application/json)
{
"userError": {
"extraData": null,
"message": "El usuario a?n no ha votado en este partido",
"validationErrors": null
}
}
## **Not found** Errors 404
This errors happens when trying to make an operation over an inxistent resource
+ Response 404 (application/json)
{
"userError": {
"extraData": null,
"message": "La liga 78 no existe en la BD, es probable que el filler no haya corrido a?n",
"validationErrors": null
}
}
**Login with social API** throws an 404 response but with extra data expecifying that the person was not found on MTFan, but some data are getted from social network, so it returns suggered fields as unique nickname, name, etc in order to agilize register process.
See Login with social API for more detail
# Group Login
<a id="login" ></a>
To login into the MTSocial API API, use following calls:
1. `POST` your credentials in JSON body to the *login* resource. An **token** is returned back.
2. Use the **token** in your API calls header **X-Auth-Token**.
Remember that TT Token has **limited validity**. Once you received 401 Unauthorized Response, you need to GET new TT Token.
###Login Properties
- username (string) : User's email
- password (string) : User's password
## Login with a user [/login]
### POST
This resource is the first. Use it to log into the API.
`Please use your MTSocial API account credentials for API calls.`
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{"username":"[email protected]","password":"YourPassword"}
+ Response 200 (application/json)
+ Body
{
"authorities": [
"ROLE_ADMIN",
"ROLE_ROOT"
],
"person": {
"avatarUrl": "https://mtfan-dev.s3.amazonaws.com/e7bcbde7-acf1-4811-94e7-d04743bb5b93-gextech.png",
"badges": [
{
"id": "4d46efd8-a2bf-4e7e-ab8f-b35a2a39e6c7",
"name": "canchero",
"urlImage": "http://mtfan-app.s3.amazonaws.com/badge/BADGES-MT_canchero.png"
},
{
"id": "c7e88f24-357e-4083-9272-e5ce08ef1dde",
"name": "debut",
"urlImage": "http://mtfan-app.s3.amazonaws.com/badge/BADGES-MT_debut.png"
},
{
"id": "c0275314-d242-4fda-bb67-1c5b73c575e7",
"name": "trotamundos",
"urlImage": "http://mtfan-app.s3.amazonaws.com/badge/BADGES-MT_trotamundos.png"
}
],
"birthdate": "1913-01-01T00:00:00.000-06:36:36",
"email": "[email protected]",
"followerCount": 0,
"following": null,
"followingCount": 4,
"gender": "MALE",
"id": "ffafc94d-a4f4-41d3-8b70-5a97826e504d",
"media": null,
"name": "Tomas Salazar",
"recentActivity": null,
"type": null
},
"token": "82gvlv1gtcduv42uu7icefiij025ti9a"
}
+ Response 403 (application/json)
{
"userError": {
"extraData": null,
"message": "Bad credentials",
"validationErrors": null
}
}
## Check if token is still valid [/api/validate]
Basic service to validate token, this is for testing.
Use the token retrive from login call as header X-Auth-Token.
### GET
+ Request
+ Headers
X-Auth-Token: {token}
+ Response 200 (application/json)
+ Body
{"token":"o5245j7tn44hf1gvalbvkvgjk5t9s9cv","roles":["ROLE_ADMIN","ROLE_ROOT”]}
## Lists allowed people [/v1/people/]
### GET
Get basic info for logged person
+ Response 200 (application/json)
{"id":1,"name":"Domingo Suarez Torres","email":"[email protected]"}
# Group Register
<a id="register" ></a>
To register into the MTSocial API API, use following calls:
- 1. `POST` your personal data in JSON body to the *register* resource. An **token** is returned back.
- 2. Use the **token** in your API calls header **X-Auth-Token**.
Remember that TT Token has **limited validity**. Once you received 401 Unauthorized Response, you need to GET new TT Token.
###Login Properties
- username (string) : User's email
- name (string) : User's name
- password (string) : User's password minSize: 6
- genre (string) : Optional User's genre (FEMALE, MALE)
- birthdate (logn) : Optional User's age
## Create a user [/v1/people]
### POST
This resource register new user into MTSocial API and login
`Please use your MTSocial API account credentials for API calls.`
+ Request (application/json)
+ Headers
X-Auth-Token: {token}
Accept: application/json
+ Body
{"email":"[email protected]", "name":"username" , "password":"YourPassword", "gender":"FEMALE", "birthdate":null, "socialData":{"accessToken":"asdadasd","secret":"sdasdf","provider":"aasdfsadfasdfadsf"}}
+ Response 201 (application/json)
+ Body
{"person":{"id":"8132259c-92ff-4568-908a-ce6445a07ed1","name":"Testing test","email":"[email protected]"},"token":"3onh61e2ci6s6vk57qve4b5taarkndge"}
+ Response 422 (application/json)
{
"userError": {
"extraData": null,
"message": "Problemas de datos",
"validationErrors": [
{
"field": "email",
"message": "Property [email] of class [class gex.mediotiempo.fan.security.Person] with value [[email protected]] must be unique",
"object": "gex.mediotiempo.fan.security.Person",
"rejectedValue": "[email protected]"
},
{
"field": "password",
"message": "Property [password] of class [class gex.mediotiempo.fan.security.Person] with value [5567] is less than the minimum size of [6]",
"object": "gex.mediotiempo.fan.security.Person",
"rejectedValue": "5567"
}
]
}
}
## Validate the availability of some fields [/v1/people/validate]
### POST
This resource returns the availability of nickname or email. If nickname is invalid it return an unique valid nickname.
`Please use your MTSocial API account credentials for API calls.`
- nickname (string) : Nickname to check (optional)
- email (string) : Email to check (optional)
+ Request (application/json)
+ Headers
X-Auth-Token: {token}
Accept: application/json
+ Body
{"nickname":"tsunllly", "email":"[email protected]" }
+ Response 200 (application/json)
+ Body
{
"emailAvailable": false,
"nicknameAvailable": true,
"suggestedNickname": null
}
# Group Delete
<a id="delete" ></a>
## Delete a user (asynch) [/v1/people/deleteAsynch]
### DELETE
This resource deletes the account of current user. This is an asynchronous operation. It is mandatory to CLOSE THE SESSION after this operation is executed. If the user attempts to login again it does not allow due to the user is unabled.
Some users (system users are not allowed to be deleted)
`Please use your MTSocial API account credentials for API calls.`
+ Request (application/json)
+ Headers
X-Auth-Token: {token}
Accept: application/json
+ Body
{}
+ Response 204 (application/json)
+
## Get the current status (asynch) [/v1/people/deleteAsynch/{person_id}]
### GET
This resource get the status of the asinchronous operation of deletion
`Please use your MTSocial API account credentials for API calls.`
+ Request (application/json)
+ Headers
X-Auth-Token: {token}
Accept: application/json
+ Body
{}
+ Response 200 (application/json)
{
"extraInfo": null,
"person": "16991450-3fdf-42f3-9d6b-1652db5a0162",
"status": "SUCCESSFUL_FINISHED"
}
* Other posible status are: IN_PROGRESS and FINISHED_WITH_ERROR
## Login with social API [/v1/people/loginSocial]
### POST
This resource log in user or register a new user into MTSocial API and login
You can send your social network's accessToken, and secret in the case of twitter, three providers are supported now:
* twitter
* facebook
* google
In case the user doesn't exist you will get a 404 message with a userError
You should also use this service if you want to refresh social network tokens.
`Please use your MTSocial API account credentials for API calls.`
+ Request (application/json)
+ Headers
Accept: application/json
X-Auth-Token: {token}
+ Body
{
"accessToken":"zdadzsdaae",
"secret":"SOLOENELCASODETWITTER",
"provider":"twitter"
}
+ Response 200 (application/json)
+ Body
{
"person":{
"id":
"8132259c-92ff-4568-908a-ce6445a07ed1",
"name":"Testing test",
"email":"[email protected]"
},
"token":"3onh61e2ci6s6vk57qve4b5taarkndge"
}
+ Response 404 (application/json)
+ Body
{
"userError": {
"extraData": {
"user": {
"bio": null,
"email": "[email protected]",
"gender": "MALE",
"name": "Eduardo Díaz Real",
"nickname": "iamedu"
}
},
"message": "User has not been created yet",
"validationErrors": null
}
}
+ Response 400 (application/json)
+ Body
{
"userError": {
"extraData": {
"errorCode": "socialNotAuthorized",
"provider": "facebook",
},
"message": "El token no es valido, o ha expirado por favor revisalo",
"validationErrors": null
}
}
or
{
"userError": {
"extraData": {
"errorCode": "socialRateExceeded",
"provider": "facebook",
},
"message": "Se ha excedido el límite de peticiones",
"validationErrors": null
}
}
or
{
"userError": {
"extraData": null,
"message": "No se encontró un proveedor especificado (provider)",
"validationErrors": null
}
}
## Login with social API [/v1/people/addSocialConnection]
### POST
This services allows to add a new social network to the same user, you have to send plain normal social tokens.
* twitter
* facebook
* google
In case the user doesn't exist you will get a 404 message with a userError
You should also use this service if you want to refresh social network tokens.
`Please use your MTSocial API account credentials for API calls.`
+ Request (application/json)
+ Headers
Accept: application/json
X-Auth-Token: {token}
+ Body
{"accessToken":"zdadzsdaae", "secret":"SOLOENELCASODETWITTER", "provider":"twitter"}
+ Response 200 (application/json)
+ Body
{
"providerId": "facebook",
"providerUserId": "100003544803563",
"userId": "3"
}
## Request password recovery [/v1/people/passwordRecovery/$mail]
### GET
This send a mail with instructions to reset the password, not for user logged throw fb or twitter
+ Request (application/json)
+ Headers
Accept: application/json
X-Auth-Token: {token}
+ Body
{}
+ Response 200 (application/json)
+ Body
{
"msg": "A email has send",
"personId": "c4af6c48-aa36-4af7-b9dd-6d5056f586b2"
}
## Change password [/v1/people/$personId/changePassword]
### POST
When a user get a mail with instructions to recovery his password, it has the id of the user and the token required to change the password.
+ Request (application/json)
+ Headers
Accept: application/json
X-Auth-Token: {token}
+ Body
{"token":"token received by mail", "newPassword":"nuevo password" }
+ Response 200 (application/json)
+ Body
{
"msg": "Password changed",
"person": {
"birthdate": "1978-02-10T00:00:00.000-06:00",
"email": "[email protected]",
"gender": "FEMALE",
"id": "c4af6c48-aa36-4af7-b9dd-6d5056f586b2",
"name": "KARLA PAOLA"
}
}
## Upload an avatar [/v1/people/uploadAvatar]
### Upload a new avatar for the user [POST]
With this service we can upload you avatar, it is a multipart request
To generate thumbnails we need as input an entrance of a image with minimum 300x300
The message has to be URLEncoded correctly
This is a normal FORM!
+ Request
+ Headers
X-Auth-Token: {token}
Content-Length: 15532
Content-Type: multipart/form-data;boundary=434efe46ca3446f093b4c9ec79a99a14
+ Body
--434efe46ca3446f093b4c9ec79a99a14
Content-Type: application/octet-stream
Content-Disposition: form-data; name="avatar"; filename="me.png"
...
+ Response 200 (application/json)
{
"filename": "28e3eb32-a7d4-419c-8e0b-fd68b7a9ff27-x1396013843-me.png",
"mimeType": "image/png",
"originalFilename": "me.png",
"processedImages": {
"baseUrl": "https://mtfan-dev.s3.amazonaws.com/fan/usercontent/7e4e6cbe-26a8-49c5-b999-78805fb39f4c-test-",
"images": {
"resized": [
{
"size": {
"h": 180,
"w": 240
},
"suffix": "240x180.jpg"
}
],
"thumbnails": [
{
"size": 300,
"suffix": "thumb-300.jpg"
}
]
}
},
"url": "https://mtfan-dev.s3.amazonaws.com/28e3eb32-a7d4-419c-8e0b-fd68b7a9ff27-x1396013843-me.png",
"uuid": "28e3eb32-a7d4-419c-8e0b-fd68b7a9ff27"
}
# Group Follow
## Follow multiple things at once [/v1/follow]
### POST
This resource marks a Follow between the current user and the actors specified in the json map input. See request body for input structure.
`Please use your MTSocial API account credentials for API calls.`
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
"people": [
"363f6cf8-4bcf-4d84-a33e-15a01657885b",
"363f6cf8-4bcf-4d84-a33e-15a01657885c"
],
"teams": [
"IdInexistente123",
"AnotherId"
],
"matches": [
"IdIntexistenteABC",
"AnotherId"
]
}
+ Response 200 (application/json)
+ Body
{
"matches": [
{
"id": "IdIntexistenteABC",
"status": "FAIL"
},
{
"id": "AnotherId",
"status": "OK"
}
],
"people": [
{
"id": "363f6cf8-4bcf-4d84-a33e-15a01657885b",
"status": "OK"
},
{
"id": "363f6cf8-4bcf-4d84-a33e-15a01657885c",
"status": "OK"
}
],
"teams": [
{
"id": "IdInexistente123",
"status": "FAIL"
},
{
"id": "AnotherId",
"status": "OK"
}
]
}
## Follow something [/v1/follow/${followedType}/${followedId}]
### POST
This resource mark a Follow between the current user and a [person|team|match]
The request has the following parameters:
- **followedType** Required, It is the Type of the stuff to be followed. It can be: [ *person* | *team* | *match* ]
- **followedId** Required, It is the Id of the stuff to be followed. Example: *0aeaa55c-43d7-458b-be7e-53005f4c4e36*
`Please use your MTSocial API account credentials for API calls.`
+ Request (application/json)
+ Headers
Accept: application/json
+ Body
{
}
+ Response 200 (application/json)
+ Body
{
"checkin": null,
"comment": null,
"follow": {
"follower": {
"avatarUrl": null,
"id": "b5e61df9-cbe2-4d43-a8af-7d37ee80f144",
"type": "person"
},
"following": {
"avatarUrl": null,
"id": "0aeaa55c-43d7-458b-be7e-53005f4c4e36",
"type": "person"
}
},
"id": "6099eadd-7542-4a4a-b970-c274c85bec29",
"like": null,
"media": null,
"parentId": null,
"publisher": {
"avatarUrl": null,
"id": "3c7c2c0b-42e6-4acd-845d-6f737b72a141",
"type": "person"
},
"sharedId": null,
"timestamp": "2014-04-07T13:06:23.308-05:00"
}
### DELETE
This resource mark an UnFollow between the current user and a [person|team|match]
The request has the following parameters:
- **followedType** Required, It is the Type of the stuff to be followed. It can be: [ *person* | *team* | *match* ]
- **followedId** Required, It is the Id of the stuff to be followed. Example: *0aeaa55c-43d7-458b-be7e-53005f4c4e36*
`Please use your MTSocial API account credentials for API calls.`
+ Request
+ Headers
Accept: application/json
+ Body
{
}
+ Response 204
## Returns all followers of the current user [/v1/follow/followers{?max,offset,type,fullResponse,includeStats,compatibleOldVersion}]
### GET
This resource get all followers of the current user
The request has the following parameters:
- **type** (Optional) It is the type of the followers. It can be: [ *person* | *team* | *match* ] If not specified then returns all following of any type
- **max** (Optional) For pagination, number of elements
- **offset** (Optional) For pagination, result offset
- **includeStats** (Optional)Default is true. Counter details are added to response: following, followingCount, followingDetail, followerCount, followersDetail.
- **fullResponse** (Optional)Default is true. The response include full details as stadium, goals, etc. If *false* then only responds basic info as url, id and name.
- **compatibleOldVersion** (Optional )Default is true, the response has duplicated fields in order to preserve compatability. It is HIGHLY recommended to use with compatibleOldVersion = *false* in order to obtain a cleaner response.
`Please use your MTSocial API account credentials for API calls.`
+ Request
+ Headers
Accept: application/json
+ Body
{
}
+ Response 200 (application/json)
+ Body
[
{
"avatarUrl": null,
"birthdate": null,
"email": "[email protected]",
"followerCount": 1,
"followers": 1,
"following": true,
"followingCount": 2,
"gender": null,
"id": "9290156e-ca5c-4d4c-91fd-c0878b21b081",
"media": null,
"name": "Domingo Suarez Torres",
"recentActivity": null,
"type": "person"
},
{
"avatarUrl": null,
"birthdate": null,
"email": "[email protected]",
"followerCount": 1,
"followers": 1,
"following": true,
"followingCount": 2,
"gender": null,
"id": "9290156e-ca5c-4d4c-91fd-33333333333",
"media": null,
"name": "Otro Domingo Suarez Torres",
"recentActivity": null,
"type": "person"
}
]
## Returns all following of the current user [/v1/follow/following{?max,offset,type,fullResponse,includeStats,compatibleOldVersion}]
### GET
This resource get all following of the current user
The request has the following parameters:
- **type** Optional. It is the type of the followings. It can be: [ *person* | *team* | *match* ] If not specified then returns all following of any type
- **max** (Optional) For pagination, number of elements
- **offset** (Optional) For pagination, result offset
- **includeStats** (Optional)Default is true. Counter details are added to response: following, followingCount, followingDetail, followerCount, followersDetail.
- **fullResponse** (Optional)Default is true. The response include full details as stadium, goals, etc. If *false* then only responds basic info as url, id and name.
- **compatibleOldVersion** (Optional )Default is true, the response has duplicated fields in order to preserve compatability. It is HIGHLY recommended to use with compatibleOldVersion = *false* in order to obtain a cleaner response.
`Please use your MTSocial API account credentials for API calls.`
+ Request
+ Headers
Accept: application/json
+ Body
{
}
+ Response 200 (application/json)
+ Body
[
{
"avatarUrl": null,
"birthdate": null,
"email": "[email protected]",
"followerCount": 1,
"followers": 1,
"following": true,
"followingCount": 2,
"gender": null,
"id": "9290156e-ca5c-4d4c-91fd-c0878b21b081",
"media": null,
"name": "Domingo Suarez Torres",
"recentActivity": null,
"type": "person"
},
{
"avatarUrl": null,
"birthdate": null,
"email": "[email protected]",
"followerCount": 1,
"followers": 1,
"following": true,
"followingCount": 2,
"gender": null,
"id": "9290156e-ca5c-4d4c-91fd-33333333333",
"media": null,
"name": "Otro Domingo Suarez Torres",
"recentActivity": null,
"type": "person"
}
]
## Returns all followers of an actor [/v1/follow/followers/${actorType}/${actorId}{?max,offset,type,fullResponse,includeStats,compatibleOldVersion}]
### GET
This resource get all followers of the specified actor
The request has the following parameters:
- **type** (Optional) It is the type of the followers. It can be: [ *person* | *team* | *match* ] If not specified then returns all following of any type
- **max** (Optional) For pagination, number of elements
- **offset** (Optional) For pagination, result offset
- **includeStats** (Optional)Default is true. Counter details are added to response: following, followingCount, followingDetail, followerCount, followersDetail.
- **fullResponse** (Optional)Default is true. The response include full details as stadium, goals, etc. If *false* then only responds basic info as url, id and name.
- **compatibleOldVersion** (Optional )Default is true, the response has duplicated fields in order to preserve compatability. It is HIGHLY recommended to use with compatibleOldVersion = *false* in order to obtain a cleaner response.
`Please use your MTSocial API account credentials for API calls.`
+ Request
+ Headers
Accept: application/json
+ Body
{
}
+ Response 200 (application/json)
+ Body
[
{
"avatarUrl": null,
"birthdate": null,
"email": "[email protected]",
"followerCount": 1,
"followers": 1,
"following": true,
"followingCount": 2,
"gender": null,
"id": "9290156e-ca5c-4d4c-91fd-c0878b21b081",
"media": null,
"name": "Domingo Suarez Torres",
"recentActivity": null,
"type": "person"
},
{
"avatarUrl": null,
"birthdate": null,
"email": "[email protected]",
"followerCount": 1,
"followers": 1,
"following": true,
"followingCount": 2,
"gender": null,
"id": "9290156e-ca5c-4d4c-91fd-33333333333",
"media": null,
"name": "Otro Domingo Suarez Torres",
"recentActivity": null,
"type": "person"
}
]
## Returns all following of an actor [/v1/follow/following/${actorType}/${actorId}{?max,offset,type,fullResponse,includeStats,compatibleOldVersion}]
### GET
This resource get all following of the specified actor
The request has the following parameters:
- **type** Optional. It is the type of the followings. It can be: [ *person* | *team* | *match* ] If not specified then returns all following of any type
- **max** (Optional) For pagination, number of elements
- **offset** (Optional) For pagination, result offset
- **includeStats** (Optional)Default is true. Counter details are added to response: following, followingCount, followingDetail, followerCount, followersDetail.
- **fullResponse** (Optional)Default is true. The response include full details as stadium, goals, etc. If *false* then only responds basic info as url, id and name.
- **compatibleOldVersion** (Optional )Default is true, the response has duplicated fields in order to preserve compatability. It is HIGHLY recommended to use with compatibleOldVersion = *false* in order to obtain a cleaner response.
`Please use your MTSocial API account credentials for API calls.`
+ Request
+ Headers
Accept: application/json
+ Body
{
}
+ Response 200 (application/json)
+ Body