{"id":22669475,"url":"https://github.com/ni5arga/lastly","last_synced_at":"2026-04-02T02:38:19.971Z","repository":{"id":264934076,"uuid":"868314232","full_name":"ni5arga/Lastly","owner":"ni5arga","description":"Last.fm stats/widgets for your GitHub Profile readme","archived":false,"fork":false,"pushed_at":"2025-03-09T03:59:29.000Z","size":370,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T05:43:28.952Z","etag":null,"topics":["api","hacktoberfest","lastfm","nextjs"],"latest_commit_sha":null,"homepage":"https://lastly.nisarga.me","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/ni5arga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-10-06T03:48:11.000Z","updated_at":"2025-03-09T03:59:26.000Z","dependencies_parsed_at":"2024-11-26T21:47:30.300Z","dependency_job_id":null,"html_url":"https://github.com/ni5arga/Lastly","commit_stats":null,"previous_names":["ni5arga/lastly"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FLastly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FLastly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FLastly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FLastly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ni5arga","download_url":"https://codeload.github.com/ni5arga/Lastly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248558132,"owners_count":21124223,"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","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","hacktoberfest","lastfm","nextjs"],"created_at":"2024-12-09T15:31:39.207Z","updated_at":"2026-04-02T02:38:19.945Z","avatar_url":"https://github.com/ni5arga.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🎵 Lastly\n\nLastly is a **Next.js** project that generates **SVG images** displaying music statistics from [Last.fm](https://www.last.fm). The project offers several API endpoints to fetch and visualize data like top artists, tracks, albums, and recent listening history for any given user.\n\n---\n\n## 🎯 API Endpoints\n\nThe project provides the following API endpoints:\n\n| Endpoint              | Description                                |\n| --------------------- | ------------------------------------------ |\n| `/api/overall`        | Fetches and visualizes overall statistics  |\n| `/api/top-artists`    | Fetches and visualizes top artists         |\n| `/api/top-tracks`     | Fetches and visualizes top tracks          |\n| `/api/top-albums`     | Fetches and visualizes top albums          |\n| `/api/recent`         | Fetches and visualizes recent tracks       |\n\n### Example Usage\n\n#### 1. Overall Statistics\n\n**Endpoint:**\n\n```bash\n/api/overall?username=ni5arga\u0026period=overall\n```\n\n**Preview:**\n\n![Overall Statistics](https://lastly.nisarga.me/api/overall?username=ni5arga\u0026period=6months)\n\n---\n\n#### 2. Top Artists\n\n**Endpoint:**\n\n```bash\n/api/top-artists?username=ni5arga\n```\n\n**Preview:**\n\n![Top Artists](https://lastly.nisarga.me/api/top-artists?username=ni5arga)\n\n---\n\n#### 3. Top Tracks\n\n**Endpoint:**\n\n```bash\n/api/top-tracks?username=ni5arga\n```\n\n**Preview:**\n\n![Top Tracks](https://lastly.nisarga.me/api/top-tracks?username=ni5arga)\n\n---\n\n#### 4. Top Albums\n\n**Endpoint:**\n\n```bash\n/api/top-albums?username=ni5arga\n```\n\n**Preview:**\n\n![Top Albums](https://lastly.nisarga.me/api/top-albums?username=ni5arga)\n\n---\n\n#### 5. Recent Tracks\n\n**Endpoint:**\n\n```bash\n/api/recent?username=ni5arga\n```\n\n**Preview:**\n\n![Recent Tracks](https://lastly.nisarga.me/api/recent?username=ni5arga)\n\n---\n\n## 🚀 Embedding in README\n\nTo embed these images in your GitHub README (or other markdown content):\n\n1. Use the following markdown syntax to display the overall statistics for a user.\n\n```md\n![Overall Statistics](https://lastly.nisarga.me/api/overall?username=USERNAME\u0026period=PERIOD)\n```\n\nReplace `USERNAME` with your Last.fm username and `PERIOD` with the desired period (see options below).\n\n2. Alternatively, you can use HTML for more control over formatting (e.g., centering the image):\n\n```html\n\u003cimg src=\"https://lastly.nisarga.me/api/overall?username=USERNAME\u0026period=PERIOD\" alt=\"Overall Statistics\" align=\"center\"\u003e\n```\n\n---\n\n### 🛠️ Options\n\n- **`username`**: Your [Last.fm](https://www.last.fm) username.\n- **`period`**: Can be set to:\n  - `overall`: All-time statistics (default)\n  - `7day`: Last 7 days\n  - `1month`: Last month\n  - `3month`: Last 3 months\n  - `6month`: Last 6 months\n  - `12month`: Last year\n\nIf `period` is not specified, the default is `overall`.\n\n---\n\n## 📖 Self-Hosting Guide\n\nFollow the steps below to set up and run the project on your local machine:\n\n1. **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/ni5arga/lastly.git\n   cd lastly\n   ```\n\n2. **Install dependencies**:\n\n   ```bash\n   npm install\n   # or\n   yarn install\n   ```\n\n3. **Configure environment**:\n\n   Create a `.env.local` file in the root directory and add your Last.fm API key.\n\n   ```env\n   LASTFM_API_KEY=your_lastfm_api_key\n   ```\n\n4. **Run the development server**:\n\n   ```bash\n   npm run dev\n   # or\n   yarn dev\n   ```\n\n   Open [http://localhost:3000](http://localhost:3000) with your browser to view the project.\n\n---\n\n## 🌍 Deploy with Vercel\n\nDeploy the project to Vercel using the button below. Make sure to set up your environment variable (`LASTFM_API_KEY`) during the process.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fni5arga%2FLastly\u0026env=LASTFM_API_KEY)\n\n---\n\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fni5arga%2Flastly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fni5arga%2Flastly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fni5arga%2Flastly/lists"}