{"id":21870117,"url":"https://github.com/anmiles/google-api-wrapper","last_synced_at":"2025-08-31T20:10:15.225Z","repository":{"id":220011189,"uuid":"750528604","full_name":"anmiles/google-api-wrapper","owner":"anmiles","description":"Wrapper around googleapis for getting data shortly","archived":false,"fork":false,"pushed_at":"2025-07-24T07:42:11.000Z","size":6693,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-24T11:26:19.657Z","etag":null,"topics":["api","auth","google","googleapis","javascript","jest","library","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anmiles.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-30T20:09:11.000Z","updated_at":"2025-07-24T07:42:13.000Z","dependencies_parsed_at":"2024-04-28T22:28:39.116Z","dependency_job_id":"74ec7cb5-f982-4b39-b7ef-1dc85c9fbc53","html_url":"https://github.com/anmiles/google-api-wrapper","commit_stats":null,"previous_names":["anmiles/google-api-wrapper"],"tags_count":66,"template":false,"template_full_name":null,"purl":"pkg:github/anmiles/google-api-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmiles%2Fgoogle-api-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmiles%2Fgoogle-api-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmiles%2Fgoogle-api-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmiles%2Fgoogle-api-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anmiles","download_url":"https://codeload.github.com/anmiles/google-api-wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anmiles%2Fgoogle-api-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272519897,"owners_count":24948604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","auth","google","googleapis","javascript","jest","library","nodejs","typescript"],"created_at":"2024-11-28T06:10:10.057Z","updated_at":"2025-08-31T20:10:15.220Z","avatar_url":"https://github.com/anmiles.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @anmiles/google-api-wrapper\n\nWrapper around googleapis for getting data shortly\n- provides quick interface for getting google API data\n- encapsulates auth process\n- combines getting paged items in one call\n----\n\n## Installation\n\n`npm install @anmiles/google-api-wrapper`\n\n## Usage\n\n### Authorization\n``` js\n/* auth.js */\n\nimport { createProfile, login } from '@anmiles/google-api-wrapper';\n\ncreateProfile(\"username\");\n\n// Persistent credentials will be generated and stored to credentials file.\n// Next `login` call will re-use persistent credentials without showing oauth window\nlogin(\"username\");\n\n```\n\n### Example with persisted auth\n``` js\n/* calendar.js */\n\nimport { calendar } from 'googleapis/build/src/apis/calendar';\nimport { getProfiles, getAPI } from '@anmiles/google-api-wrapper';\n\nrequire('./auth');\n\ngetProfiles().map(async (profile) =\u003e {\n\t// Persistent credentials will be generated and stored to credentials file.\n\t// Next `getAPI` call will re-use persistent credentials without showing oauth window\n\tconst calendarAPI = getAPI((auth) =\u003e calendar({ version : 'v3', auth }), profile);\n\tconst events = await calendarAPI.getItems((api) =\u003e api.events, { timeMax: new Date().toISOString() });\n\tevents.forEach((event) =\u003e console.log(`Event: ${event.summary}`));\n});\n\n```\n\n### Example with temporary auth\n``` js\n/* videos.js */\n\nimport { youtube } from 'googleapis/build/src/apis/youtube';\nimport { getProfiles, getAPI } from '@anmiles/google-api-wrapper';\n\ngetProfiles().map(async (profile) =\u003e {\n\t// Temporary credentials will be generated and not stored to credentials file\n\t// Next `getAPI` will start authorization again with showing oauth window\n\tconst youtubeAPI = getAPI((auth) =\u003e youtube({ version : 'v3', auth }), profile, { temporary: true });\n\tconst videos = await youtubeAPI.getItems((api) =\u003e api.playlistItems, { playlistId : 'LL', part : [ 'snippet' ], maxResults : 50 });\n\tvideos.forEach((video) =\u003e console.log(`Downloaded: ${video.snippet?.title}`));\n});\n\n```\n\n### Live examples\n- [youtube-likes-downloader](https://www.npmjs.com/package/youtube-likes-downloader) - download all liked videos from youtube\n- [google-calendar-entries](https://www.npmjs.com/package/google-calendar-entries) - view and manage google calendar entries\n- [school-schedule-sync](https://www.npmjs.com/package/school-schedule-sync) - synchronization between JSON schedule and Google Calendar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanmiles%2Fgoogle-api-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanmiles%2Fgoogle-api-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanmiles%2Fgoogle-api-wrapper/lists"}