{"_id":"@archishman2005/adiyogi-weather-sdk","_rev":"2-333315c460918a980a671933617b41ce","name":"@archishman2005/adiyogi-weather-sdk","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"@archishman2005/adiyogi-weather-sdk","version":"0.1.0","keywords":["weather","sdk","open-meteo","typescript","climate","forecast"],"author":{"name":"Archishman Sarkar"},"license":"MIT","_id":"@archishman2005/adiyogi-weather-sdk@0.1.0","maintainers":[{"name":"archishman2005","email":"pollpeearning1@gmail.com"}],"homepage":"https://github.com/archishman2005/adiyogi#readme","bugs":{"url":"https://github.com/archishman2005/adiyogi/issues"},"dist":{"shasum":"df83ec0801f4b223a5fad9cc90be6c1e0ba001ac","tarball":"https://registry.npmjs.org/@archishman2005/adiyogi-weather-sdk/-/adiyogi-weather-sdk-0.1.0.tgz","fileCount":51,"integrity":"sha512-kZ/rY/yts8FPomGhe8fi0/5OlG6XMVkinSDx6q05pydIO7L4T5eulpRL3+8ZOOTVVOBgyjgzYw4q62TUrwgnJg==","signatures":[{"sig":"MEYCIQCt+gJjYhIAeVOhuqgN7G8/Q5LnHegeG35r5BYgsZgOTgIhAPVx9fP15N9R9XJRz4aOKtR2I7B1d4+B/OFyQcXXLfgM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39717},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"b30a250465d8162516f55b9ba0d1b5cd38ede0f5","scripts":{"lint":"eslint src/**/*.ts","test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"archishman2005","email":"pollpeearning1@gmail.com"},"repository":{"url":"git+https://github.com/archishman2005/adiyogi.git","type":"git"},"_npmVersion":"11.7.0","description":"Comprehensive TypeScript SDK for Open-Meteo APIs","directories":{},"_nodeVersion":"25.4.0","dependencies":{"axios":"^1.6.0","date-fns":"^3.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.11.19"},"_npmOperationalInternal":{"tmp":"tmp/adiyogi-weather-sdk_0.1.0_1769537000396_0.2558924026472731","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@archishman2005/adiyogi-weather-sdk","publishConfig":{"access":"public"},"version":"1.0.0","description":"Comprehensive TypeScript SDK for Adiyogi Weather API - High-precision weather, climate, and environmental data","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"echo \"Error: no test specified\" && exit 1","lint":"eslint src/**/*.ts","prepublishOnly":"npm run build"},"keywords":["weather","sdk","adiyogi","typescript","climate","forecast","weather-api","meteorology","air-quality","environmental-data"],"author":{"name":"Adiyogi Weather"},"repository":{"type":"git","url":"git+https://github.com/ArchishmanS2005/WeatherSDK.git"},"bugs":{"url":"https://github.com/ArchishmanS2005/WeatherSDK/issues"},"homepage":"https://github.com/ArchishmanS2005/WeatherSDK#readme","license":"MIT","dependencies":{"axios":"^1.6.0","date-fns":"^3.3.1"},"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.19","ts-node":"^10.9.2"},"gitHead":"f2d69129445203046e1190c12781b08677510831","_id":"@archishman2005/adiyogi-weather-sdk@1.0.0","_nodeVersion":"25.4.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-69+7JNo3SQLxRRyfTg8bt1+xnrbjt5mOjvsuWMHPs1hduDFO8R0iOkfGhExR8DOCGnP6M77Puu9g6JF9/R0szg==","shasum":"91892f08c5a4fa9392302045d8f6ffc602b31348","tarball":"https://registry.npmjs.org/@archishman2005/adiyogi-weather-sdk/-/adiyogi-weather-sdk-1.0.0.tgz","fileCount":34,"unpackedSize":28358,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHoFD7Y5sx1AzPFvP/taHHvvr4eLqI6pKZOthFaaMwUtAiATxYZEijJ9AVvFCwL7CTOE9kJQDwl6EEwbBrke/LF+hw=="}]},"_npmUser":{"name":"archishman2005","email":"pollpeearning1@gmail.com"},"directories":{},"maintainers":[{"name":"archishman2005","email":"pollpeearning1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adiyogi-weather-sdk_1.0.0_1769601787685_0.49745315333101536"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-27T18:03:20.281Z","modified":"2026-01-28T12:03:07.972Z","0.1.0":"2026-01-27T18:03:20.534Z","1.0.0":"2026-01-28T12:03:07.840Z"},"bugs":{"url":"https://github.com/ArchishmanS2005/WeatherSDK/issues"},"author":{"name":"Adiyogi Weather"},"license":"MIT","homepage":"https://github.com/ArchishmanS2005/WeatherSDK#readme","keywords":["weather","sdk","adiyogi","typescript","climate","forecast","weather-api","meteorology","air-quality","environmental-data"],"repository":{"type":"git","url":"git+https://github.com/ArchishmanS2005/WeatherSDK.git"},"description":"Comprehensive TypeScript SDK for Adiyogi Weather API - High-precision weather, climate, and environmental data","maintainers":[{"name":"archishman2005","email":"pollpeearning1@gmail.com"}],"readme":"# Adiyogi Weather SDK (TypeScript)\r\n\r\n[![npm version](https://img.shields.io/npm/v/@adiyogi/weather-sdk.svg)](https://www.npmjs.com/package/@adiyogi/weather-sdk)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\r\n\r\nA comprehensive, fully-typed TypeScript SDK for accessing high-precision weather, climate, and environmental data.\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\nnpm install @adiyogi/weather-sdk\r\n```\r\n\r\nOr with yarn:\r\n```bash\r\nyarn add @adiyogi/weather-sdk\r\n```\r\n\r\n## 🚀 Quick Start\r\n\r\n```typescript\r\nimport { AdiyogiClient } from '@adiyogi/weather-sdk';\r\n\r\nconst client = new AdiyogiClient({\r\n  apiKey: process.env.ADIYOGI_API_KEY // Optional\r\n});\r\n\r\n// Get current weather\r\nconst weather = await client.weather.getCurrent({\r\n  lat: 40.7128,\r\n  lon: -74.0060\r\n});\r\n\r\nconsole.log(`Temperature: ${weather.temperature}°C`);\r\nconsole.log(`Condition: ${weather.condition}`);\r\n```\r\n\r\n## 🌟 Features\r\n\r\n- ✅ **Fully Typed** - Complete TypeScript definitions\r\n- ✅ **Async/Await** - Modern promise-based API\r\n- ✅ **Tree-shakable** - Import only what you need\r\n- ✅ **Zero Dependencies** - Lightweight and fast\r\n- ✅ **Error Handling** - Comprehensive error types\r\n- ✅ **Browser & Node.js** - Works everywhere\r\n\r\n## 📚 Services\r\n\r\n### Weather Forecast\r\n\r\n```typescript\r\n// Get 7-day forecast\r\nconst forecast = await client.weather.getForecast({\r\n  lat: 52.52,\r\n  lon: 13.41,\r\n  days: 7,\r\n  includeHourly: true\r\n});\r\n\r\nforecast.daily.forEach(day => {\r\n  console.log(`${day.date}: ${day.temperature.max}°C`);\r\n});\r\n```\r\n\r\n### Historical Data\r\n\r\n```typescript\r\n// Get historical weather data\r\nconst historical = await client.historical.getWeather({\r\n  lat: 52.52,\r\n  lon: 13.41,\r\n  startDate: '2023-01-01',\r\n  endDate: '2023-01-31',\r\n  variables: ['temperature', 'precipitation']\r\n});\r\n```\r\n\r\n### Air Quality\r\n\r\n```typescript\r\n// Get current air quality\r\nconst airQuality = await client.airQuality.getCurrent({\r\n  lat: 28.61,\r\n  lon: 77.20\r\n});\r\n\r\nconsole.log(`AQI: ${airQuality.aqi}`);\r\nconsole.log(`PM2.5: ${airQuality.pm25}`);\r\n```\r\n\r\n### Marine Data\r\n\r\n```typescript\r\n// Get marine forecast\r\nconst marine = await client.marine.getForecast({\r\n  lat: 35.6762,\r\n  lon: 139.6503,\r\n  days: 3\r\n});\r\n\r\nconsole.log(`Wave height: ${marine.waveHeight}m`);\r\n```\r\n\r\n### Elevation\r\n\r\n```typescript\r\n// Get elevation data\r\nconst elevation = await client.elevation.getElevation({\r\n  lat: 47.5162,\r\n  lon: 14.5501\r\n});\r\n\r\nconsole.log(`Elevation: ${elevation.altitude}m`);\r\n```\r\n\r\n### Geocoding\r\n\r\n```typescript\r\n// Search for locations\r\nconst results = await client.geocoding.search({\r\n  query: 'London'\r\n});\r\n\r\nresults.forEach(location => {\r\n  console.log(`${location.name}, ${location.country}`);\r\n});\r\n```\r\n\r\n## 🔧 Advanced Configuration\r\n\r\n```typescript\r\nconst client = new AdiyogiClient({\r\n  apiKey: 'your-api-key',\r\n  baseURL: 'https://api.adiyogi.com',\r\n  timeout: 10000,\r\n  retries: 3,\r\n  cache: true\r\n});\r\n```\r\n\r\n## 🎯 React Hook\r\n\r\n```typescript\r\nimport { useWeather } from '@adiyogi/weather-sdk/react';\r\n\r\nfunction WeatherWidget() {\r\n  const { data, loading, error } = useWeather({\r\n    lat: 40.7128,\r\n    lon: -74.0060,\r\n    refreshInterval: 60000 // Refresh every minute\r\n  });\r\n\r\n  if (loading) return <Spinner />;\r\n  if (error) return <Error message={error.message} />;\r\n\r\n  return (\r\n    <div>\r\n      <h2>{data.temperature}°C</h2>\r\n      <p>{data.condition}</p>\r\n    </div>\r\n  );\r\n}\r\n```\r\n\r\n## 📖 API Reference\r\n\r\n### Client Methods\r\n\r\n- `client.weather.getCurrent(options)` - Current weather\r\n- `client.weather.getForecast(options)` - Weather forecast\r\n- `client.historical.getWeather(options)` - Historical data\r\n- `client.airQuality.getCurrent(options)` - Air quality\r\n- `client.marine.getForecast(options)` - Marine forecast\r\n- `client.elevation.getElevation(options)` - Elevation data\r\n- `client.geocoding.search(options)` - Location search\r\n- `client.climate.getProjections(options)` - Climate projections\r\n- `client.solar.getRadiation(options)` - Solar radiation\r\n\r\n### TypeScript Types\r\n\r\n```typescript\r\ninterface WeatherOptions {\r\n  lat: number;\r\n  lon: number;\r\n  units?: 'metric' | 'imperial';\r\n}\r\n\r\ninterface ForecastOptions extends WeatherOptions {\r\n  days?: number;\r\n  includeHourly?: boolean;\r\n}\r\n\r\ninterface HistoricalOptions extends WeatherOptions {\r\n  startDate: string;\r\n  endDate: string;\r\n  variables?: string[];\r\n}\r\n```\r\n\r\n## ⚠️ Error Handling\r\n\r\n```typescript\r\ntry {\r\n  const weather = await client.weather.getCurrent({ lat: 40.7, lon: -74 });\r\n} catch (error) {\r\n  if (error instanceof NetworkError) {\r\n    console.error('Network issue:', error.message);\r\n  } else if (error instanceof ValidationError) {\r\n    console.error('Invalid parameters:', error.message);\r\n  } else {\r\n    console.error('Unknown error:', error);\r\n  }\r\n}\r\n```\r\n\r\n## 🧪 Testing\r\n\r\n```bash\r\nnpm test\r\n```\r\n\r\n## 📄 License\r\n\r\nMIT License - see [LICENSE](./LICENSE) for details\r\n\r\n## 🤝 Contributing\r\n\r\nContributions are welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details.\r\n\r\n## 🔗 Links\r\n\r\n- [Documentation](https://docs.adiyogi.com)\r\n- [GitHub](https://github.com/adiyogi/weather-sdk)\r\n- [npm](https://www.npmjs.com/package/@adiyogi/weather-sdk)\r\n- [Issues](https://github.com/adiyogi/weather-sdk/issues)\r\n\r\n## 📞 Support\r\n\r\nFor support, email support@adiyogi.com or open an issue on GitHub.\r\n\r\n","readmeFilename":"README.md"}