{"id":18106983,"url":"https://github.com/sagnik-coder24/api-basics","last_synced_at":"2025-08-01T05:38:34.559Z","repository":{"id":259287512,"uuid":"877491972","full_name":"Sagnik-Coder24/api-basics","owner":"Sagnik-Coder24","description":"Reddit API basics","archived":false,"fork":false,"pushed_at":"2024-10-23T20:23:45.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T06:46:08.471Z","etag":null,"topics":["api","axios","basic-learning","reactjs","reddit-api","superagent","vite"],"latest_commit_sha":null,"homepage":"https://sagnik-coder24.github.io/api-basics/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sagnik-Coder24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-23T18:34:14.000Z","updated_at":"2024-11-04T17:09:45.000Z","dependencies_parsed_at":"2024-10-24T04:48:08.946Z","dependency_job_id":"9c750b78-9f68-41f1-92b4-15666ab3d34c","html_url":"https://github.com/Sagnik-Coder24/api-basics","commit_stats":null,"previous_names":["sagnik-coder24/api-basics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sagnik-Coder24%2Fapi-basics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sagnik-Coder24%2Fapi-basics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sagnik-Coder24%2Fapi-basics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sagnik-Coder24%2Fapi-basics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sagnik-Coder24","download_url":"https://codeload.github.com/Sagnik-Coder24/api-basics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445648,"owners_count":20939953,"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","axios","basic-learning","reactjs","reddit-api","superagent","vite"],"created_at":"2024-10-31T23:08:50.027Z","updated_at":"2025-04-06T06:46:11.496Z","avatar_url":"https://github.com/Sagnik-Coder24.png","language":"JavaScript","readme":"# Reddit API Search App\n\nA simple React application using Vite that allows users to search for subreddits and fetch posts from Reddit's API. Users can choose between Axios or Superagent to make API calls.\n\n## Features\n\n- Search for any subreddit\n- Fetch data from Reddit API\n- Display a list of posts with clickable links\n- Option to use either Axios or Superagent for API requests\n\n## Built With\n\n- [**React**](https://reactjs.org/) - A JavaScript library for building user interfaces\n- [**Vite**](https://vitejs.dev/) - Next Generation Frontend Tooling\n- [**Axios**](https://axios-http.com/) - Promise-based HTTP client for the browser and Node.js\n- [**Superagent**](https://visionmedia.github.io/superagent/) - Small progressive client-side HTTP request library\n- [**Reddit API**](https://www.reddit.com/dev/api/) - Official API provided by Reddit for fetching subreddit data\n\n## Getting Started\n\n### Prerequisites\n\nMake sure you have [Node.js](https://nodejs.org/) installed on your machine.\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/Sagnik-Coder24/api-basics.git\n   cd api-basics\n\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n## Usage\n\n1. Start the development server:\n\n   ```bash\n   npm run dev\n\n   ```\n\n2. Open your browser and navigate to [http://localhost:5173](http://localhost:5173).\n\n3. Use the search input to enter a subreddit name and fetch posts.\n\n## Switching between Axios and Superagent\n\nIn the app's settings, you can toggle between using Axios and Superagent for making API calls. This will allow you to see how each library handles requests and responses.\n\n## API Reference\n\nThe application fetches data from the following endpoint:\n\n- https://www.reddit.com/r/{subreddit}.json\n\nReplace `{subreddit}` with the name of the subreddit you want to search.\n\n## Example Usage\n\n1. Enter a subreddit name (e.g., `reactjs`) in the search input.\n2. Click the search button to fetch posts.\n3. A list of posts will be displayed, each linking to the respective Reddit post page.\n\n## Contributing\n\nFeel free to submit issues or pull requests. Contributions are welcome!\n\n## Acknowledgments\n\n- [Reddit API](https://www.reddit.com/dev/api/) - For providing the data\n- [React](https://reactjs.org/) - For making UI development simple and efficient\n- [Vite](https://vitejs.dev/) - For the modern build tool\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagnik-coder24%2Fapi-basics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagnik-coder24%2Fapi-basics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagnik-coder24%2Fapi-basics/lists"}