UNPKG

friday-sdk

Version:

Official JavaScript/TypeScript SDK for the Friday API

26 lines (25 loc) 809 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getProfile = void 0; /** * Fetch and analyze a LinkedIn profile with caching support. * * @param client - API client instance * @param options - Profile fetch options * @returns Promise resolving to profile data * * @remarks * - Cached data is returned if available and less than 2 weeks old * - Fresh data is fetched and cached if no valid cache exists * - Setting realtime=true always fetches fresh data */ const getProfile = (client, options) => { const params = new URLSearchParams({ profile_url: options.profileUrl }); if (options.realtime) { params.append('realtime', 'true'); } return client.request(`/profile?${params.toString()}`); }; exports.getProfile = getProfile;