diff --git a/examples/fetchFriends.json b/examples/fetchFriends.json index 5bcd7726..71a684f8 100644 --- a/examples/fetchFriends.json +++ b/examples/fetchFriends.json @@ -1 +1 @@ -[{"memberDistance":{"value":"DISTANCE_1","$type":"com.linkedin.voyager.common.MemberDistance"},"image":{"attributes":[{"sourceType":"PROFILE_PICTURE","*miniProfile":"urn:li:fs_miniProfile:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","$type":"com.linkedin.voyager.common.ImageAttribute"}],"accessibilityTextAttributes":[],"$type":"com.linkedin.voyager.common.ImageViewModel"},"targetUrn":"urn:li:fs_miniProfile:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","socialProofImagePile":[],"trackingUrn":"urn:li:member:78270583","navigationUrl":"https://www.linkedin.com/in/gauri-chadha-58726722","title":{"textDirection":"USER_LOCALE","text":"Gauri Chadha","$type":"com.linkedin.voyager.common.TextViewModel"},"type":"PROFILE","$type":"com.linkedin.voyager.search.SearchHitV2","headless":false,"socialProofText":"0 shared connections","secondaryTitle":{"textDirection":"USER_LOCALE","text":"1st","$type":"com.linkedin.voyager.common.TextViewModel"},"*badges":"urn:li:fs_memberBadges:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","publicIdentifier":"gauri-chadha-58726722","headline":{"textDirection":"USER_LOCALE","text":"CA, LL.B. , IIM A Alumna , Tax Guru on CNBC Awaaz and Zee Business , Columnist","$type":"com.linkedin.voyager.common.TextViewModel"},"nameMatch":false,"subline":{"textDirection":"USER_LOCALE","text":"Delhi, India","$type":"com.linkedin.voyager.common.TextViewModel"},"trackingId":"T4NlD020QjCbo+uuauzeyg==","profile":{"customPronoun":null,"lastName":"Chadha","memorialized":null,"dashEntityUrn":"urn:li:fsd_profile:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","standardizedPronoun":null,"occupation":"CA, LL.B. , IIM A Alumna , Tax Guru on CNBC Awaaz and Zee Business , Columnist","objectUrn":"urn:li:member:78270583","backgroundImage":null,"picture":{"artifacts":[{"width":100,"fileIdentifyingUrlPathSegment":"100_100/0/1584264699453?e=1660780800&v=beta&t=sDQ47cEGYrNTVTdLTEQc_xqhFulnOWWb-qNTcVAb9-Y","expiresAt":1660780800000,"height":100,"$type":"com.linkedin.common.VectorArtifact"},{"width":200,"fileIdentifyingUrlPathSegment":"200_200/0/1584264699453?e=1660780800&v=beta&t=p9GgtRH16D72wulsYniErDPd9xpw4HM4TsyPofaT9nE","expiresAt":1660780800000,"height":200,"$type":"com.linkedin.common.VectorArtifact"},{"width":400,"fileIdentifyingUrlPathSegment":"400_400/0/1584264699453?e=1660780800&v=beta&t=Zp-pXn5azdIsUvcLUVbFVQtoiT2_T-_feDEKZqzv9q0","expiresAt":1660780800000,"height":400,"$type":"com.linkedin.common.VectorArtifact"},{"width":800,"fileIdentifyingUrlPathSegment":"800_800/0/1584264699453?e=1660780800&v=beta&t=DieKfv4brml_UjBtOesgi171Q61VU4VSD7oBGSp9uOQ","expiresAt":1660780800000,"height":800,"$type":"com.linkedin.common.VectorArtifact"}],"rootUrl":"https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_","$type":"com.linkedin.common.VectorImage"},"$type":"com.linkedin.voyager.identity.shared.MiniProfile","firstName":"Gauri","entityUrn":"urn:li:fs_miniProfile:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","publicIdentifier":"gauri-chadha-58726722","trackingId":"YWatovyGTr68ZMI+o9dPxA==","pictureUrls":["https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_100_100/0/1584264699453?e=1660780800&v=beta&t=sDQ47cEGYrNTVTdLTEQc_xqhFulnOWWb-qNTcVAb9-Y","https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_200_200/0/1584264699453?e=1660780800&v=beta&t=p9GgtRH16D72wulsYniErDPd9xpw4HM4TsyPofaT9nE","https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_400_400/0/1584264699453?e=1660780800&v=beta&t=Zp-pXn5azdIsUvcLUVbFVQtoiT2_T-_feDEKZqzv9q0","https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_800_800/0/1584264699453?e=1660780800&v=beta&t=DieKfv4brml_UjBtOesgi171Q61VU4VSD7oBGSp9uOQ"],"profileId":"ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg"}},{"memberDistance":{"value":"DISTANCE_1","$type":"com.linkedin.voyager.common.MemberDistance"},"image":{"attributes":[{"sourceType":"PROFILE_PICTURE","*miniProfile":"urn:li:fs_miniProfile:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","$type":"com.linkedin.voyager.common.ImageAttribute"}],"accessibilityTextAttributes":[],"$type":"com.linkedin.voyager.common.ImageViewModel"},"targetUrn":"urn:li:fs_miniProfile:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","socialProofImagePile":[],"trackingUrn":"urn:li:member:113525187","navigationUrl":"https://www.linkedin.com/in/jacob-fuchs-54302932","title":{"textDirection":"USER_LOCALE","text":"Jacob Fuchs","$type":"com.linkedin.voyager.common.TextViewModel"},"type":"PROFILE","$type":"com.linkedin.voyager.search.SearchHitV2","headless":false,"socialProofText":"0 shared connections","secondaryTitle":{"textDirection":"USER_LOCALE","text":"1st","$type":"com.linkedin.voyager.common.TextViewModel"},"*badges":"urn:li:fs_memberBadges:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","publicIdentifier":"jacob-fuchs-54302932","headline":{"textDirection":"USER_LOCALE","text":"shoe,Technician","$type":"com.linkedin.voyager.common.TextViewModel"},"nameMatch":false,"subline":{"textDirection":"USER_LOCALE","text":"China","$type":"com.linkedin.voyager.common.TextViewModel"},"trackingId":"/aNJpdCFRQ2Erh8UxoHs4Q==","profile":{"customPronoun":null,"lastName":"Fuchs","memorialized":null,"dashEntityUrn":"urn:li:fsd_profile:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","standardizedPronoun":null,"occupation":"shoe,Technician","objectUrn":"urn:li:member:113525187","backgroundImage":null,"picture":{"artifacts":[{"width":100,"fileIdentifyingUrlPathSegment":"100_100/0/1544841940714?e=1660780800&v=beta&t=oJoilGGj0fECM_ZmPYFtEVU0H9mCw0kuPtgEVQ27FoU","expiresAt":1660780800000,"height":100,"$type":"com.linkedin.common.VectorArtifact"},{"width":200,"fileIdentifyingUrlPathSegment":"200_200/0/1544841940714?e=1660780800&v=beta&t=tf0phGkOsDaeIVMKJ-PM5UBAv0vKKzoos4Ls4o47a1s","expiresAt":1660780800000,"height":200,"$type":"com.linkedin.common.VectorArtifact"},{"width":400,"fileIdentifyingUrlPathSegment":"400_400/0/1544841940714?e=1660780800&v=beta&t=jYSSps7Sk1OanVMFNVJGjKbXTA72VIwS4eF9Iu-cTh4","expiresAt":1660780800000,"height":400,"$type":"com.linkedin.common.VectorArtifact"},{"width":800,"fileIdentifyingUrlPathSegment":"800_800/0/1544841940714?e=1660780800&v=beta&t=8NWRGvIkUPlgmi6_O8zLvd9yifzlDOePS4W2OED1IFk","expiresAt":1660780800000,"height":800,"$type":"com.linkedin.common.VectorArtifact"}],"rootUrl":"https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_","$type":"com.linkedin.common.VectorImage"},"$type":"com.linkedin.voyager.identity.shared.MiniProfile","firstName":"Jacob","entityUrn":"urn:li:fs_miniProfile:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","publicIdentifier":"jacob-fuchs-54302932","trackingId":"tnvHrbtNRvS2HqrLLV2wbA==","pictureUrls":["https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_100_100/0/1544841940714?e=1660780800&v=beta&t=oJoilGGj0fECM_ZmPYFtEVU0H9mCw0kuPtgEVQ27FoU","https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_200_200/0/1544841940714?e=1660780800&v=beta&t=tf0phGkOsDaeIVMKJ-PM5UBAv0vKKzoos4Ls4o47a1s","https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_400_400/0/1544841940714?e=1660780800&v=beta&t=jYSSps7Sk1OanVMFNVJGjKbXTA72VIwS4eF9Iu-cTh4","https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_800_800/0/1544841940714?e=1660780800&v=beta&t=8NWRGvIkUPlgmi6_O8zLvd9yifzlDOePS4W2OED1IFk"],"profileId":"ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM"}},{"memberDistance":{"value":"DISTANCE_1","$type":"com.linkedin.voyager.common.MemberDistance"},"image":{"attributes":[{"sourceType":"PROFILE_PICTURE","*miniProfile":"urn:li:fs_miniProfile:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","$type":"com.linkedin.voyager.common.ImageAttribute"}],"accessibilityTextAttributes":[],"$type":"com.linkedin.voyager.common.ImageViewModel"},"targetUrn":"urn:li:fs_miniProfile:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","socialProofImagePile":[],"trackingUrn":"urn:li:member:31380494","navigationUrl":"https://www.linkedin.com/in/chadhachetan","title":{"textDirection":"USER_LOCALE","text":"Chetan Chadha","$type":"com.linkedin.voyager.common.TextViewModel"},"type":"PROFILE","$type":"com.linkedin.voyager.search.SearchHitV2","headless":false,"socialProofText":"0 shared connections","secondaryTitle":{"textDirection":"USER_LOCALE","text":"1st","$type":"com.linkedin.voyager.common.TextViewModel"},"*badges":"urn:li:fs_memberBadges:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","publicIdentifier":"chadhachetan","headline":{"textDirection":"USER_LOCALE","text":"Partner at Chadha & Chadha","$type":"com.linkedin.voyager.common.TextViewModel"},"nameMatch":false,"subline":{"textDirection":"USER_LOCALE","text":"Delhi, India","$type":"com.linkedin.voyager.common.TextViewModel"},"trackingId":"F6pz/oGmQfedvwBkkGXaBw==","profile":{"customPronoun":null,"lastName":"Chadha","memorialized":null,"dashEntityUrn":"urn:li:fsd_profile:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","standardizedPronoun":null,"occupation":"Partner at Chadha & Chadha","objectUrn":"urn:li:member:31380494","backgroundImage":null,"picture":{"artifacts":[{"width":100,"fileIdentifyingUrlPathSegment":"100_100/0/1592834367578?e=1660780800&v=beta&t=7OncrJdAfqON65cm-IBbGSa_rcnV68VPNUuys8oYf5s","expiresAt":1660780800000,"height":100,"$type":"com.linkedin.common.VectorArtifact"},{"width":200,"fileIdentifyingUrlPathSegment":"200_200/0/1592834367578?e=1660780800&v=beta&t=AXvSWXpElSYgXd0WjlQkKQKoVDnpG3KgcWHfRqVDPM4","expiresAt":1660780800000,"height":200,"$type":"com.linkedin.common.VectorArtifact"},{"width":400,"fileIdentifyingUrlPathSegment":"400_400/0/1592834367578?e=1660780800&v=beta&t=AMd-BHKG46cfnsiAzgxVSlnGDxUnuK2doEEGXUeRP7I","expiresAt":1660780800000,"height":400,"$type":"com.linkedin.common.VectorArtifact"},{"width":800,"fileIdentifyingUrlPathSegment":"800_800/0/1592834367578?e=1660780800&v=beta&t=CWIEWSw4AX2_Xsq9uI5UYgOFbYeEZFED4KrM-Xtllg8","expiresAt":1660780800000,"height":800,"$type":"com.linkedin.common.VectorArtifact"}],"rootUrl":"https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_","$type":"com.linkedin.common.VectorImage"},"$type":"com.linkedin.voyager.identity.shared.MiniProfile","firstName":"Chetan","entityUrn":"urn:li:fs_miniProfile:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","publicIdentifier":"chadhachetan","trackingId":"JplaghPbQDeFqejZOALgUg==","pictureUrls":["https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_100_100/0/1592834367578?e=1660780800&v=beta&t=7OncrJdAfqON65cm-IBbGSa_rcnV68VPNUuys8oYf5s","https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_200_200/0/1592834367578?e=1660780800&v=beta&t=AXvSWXpElSYgXd0WjlQkKQKoVDnpG3KgcWHfRqVDPM4","https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_400_400/0/1592834367578?e=1660780800&v=beta&t=AMd-BHKG46cfnsiAzgxVSlnGDxUnuK2doEEGXUeRP7I","https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_800_800/0/1592834367578?e=1660780800&v=beta&t=CWIEWSw4AX2_Xsq9uI5UYgOFbYeEZFED4KrM-Xtllg8"],"profileId":"ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8"}}] \ No newline at end of file +[{"memberDistance":{"value":"DISTANCE_1","$type":"com.linkedin.voyager.common.MemberDistance"},"image":{"attributes":[{"sourceType":"PROFILE_PICTURE","*miniProfile":"urn:li:fs_miniProfile:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","$type":"com.linkedin.voyager.common.ImageAttribute"}],"accessibilityTextAttributes":[],"$type":"com.linkedin.voyager.common.ImageViewModel"},"targetUrn":"urn:li:fs_miniProfile:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","socialProofImagePile":[],"trackingUrn":"urn:li:member:78270583","navigationUrl":"https://www.linkedin.com/in/gauri-chadha-58726722","title":{"textDirection":"USER_LOCALE","text":"Gauri Chadha","$type":"com.linkedin.voyager.common.TextViewModel"},"type":"PROFILE","$type":"com.linkedin.voyager.search.SearchHitV2","headless":false,"socialProofText":"0 shared connections","secondaryTitle":{"textDirection":"USER_LOCALE","text":"1st","$type":"com.linkedin.voyager.common.TextViewModel"},"*badges":"urn:li:fs_memberBadges:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","publicIdentifier":"gauri-chadha-58726722","headline":{"textDirection":"USER_LOCALE","text":"CA, LL.B. , IIM A Alumna , Tax Guru on CNBC Awaaz and Zee Business , Columnist","$type":"com.linkedin.voyager.common.TextViewModel"},"nameMatch":false,"subline":{"textDirection":"USER_LOCALE","text":"Delhi, India","$type":"com.linkedin.voyager.common.TextViewModel"},"trackingId":"vrxVPBSYQPm8WdCwADGwhg==","profile":{"customPronoun":null,"lastName":"Chadha","memorialized":null,"dashEntityUrn":"urn:li:fsd_profile:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","standardizedPronoun":null,"occupation":"CA, LL.B. , IIM A Alumna , Tax Guru on CNBC Awaaz and Zee Business , Columnist","objectUrn":"urn:li:member:78270583","backgroundImage":null,"picture":{"artifacts":[{"width":100,"fileIdentifyingUrlPathSegment":"100_100/0/1584264699453?e=1660780800&v=beta&t=sDQ47cEGYrNTVTdLTEQc_xqhFulnOWWb-qNTcVAb9-Y","expiresAt":1660780800000,"height":100,"$type":"com.linkedin.common.VectorArtifact"},{"width":200,"fileIdentifyingUrlPathSegment":"200_200/0/1584264699453?e=1660780800&v=beta&t=p9GgtRH16D72wulsYniErDPd9xpw4HM4TsyPofaT9nE","expiresAt":1660780800000,"height":200,"$type":"com.linkedin.common.VectorArtifact"},{"width":400,"fileIdentifyingUrlPathSegment":"400_400/0/1584264699453?e=1660780800&v=beta&t=Zp-pXn5azdIsUvcLUVbFVQtoiT2_T-_feDEKZqzv9q0","expiresAt":1660780800000,"height":400,"$type":"com.linkedin.common.VectorArtifact"},{"width":800,"fileIdentifyingUrlPathSegment":"800_800/0/1584264699453?e=1660780800&v=beta&t=DieKfv4brml_UjBtOesgi171Q61VU4VSD7oBGSp9uOQ","expiresAt":1660780800000,"height":800,"$type":"com.linkedin.common.VectorArtifact"}],"rootUrl":"https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_","$type":"com.linkedin.common.VectorImage"},"$type":"com.linkedin.voyager.identity.shared.MiniProfile","firstName":"Gauri","entityUrn":"urn:li:fs_miniProfile:ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg","publicIdentifier":"gauri-chadha-58726722","trackingId":"NE7QoYa9QU2V9YX7yzgQOA==","pictureUrls":["https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_100_100/0/1584264699453?e=1660780800&v=beta&t=sDQ47cEGYrNTVTdLTEQc_xqhFulnOWWb-qNTcVAb9-Y","https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_200_200/0/1584264699453?e=1660780800&v=beta&t=p9GgtRH16D72wulsYniErDPd9xpw4HM4TsyPofaT9nE","https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_400_400/0/1584264699453?e=1660780800&v=beta&t=Zp-pXn5azdIsUvcLUVbFVQtoiT2_T-_feDEKZqzv9q0","https://media-exp1.licdn.com/dms/image/C5603AQGUJ_c-iDMUdQ/profile-displayphoto-shrink_800_800/0/1584264699453?e=1660780800&v=beta&t=DieKfv4brml_UjBtOesgi171Q61VU4VSD7oBGSp9uOQ"],"profileId":"ACoAAASqUHcBpKY76BQEh4zYF3Ee_Z6UHqjSeKg"}},{"memberDistance":{"value":"DISTANCE_1","$type":"com.linkedin.voyager.common.MemberDistance"},"image":{"attributes":[{"sourceType":"PROFILE_PICTURE","*miniProfile":"urn:li:fs_miniProfile:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","$type":"com.linkedin.voyager.common.ImageAttribute"}],"accessibilityTextAttributes":[],"$type":"com.linkedin.voyager.common.ImageViewModel"},"targetUrn":"urn:li:fs_miniProfile:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","socialProofImagePile":[],"trackingUrn":"urn:li:member:113525187","navigationUrl":"https://www.linkedin.com/in/jacob-fuchs-54302932","title":{"textDirection":"USER_LOCALE","text":"Jacob Fuchs","$type":"com.linkedin.voyager.common.TextViewModel"},"type":"PROFILE","$type":"com.linkedin.voyager.search.SearchHitV2","headless":false,"socialProofText":"0 shared connections","secondaryTitle":{"textDirection":"USER_LOCALE","text":"1st","$type":"com.linkedin.voyager.common.TextViewModel"},"*badges":"urn:li:fs_memberBadges:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","publicIdentifier":"jacob-fuchs-54302932","headline":{"textDirection":"USER_LOCALE","text":"shoe,Technician","$type":"com.linkedin.voyager.common.TextViewModel"},"nameMatch":false,"subline":{"textDirection":"USER_LOCALE","text":"China","$type":"com.linkedin.voyager.common.TextViewModel"},"trackingId":"IVo41jSCS6aBfu1JDH+ktQ==","profile":{"customPronoun":null,"lastName":"Fuchs","memorialized":null,"dashEntityUrn":"urn:li:fsd_profile:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","standardizedPronoun":null,"occupation":"shoe,Technician","objectUrn":"urn:li:member:113525187","backgroundImage":null,"picture":{"artifacts":[{"width":100,"fileIdentifyingUrlPathSegment":"100_100/0/1544841940714?e=1660780800&v=beta&t=oJoilGGj0fECM_ZmPYFtEVU0H9mCw0kuPtgEVQ27FoU","expiresAt":1660780800000,"height":100,"$type":"com.linkedin.common.VectorArtifact"},{"width":200,"fileIdentifyingUrlPathSegment":"200_200/0/1544841940714?e=1660780800&v=beta&t=tf0phGkOsDaeIVMKJ-PM5UBAv0vKKzoos4Ls4o47a1s","expiresAt":1660780800000,"height":200,"$type":"com.linkedin.common.VectorArtifact"},{"width":400,"fileIdentifyingUrlPathSegment":"400_400/0/1544841940714?e=1660780800&v=beta&t=jYSSps7Sk1OanVMFNVJGjKbXTA72VIwS4eF9Iu-cTh4","expiresAt":1660780800000,"height":400,"$type":"com.linkedin.common.VectorArtifact"},{"width":800,"fileIdentifyingUrlPathSegment":"800_800/0/1544841940714?e=1660780800&v=beta&t=8NWRGvIkUPlgmi6_O8zLvd9yifzlDOePS4W2OED1IFk","expiresAt":1660780800000,"height":800,"$type":"com.linkedin.common.VectorArtifact"}],"rootUrl":"https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_","$type":"com.linkedin.common.VectorImage"},"$type":"com.linkedin.voyager.identity.shared.MiniProfile","firstName":"Jacob","entityUrn":"urn:li:fs_miniProfile:ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM","publicIdentifier":"jacob-fuchs-54302932","trackingId":"TV5sQeQ1SM2qPuf7/kyW5Q==","pictureUrls":["https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_100_100/0/1544841940714?e=1660780800&v=beta&t=oJoilGGj0fECM_ZmPYFtEVU0H9mCw0kuPtgEVQ27FoU","https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_200_200/0/1544841940714?e=1660780800&v=beta&t=tf0phGkOsDaeIVMKJ-PM5UBAv0vKKzoos4Ls4o47a1s","https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_400_400/0/1544841940714?e=1660780800&v=beta&t=jYSSps7Sk1OanVMFNVJGjKbXTA72VIwS4eF9Iu-cTh4","https://media-exp1.licdn.com/dms/image/C5103AQHzcONlGj-GyA/profile-displayphoto-shrink_800_800/0/1544841940714?e=1660780800&v=beta&t=8NWRGvIkUPlgmi6_O8zLvd9yifzlDOePS4W2OED1IFk"],"profileId":"ACoAAAbEQcMB0UVWb1jrh7LdrF6mpeRP951QmWM"}},{"memberDistance":{"value":"DISTANCE_1","$type":"com.linkedin.voyager.common.MemberDistance"},"image":{"attributes":[{"sourceType":"PROFILE_PICTURE","*miniProfile":"urn:li:fs_miniProfile:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","$type":"com.linkedin.voyager.common.ImageAttribute"}],"accessibilityTextAttributes":[],"$type":"com.linkedin.voyager.common.ImageViewModel"},"targetUrn":"urn:li:fs_miniProfile:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","socialProofImagePile":[],"trackingUrn":"urn:li:member:31380494","navigationUrl":"https://www.linkedin.com/in/chadhachetan","title":{"textDirection":"USER_LOCALE","text":"Chetan Chadha","$type":"com.linkedin.voyager.common.TextViewModel"},"type":"PROFILE","$type":"com.linkedin.voyager.search.SearchHitV2","headless":false,"socialProofText":"0 shared connections","secondaryTitle":{"textDirection":"USER_LOCALE","text":"1st","$type":"com.linkedin.voyager.common.TextViewModel"},"*badges":"urn:li:fs_memberBadges:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","publicIdentifier":"chadhachetan","headline":{"textDirection":"USER_LOCALE","text":"Partner at Chadha & Chadha","$type":"com.linkedin.voyager.common.TextViewModel"},"nameMatch":false,"subline":{"textDirection":"USER_LOCALE","text":"Delhi, India","$type":"com.linkedin.voyager.common.TextViewModel"},"trackingId":"xOwFqGZOTAqiFBMfUNVOIg==","profile":{"customPronoun":null,"lastName":"Chadha","memorialized":null,"dashEntityUrn":"urn:li:fsd_profile:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","standardizedPronoun":null,"occupation":"Partner at Chadha & Chadha","objectUrn":"urn:li:member:31380494","backgroundImage":null,"picture":{"artifacts":[{"width":100,"fileIdentifyingUrlPathSegment":"100_100/0/1592834367578?e=1660780800&v=beta&t=7OncrJdAfqON65cm-IBbGSa_rcnV68VPNUuys8oYf5s","expiresAt":1660780800000,"height":100,"$type":"com.linkedin.common.VectorArtifact"},{"width":200,"fileIdentifyingUrlPathSegment":"200_200/0/1592834367578?e=1660780800&v=beta&t=AXvSWXpElSYgXd0WjlQkKQKoVDnpG3KgcWHfRqVDPM4","expiresAt":1660780800000,"height":200,"$type":"com.linkedin.common.VectorArtifact"},{"width":400,"fileIdentifyingUrlPathSegment":"400_400/0/1592834367578?e=1660780800&v=beta&t=AMd-BHKG46cfnsiAzgxVSlnGDxUnuK2doEEGXUeRP7I","expiresAt":1660780800000,"height":400,"$type":"com.linkedin.common.VectorArtifact"},{"width":800,"fileIdentifyingUrlPathSegment":"800_800/0/1592834367578?e=1660780800&v=beta&t=CWIEWSw4AX2_Xsq9uI5UYgOFbYeEZFED4KrM-Xtllg8","expiresAt":1660780800000,"height":800,"$type":"com.linkedin.common.VectorArtifact"}],"rootUrl":"https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_","$type":"com.linkedin.common.VectorImage"},"$type":"com.linkedin.voyager.identity.shared.MiniProfile","firstName":"Chetan","entityUrn":"urn:li:fs_miniProfile:ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8","publicIdentifier":"chadhachetan","trackingId":"oe59RUpAQUaT9ywEbUUT7Q==","pictureUrls":["https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_100_100/0/1592834367578?e=1660780800&v=beta&t=7OncrJdAfqON65cm-IBbGSa_rcnV68VPNUuys8oYf5s","https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_200_200/0/1592834367578?e=1660780800&v=beta&t=AXvSWXpElSYgXd0WjlQkKQKoVDnpG3KgcWHfRqVDPM4","https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_400_400/0/1592834367578?e=1660780800&v=beta&t=AMd-BHKG46cfnsiAzgxVSlnGDxUnuK2doEEGXUeRP7I","https://media-exp1.licdn.com/dms/image/C4D03AQFw2YR1V2cjeg/profile-displayphoto-shrink_800_800/0/1592834367578?e=1660780800&v=beta&t=CWIEWSw4AX2_Xsq9uI5UYgOFbYeEZFED4KrM-Xtllg8"],"profileId":"ACoAAAHe1A4BZ7OSmXIVRB0NupZR6990b0dv6f8"}}] \ No newline at end of file diff --git a/examples/search_2.ts b/examples/search_2.ts index 86bc6c70..a05660b0 100644 --- a/examples/search_2.ts +++ b/examples/search_2.ts @@ -24,14 +24,14 @@ JSESSIONID = "ajax:3513817161874270460"; useCache: false }) - let peopleSearchScroller = client.search.searchOwnConnections(); + let peopleSearchScroller = client.clone().search.searchOwnConnections(); let res = []; while(!peopleSearchScroller.hitEndOfResults){ res.push(...await peopleSearchScroller.scrollNext()); } console.log(res) - peopleSearchScroller = client.search.searchOwnConnections(); + peopleSearchScroller = client.clone().search.searchOwnConnections(); res = [] while(!peopleSearchScroller.hitEndOfResults){ res.push(...await peopleSearchScroller.scrollNext()); diff --git a/package.json b/package.json index 63294c9e..9d8b7c99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shiqiyue-linkedin-private-api", - "version": "1.1.23", + "version": "1.1.24", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/core/client.ts b/src/core/client.ts index 94edeb5b..f1b41027 100644 --- a/src/core/client.ts +++ b/src/core/client.ts @@ -11,6 +11,7 @@ import { LinkedInRequest } from './linkedin-request'; import { Login } from './login'; import {DecorationIds} from "./decorationIds"; import {Profile} from "../entities"; +import {AuthCookies} from "../types"; interface ClientOpts { proxy?: AxiosProxyConfig; @@ -26,6 +27,8 @@ export class Client { li_at?: string; + AuthCookies?:AuthCookies; + constructor({ proxy,httpAgent, httpsAgent,decorationIds }: ClientOpts = {}) { this.request = new LinkedInRequest({ proxy,httpAgent, httpsAgent,decorationIds }); } @@ -41,4 +44,14 @@ export class Client { conversation = new ConversationRepository({ client: this }); message = new MessageRepository({ client: this }); + + clone(): Client { + const client = new Client(this.request.configs); + client.login.userCookie({ + cookies: this.AuthCookies, + useCache: false + }) + client.myProfile = this.myProfile + return client + } } diff --git a/src/core/login.ts b/src/core/login.ts index a835af87..e91dd177 100644 --- a/src/core/login.ts +++ b/src/core/login.ts @@ -108,27 +108,21 @@ export class Login { return this.client; } - async userCookie({ + userCookie({ username, cookies, - useCache = true, }: { username?: string; cookies: AuthCookies; useCache?: boolean; - }): Promise { - const cachedSessions = await this.readCacheFile(); - - if (this.tryCacheLogin({ useCache, cachedSessions, username })) { - return this.client; - } + }): Client { + console.log(username) this.setRequestHeaders({ cookies }); this.client.li_at = cookies.li_at + this.client.AuthCookies = cookies + - if (username) { - //fs.writeFile(SESSIONS_PATH, JSON.stringify({ ...cachedSessions, [username]: cookies })); - } return this.client; } diff --git a/src/core/request.ts b/src/core/request.ts index 15aeea27..943bff84 100644 --- a/src/core/request.ts +++ b/src/core/request.ts @@ -24,6 +24,8 @@ export class Request { decorationIds: DecorationIds; + configs?: any + constructor({ proxy,httpAgent,httpsAgent,decorationIds }: RequestOpts = {}) { this.request = axios.create({ paramsSerializer, @@ -41,20 +43,12 @@ export class Request { this.decorationIds = defaultDecorationIds() } -/* this.request.interceptors.request.use(function (config){ - console.log('请求参数:', config) - return config - }, error => { - return Promise.reject(error); - })*/ -/* this.request.interceptors.response.use(function (response){ - console.log('返回结果', response) - return response - }, error => { - console.log('返回错误:', error) - return Promise.reject(error) - })*/ this.request.defaults.adapter = require('axios/lib/adapters/http'); + this.configs = {} + this.configs.proxy = proxy + this.configs.httpAgent = httpAgent + this.configs.httpsAgent = httpsAgent + this.configs.decorationIds = decorationIds }